]>
Commit | Line | Data |
---|---|---|
c6b71bff GD |
1 | # makefile for libpng |
2 | # Copyright (C) 1998 Tim Wegner | |
3 | # For conditions of distribution and use, see copyright notice in png.h | |
4 | # Assumes that zlib.lib, zconf.h, and zlib.h have been copied to ..\zlib | |
5 | # To use, do "nmake /f scripts\makefile.vcawin32" | |
6 | ||
7 | # -------- Microsoft Visual C++ 5.0 and later, uses assembler code -------- | |
3d11a79a VS |
8 | # If you don't want to use assembler (MMX) code, use makefile.vcwin32 instead. |
9 | ||
10 | # Compiler, linker, librarian, and other tools | |
11 | CC = cl | |
12 | LD = link | |
13 | AR = lib | |
14 | CFLAGS = -DPNG_USE_PNGVCRD -nologo -MD -O2 -W3 -I..\zlib | |
15 | LDFLAGS = -nologo | |
16 | ARFLAGS = -nologo | |
17 | RM = del | |
18 | ||
19 | # File extensions | |
c6b71bff GD |
20 | O=.obj |
21 | ||
22 | #uncomment next to put error messages in a file | |
3d11a79a | 23 | #ERRFILE= >> pngerrs.log |
c6b71bff | 24 | |
3d11a79a VS |
25 | # Variables |
26 | OBJS1 = png$(O) pngerror$(O) pngget$(O) pngmem$(O) pngpread$(O) | |
27 | OBJS2 = pngread$(O) pngrio$(O) pngrtran$(O) pngrutil$(O) pngset$(O) | |
28 | OBJS3 = pngtrans$(O) pngwio$(O) pngwrite$(O) pngwtran$(O) pngwutil$(O) | |
29 | OBJS4 = pngvcrd$(O) | |
30 | OBJS = $(OBJS1) $(OBJS2) $(OBJS3) $(OBJS4) | |
c6b71bff | 31 | |
3d11a79a | 32 | # Targets |
c6b71bff GD |
33 | all: libpng.lib |
34 | ||
35 | png$(O): png.h pngconf.h | |
3d11a79a | 36 | $(CC) -c $(CFLAGS) $*.c $(ERRFILE) |
c6b71bff GD |
37 | |
38 | pngset$(O): png.h pngconf.h | |
39 | $(CC) -c $(CFLAGS) $*.c $(ERRFILE) | |
40 | ||
41 | pngget$(O): png.h pngconf.h | |
42 | $(CC) -c $(CFLAGS) $*.c $(ERRFILE) | |
43 | ||
44 | pngread$(O): png.h pngconf.h | |
45 | $(CC) -c $(CFLAGS) $*.c $(ERRFILE) | |
46 | ||
47 | pngpread$(O): png.h pngconf.h | |
48 | $(CC) -c $(CFLAGS) $*.c $(ERRFILE) | |
49 | ||
50 | pngrtran$(O): png.h pngconf.h | |
51 | $(CC) -c $(CFLAGS) $*.c $(ERRFILE) | |
52 | ||
53 | pngrutil$(O): png.h pngconf.h | |
54 | $(CC) -c $(CFLAGS) $*.c $(ERRFILE) | |
55 | ||
c6b71bff GD |
56 | pngerror$(O): png.h pngconf.h |
57 | $(CC) -c $(CFLAGS) $*.c $(ERRFILE) | |
58 | ||
59 | pngmem$(O): png.h pngconf.h | |
60 | $(CC) -c $(CFLAGS) $*.c $(ERRFILE) | |
61 | ||
62 | pngrio$(O): png.h pngconf.h | |
63 | $(CC) -c $(CFLAGS) $*.c $(ERRFILE) | |
64 | ||
65 | pngwio$(O): png.h pngconf.h | |
66 | $(CC) -c $(CFLAGS) $*.c $(ERRFILE) | |
67 | ||
68 | pngtest$(O): png.h pngconf.h | |
69 | $(CC) -c $(CFLAGS) $*.c $(ERRFILE) | |
70 | ||
71 | pngtrans$(O): png.h pngconf.h | |
72 | $(CC) -c $(CFLAGS) $*.c $(ERRFILE) | |
73 | ||
74 | pngwrite$(O): png.h pngconf.h | |
75 | $(CC) -c $(CFLAGS) $*.c $(ERRFILE) | |
76 | ||
77 | pngwtran$(O): png.h pngconf.h | |
78 | $(CC) -c $(CFLAGS) $*.c $(ERRFILE) | |
79 | ||
80 | pngwutil$(O): png.h pngconf.h | |
81 | $(CC) -c $(CFLAGS) $*.c $(ERRFILE) | |
82 | ||
3d11a79a VS |
83 | pngvcrd$(O): png.h pngconf.h |
84 | $(CC) -c $(CFLAGS) $*.c $(ERRFILE) | |
85 | ||
86 | libpng.lib: $(OBJS) | |
87 | -$(RM) $@ | |
88 | $(AR) $(ARFLAGS) -out:$@ $(OBJS) $(ERRFILE) | |
c6b71bff | 89 | |
3d11a79a VS |
90 | pngtest.exe: pngtest$(O) libpng.lib |
91 | $(LD) $(LDFLAGS) -out:$@ pngtest$(O) libpng.lib ..\zlib\zlib.lib $(ERRFILE) | |
c6b71bff GD |
92 | |
93 | test: pngtest.exe | |
94 | pngtest | |
95 | ||
3d11a79a VS |
96 | clean: |
97 | -$(RM) *$(O) | |
98 | -$(RM) libpng.lib | |
99 | -$(RM) pngtest.exe | |
100 | -$(RM) pngout.png | |
101 | ||
c6b71bff GD |
102 | # End of makefile for libpng |
103 |