]>
Commit | Line | Data |
---|---|---|
0272a10d VZ |
1 | # makefile for libpng |
2 | # Copyright (C) 1998 Tim Wegner | |
b61cc19c PC |
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 | # | |
0272a10d VZ |
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 -------- | |
0272a10d VZ |
13 | |
14 | # Compiler, linker, librarian, and other tools | |
15 | CC = cl | |
16 | LD = link | |
17 | AR = lib | |
b61cc19c | 18 | CFLAGS = -nologo -MD -O2 -W3 -I..\zlib |
0272a10d VZ |
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 | ||
b61cc19c | 38 | png$(O): png.h pngconf.h pngpriv.h |
0272a10d VZ |
39 | $(CC) -c $(CFLAGS) $*.c $(ERRFILE) |
40 | ||
b61cc19c | 41 | pngset$(O): png.h pngconf.h pngpriv.h |
0272a10d VZ |
42 | $(CC) -c $(CFLAGS) $*.c $(ERRFILE) |
43 | ||
b61cc19c | 44 | pngget$(O): png.h pngconf.h pngpriv.h |
0272a10d VZ |
45 | $(CC) -c $(CFLAGS) $*.c $(ERRFILE) |
46 | ||
b61cc19c | 47 | pngread$(O): png.h pngconf.h pngpriv.h |
0272a10d VZ |
48 | $(CC) -c $(CFLAGS) $*.c $(ERRFILE) |
49 | ||
b61cc19c | 50 | pngpread$(O): png.h pngconf.h pngpriv.h |
0272a10d VZ |
51 | $(CC) -c $(CFLAGS) $*.c $(ERRFILE) |
52 | ||
b61cc19c | 53 | pngrtran$(O): png.h pngconf.h pngpriv.h |
0272a10d VZ |
54 | $(CC) -c $(CFLAGS) $*.c $(ERRFILE) |
55 | ||
b61cc19c | 56 | pngrutil$(O): png.h pngconf.h pngpriv.h |
0272a10d VZ |
57 | $(CC) -c $(CFLAGS) $*.c $(ERRFILE) |
58 | ||
b61cc19c | 59 | pngerror$(O): png.h pngconf.h pngpriv.h |
0272a10d VZ |
60 | $(CC) -c $(CFLAGS) $*.c $(ERRFILE) |
61 | ||
b61cc19c | 62 | pngmem$(O): png.h pngconf.h pngpriv.h |
0272a10d VZ |
63 | $(CC) -c $(CFLAGS) $*.c $(ERRFILE) |
64 | ||
b61cc19c | 65 | pngrio$(O): png.h pngconf.h pngpriv.h |
0272a10d VZ |
66 | $(CC) -c $(CFLAGS) $*.c $(ERRFILE) |
67 | ||
b61cc19c | 68 | pngwio$(O): png.h pngconf.h pngpriv.h |
0272a10d VZ |
69 | $(CC) -c $(CFLAGS) $*.c $(ERRFILE) |
70 | ||
b61cc19c | 71 | pngtrans$(O): png.h pngconf.h pngpriv.h |
0272a10d VZ |
72 | $(CC) -c $(CFLAGS) $*.c $(ERRFILE) |
73 | ||
b61cc19c | 74 | pngwrite$(O): png.h pngconf.h pngpriv.h |
0272a10d VZ |
75 | $(CC) -c $(CFLAGS) $*.c $(ERRFILE) |
76 | ||
b61cc19c | 77 | pngwtran$(O): png.h pngconf.h pngpriv.h |
0272a10d VZ |
78 | $(CC) -c $(CFLAGS) $*.c $(ERRFILE) |
79 | ||
b61cc19c | 80 | pngwutil$(O): png.h pngconf.h pngpriv.h |
0272a10d VZ |
81 | $(CC) -c $(CFLAGS) $*.c $(ERRFILE) |
82 | ||
83 | libpng.lib: $(OBJS) | |
84 | -$(RM) $@ | |
85 | $(AR) $(ARFLAGS) -out:$@ $(OBJS) $(ERRFILE) | |
86 | ||
b61cc19c PC |
87 | pngtest$(O): png.h pngconf.h |
88 | $(CC) -c $(CFLAGS) $*.c $(ERRFILE) | |
89 | ||
0272a10d VZ |
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 |