]>
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.vcwin32" | |
6 | ||
3d11a79a VS |
7 | # -------- Microsoft Visual C++ 2.0 and later, no assembler code -------- |
8 | # If you want to use assembler (MMX) code, use makefile.vcawin32 instead. | |
9 | ||
10 | # Compiler, linker, librarian, and other tools | |
11 | CC = cl | |
12 | LD = link | |
13 | AR = lib | |
14 | CFLAGS = -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 | OBJS = $(OBJS1) $(OBJS2) $(OBJS3) | |
c6b71bff | 30 | |
3d11a79a | 31 | # Targets |
c6b71bff GD |
32 | all: libpng.lib |
33 | ||
34 | png$(O): png.h pngconf.h | |
3d11a79a | 35 | $(CC) -c $(CFLAGS) $*.c $(ERRFILE) |
c6b71bff GD |
36 | |
37 | pngset$(O): png.h pngconf.h | |
38 | $(CC) -c $(CFLAGS) $*.c $(ERRFILE) | |
39 | ||
40 | pngget$(O): png.h pngconf.h | |
41 | $(CC) -c $(CFLAGS) $*.c $(ERRFILE) | |
42 | ||
43 | pngread$(O): png.h pngconf.h | |
44 | $(CC) -c $(CFLAGS) $*.c $(ERRFILE) | |
45 | ||
46 | pngpread$(O): png.h pngconf.h | |
47 | $(CC) -c $(CFLAGS) $*.c $(ERRFILE) | |
48 | ||
49 | pngrtran$(O): png.h pngconf.h | |
50 | $(CC) -c $(CFLAGS) $*.c $(ERRFILE) | |
51 | ||
52 | pngrutil$(O): png.h pngconf.h | |
53 | $(CC) -c $(CFLAGS) $*.c $(ERRFILE) | |
54 | ||
55 | pngerror$(O): png.h pngconf.h | |
56 | $(CC) -c $(CFLAGS) $*.c $(ERRFILE) | |
57 | ||
58 | pngmem$(O): png.h pngconf.h | |
59 | $(CC) -c $(CFLAGS) $*.c $(ERRFILE) | |
60 | ||
61 | pngrio$(O): png.h pngconf.h | |
62 | $(CC) -c $(CFLAGS) $*.c $(ERRFILE) | |
63 | ||
64 | pngwio$(O): png.h pngconf.h | |
65 | $(CC) -c $(CFLAGS) $*.c $(ERRFILE) | |
66 | ||
67 | pngtest$(O): png.h pngconf.h | |
68 | $(CC) -c $(CFLAGS) $*.c $(ERRFILE) | |
69 | ||
70 | pngtrans$(O): png.h pngconf.h | |
71 | $(CC) -c $(CFLAGS) $*.c $(ERRFILE) | |
72 | ||
73 | pngwrite$(O): png.h pngconf.h | |
74 | $(CC) -c $(CFLAGS) $*.c $(ERRFILE) | |
75 | ||
76 | pngwtran$(O): png.h pngconf.h | |
77 | $(CC) -c $(CFLAGS) $*.c $(ERRFILE) | |
78 | ||
79 | pngwutil$(O): png.h pngconf.h | |
80 | $(CC) -c $(CFLAGS) $*.c $(ERRFILE) | |
81 | ||
3d11a79a VS |
82 | libpng.lib: $(OBJS) |
83 | -$(RM) $@ | |
84 | $(AR) $(ARFLAGS) -out:$@ $(OBJS) $(ERRFILE) | |
c6b71bff | 85 | |
3d11a79a VS |
86 | pngtest.exe: pngtest$(O) libpng.lib |
87 | $(LD) $(LDFLAGS) -out:$@ pngtest$(O) libpng.lib ..\zlib\zlib.lib $(ERRFILE) | |
c6b71bff GD |
88 | |
89 | test: pngtest.exe | |
90 | pngtest | |
91 | ||
3d11a79a VS |
92 | clean: |
93 | -$(RM) *$(O) | |
94 | -$(RM) libpng.lib | |
95 | -$(RM) pngtest.exe | |
96 | -$(RM) pngout.png | |
97 | ||
c6b71bff GD |
98 | # End of makefile for libpng |
99 |