]>
Commit | Line | Data |
---|---|---|
1 | # makefile for libpng | |
2 | # Copyright (C) 1995 Guy Eric Schalnat, Group 42, Inc. | |
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 | ||
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 | ||
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 | |
35 | $(CC) -c $(CFLAGS) $*.c $(ERRFILE) | |
36 | ||
37 | pngset$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h | |
38 | $(CC) -c $(CFLAGS) $*.c $(ERRFILE) | |
39 | ||
40 | pngget$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h | |
41 | $(CC) -c $(CFLAGS) $*.c $(ERRFILE) | |
42 | ||
43 | pngread$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h | |
44 | $(CC) -c $(CFLAGS) $*.c $(ERRFILE) | |
45 | ||
46 | pngpread$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h | |
47 | $(CC) -c $(CFLAGS) $*.c $(ERRFILE) | |
48 | ||
49 | pngrtran$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h | |
50 | $(CC) -c $(CFLAGS) $*.c $(ERRFILE) | |
51 | ||
52 | pngrutil$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h | |
53 | $(CC) -c $(CFLAGS) $*.c $(ERRFILE) | |
54 | ||
55 | pngerror$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h | |
56 | $(CC) -c $(CFLAGS) $*.c $(ERRFILE) | |
57 | ||
58 | pngmem$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h | |
59 | $(CC) -c $(CFLAGS) $*.c $(ERRFILE) | |
60 | ||
61 | pngrio$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h | |
62 | $(CC) -c $(CFLAGS) $*.c $(ERRFILE) | |
63 | ||
64 | pngwio$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h | |
65 | $(CC) -c $(CFLAGS) $*.c $(ERRFILE) | |
66 | ||
67 | pngtrans$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h | |
68 | $(CC) -c $(CFLAGS) $*.c $(ERRFILE) | |
69 | ||
70 | pngwrite$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h | |
71 | $(CC) -c $(CFLAGS) $*.c $(ERRFILE) | |
72 | ||
73 | pngwtran$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h | |
74 | $(CC) -c $(CFLAGS) $*.c $(ERRFILE) | |
75 | ||
76 | pngwutil$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h | |
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 | ||
85 | pngtest$(O): png.h pngconf.h pnglibconf.h | |
86 | $(CC) -c $(CFLAGS) $*.c $(ERRFILE) | |
87 | ||
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 |