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