]>
Commit | Line | Data |
---|---|---|
0272a10d VZ |
1 | # makefile for libpng |
2 | # Copyright (C) 1995 Guy Eric Schalnat, Group 42, Inc. | |
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 | ||
11 | # -------- Microsoft C 5.1 and later, does not use assembler code -------- | |
12 | MODEL=L | |
13 | CFLAGS=-Oait -Gs -nologo -W3 -A$(MODEL) -I..\zlib | |
14 | #-Ox generates bad code with MSC 5.1 | |
15 | CC=cl | |
16 | LD=link | |
17 | LDFLAGS=/e/st:0x1500/noe | |
18 | O=.obj | |
19 | ||
20 | #uncomment next to put error messages in a file | |
21 | ERRFILE= >> pngerrs | |
22 | ||
23 | # variables | |
24 | OBJS1 = png$(O) pngset$(O) pngget$(O) pngrutil$(O) pngtrans$(O) pngwutil$(O) | |
25 | OBJS2 = pngmem$(O) pngpread$(O) pngread$(O) pngerror$(O) pngwrite$(O) | |
26 | OBJS3 = pngrtran$(O) pngwtran$(O) pngrio$(O) pngwio$(O) | |
27 | ||
28 | all: libpng.lib | |
29 | ||
9c0d9ce3 DS |
30 | # see scripts/pnglibconf.mak for more options |
31 | pnglibconf.h: scripts/pnglibconf.h.prebuilt | |
32 | cp scripts/pnglibconf.h.prebuilt $@ | |
33 | ||
34 | png$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h | |
0272a10d VZ |
35 | $(CC) -c $(CFLAGS) $*.c $(ERRFILE) |
36 | ||
9c0d9ce3 | 37 | pngset$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h |
0272a10d VZ |
38 | $(CC) -c $(CFLAGS) $*.c $(ERRFILE) |
39 | ||
9c0d9ce3 | 40 | pngget$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h |
0272a10d VZ |
41 | $(CC) -c $(CFLAGS) $*.c $(ERRFILE) |
42 | ||
9c0d9ce3 | 43 | pngread$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h |
0272a10d VZ |
44 | $(CC) -c $(CFLAGS) $*.c $(ERRFILE) |
45 | ||
9c0d9ce3 | 46 | pngpread$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h |
0272a10d VZ |
47 | $(CC) -c $(CFLAGS) $*.c $(ERRFILE) |
48 | ||
9c0d9ce3 | 49 | pngrtran$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h |
0272a10d VZ |
50 | $(CC) -c $(CFLAGS) $*.c $(ERRFILE) |
51 | ||
9c0d9ce3 | 52 | pngrutil$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h |
0272a10d VZ |
53 | $(CC) -c $(CFLAGS) $*.c $(ERRFILE) |
54 | ||
9c0d9ce3 | 55 | pngerror$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h |
0272a10d VZ |
56 | $(CC) -c $(CFLAGS) $*.c $(ERRFILE) |
57 | ||
9c0d9ce3 | 58 | pngmem$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h |
0272a10d VZ |
59 | $(CC) -c $(CFLAGS) $*.c $(ERRFILE) |
60 | ||
9c0d9ce3 | 61 | pngrio$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h |
0272a10d VZ |
62 | $(CC) -c $(CFLAGS) $*.c $(ERRFILE) |
63 | ||
9c0d9ce3 | 64 | pngwio$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h |
0272a10d VZ |
65 | $(CC) -c $(CFLAGS) $*.c $(ERRFILE) |
66 | ||
9c0d9ce3 | 67 | pngtrans$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h |
0272a10d VZ |
68 | $(CC) -c $(CFLAGS) $*.c $(ERRFILE) |
69 | ||
9c0d9ce3 | 70 | pngwrite$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h |
0272a10d VZ |
71 | $(CC) -c $(CFLAGS) $*.c $(ERRFILE) |
72 | ||
9c0d9ce3 | 73 | pngwtran$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h |
0272a10d VZ |
74 | $(CC) -c $(CFLAGS) $*.c $(ERRFILE) |
75 | ||
9c0d9ce3 | 76 | pngwutil$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h |
0272a10d VZ |
77 | $(CC) -c $(CFLAGS) $*.c $(ERRFILE) |
78 | ||
79 | libpng.lib: $(OBJS1) $(OBJS2) $(OBJS3) | |
80 | del libpng.lib | |
81 | lib libpng $(OBJS1); | |
82 | lib libpng $(OBJS2); | |
83 | lib libpng $(OBJS3); | |
84 | ||
9c0d9ce3 | 85 | pngtest$(O): png.h pngconf.h pnglibconf.h |
b61cc19c PC |
86 | $(CC) -c $(CFLAGS) $*.c $(ERRFILE) |
87 | ||
0272a10d VZ |
88 | pngtest.exe: pngtest.obj libpng.lib |
89 | $(LD) $(LDFLAGS) pngtest.obj,,,libpng.lib ..\zlib\zlib.lib ; | |
90 | ||
91 | test: pngtest.exe | |
92 | pngtest | |
93 | ||
94 | # End of makefile for libpng | |
95 |