]>
Commit | Line | Data |
---|---|---|
0272a10d VZ |
1 | # makefile for libpng |
2 | # Copyright (C) 1998 Tim Wegner | |
9c0d9ce3 | 3 | # Copyright (C) 2006,2009,2011 Glenn Randers-Pehrson |
b61cc19c PC |
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 | |
9c0d9ce3 | 18 | CFLAGS = -nologo -D_CRT_SECURE_NO_DEPRECATE -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 | ||
9c0d9ce3 DS |
38 | # see scripts/pnglibconf.mak for more options |
39 | pnglibconf.h: scripts\pnglibconf.h.prebuilt | |
40 | copy scripts\pnglibconf.h.prebuilt $@ | |
41 | ||
42 | png$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h | |
0272a10d VZ |
43 | $(CC) -c $(CFLAGS) $*.c $(ERRFILE) |
44 | ||
9c0d9ce3 | 45 | pngset$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h |
0272a10d VZ |
46 | $(CC) -c $(CFLAGS) $*.c $(ERRFILE) |
47 | ||
9c0d9ce3 | 48 | pngget$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h |
0272a10d VZ |
49 | $(CC) -c $(CFLAGS) $*.c $(ERRFILE) |
50 | ||
9c0d9ce3 | 51 | pngread$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h |
0272a10d VZ |
52 | $(CC) -c $(CFLAGS) $*.c $(ERRFILE) |
53 | ||
9c0d9ce3 | 54 | pngpread$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h |
0272a10d VZ |
55 | $(CC) -c $(CFLAGS) $*.c $(ERRFILE) |
56 | ||
9c0d9ce3 | 57 | pngrtran$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h |
0272a10d VZ |
58 | $(CC) -c $(CFLAGS) $*.c $(ERRFILE) |
59 | ||
9c0d9ce3 | 60 | pngrutil$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h |
0272a10d VZ |
61 | $(CC) -c $(CFLAGS) $*.c $(ERRFILE) |
62 | ||
9c0d9ce3 | 63 | pngerror$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h |
0272a10d VZ |
64 | $(CC) -c $(CFLAGS) $*.c $(ERRFILE) |
65 | ||
9c0d9ce3 | 66 | pngmem$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h |
0272a10d VZ |
67 | $(CC) -c $(CFLAGS) $*.c $(ERRFILE) |
68 | ||
9c0d9ce3 | 69 | pngrio$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h |
0272a10d VZ |
70 | $(CC) -c $(CFLAGS) $*.c $(ERRFILE) |
71 | ||
9c0d9ce3 | 72 | pngwio$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h |
0272a10d VZ |
73 | $(CC) -c $(CFLAGS) $*.c $(ERRFILE) |
74 | ||
9c0d9ce3 | 75 | pngtrans$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h |
0272a10d VZ |
76 | $(CC) -c $(CFLAGS) $*.c $(ERRFILE) |
77 | ||
9c0d9ce3 | 78 | pngwrite$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h |
0272a10d VZ |
79 | $(CC) -c $(CFLAGS) $*.c $(ERRFILE) |
80 | ||
9c0d9ce3 | 81 | pngwtran$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h |
0272a10d VZ |
82 | $(CC) -c $(CFLAGS) $*.c $(ERRFILE) |
83 | ||
9c0d9ce3 | 84 | pngwutil$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h |
0272a10d VZ |
85 | $(CC) -c $(CFLAGS) $*.c $(ERRFILE) |
86 | ||
87 | libpng.lib: $(OBJS) | |
88 | -$(RM) $@ | |
89 | $(AR) $(ARFLAGS) -out:$@ $(OBJS) $(ERRFILE) | |
90 | ||
9c0d9ce3 | 91 | pngtest$(O): png.h pngconf.h pnglibconf.h |
b61cc19c PC |
92 | $(CC) -c $(CFLAGS) $*.c $(ERRFILE) |
93 | ||
0272a10d VZ |
94 | pngtest.exe: pngtest$(O) libpng.lib |
95 | $(LD) $(LDFLAGS) -out:$@ pngtest$(O) libpng.lib ..\zlib\zlib.lib $(ERRFILE) | |
96 | ||
97 | test: pngtest.exe | |
98 | pngtest | |
99 | ||
100 | clean: | |
101 | -$(RM) *$(O) | |
102 | -$(RM) libpng.lib | |
9c0d9ce3 | 103 | -$(RM) pnglibconf.h |
0272a10d VZ |
104 | -$(RM) pngtest.exe |
105 | -$(RM) pngout.png | |
106 | ||
107 | # End of makefile for libpng | |
108 |