]>
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 | png$(O): png.h pngconf.h pngpriv.h | |
31 | $(CC) -c $(CFLAGS) $*.c $(ERRFILE) | |
32 | ||
33 | pngset$(O): png.h pngconf.h pngpriv.h | |
34 | $(CC) -c $(CFLAGS) $*.c $(ERRFILE) | |
35 | ||
36 | pngget$(O): png.h pngconf.h pngpriv.h | |
37 | $(CC) -c $(CFLAGS) $*.c $(ERRFILE) | |
38 | ||
39 | pngread$(O): png.h pngconf.h pngpriv.h | |
40 | $(CC) -c $(CFLAGS) $*.c $(ERRFILE) | |
41 | ||
42 | pngpread$(O): png.h pngconf.h pngpriv.h | |
43 | $(CC) -c $(CFLAGS) $*.c $(ERRFILE) | |
44 | ||
45 | pngrtran$(O): png.h pngconf.h pngpriv.h | |
46 | $(CC) -c $(CFLAGS) $*.c $(ERRFILE) | |
47 | ||
48 | pngrutil$(O): png.h pngconf.h pngpriv.h | |
49 | $(CC) -c $(CFLAGS) $*.c $(ERRFILE) | |
50 | ||
51 | pngerror$(O): png.h pngconf.h pngpriv.h | |
52 | $(CC) -c $(CFLAGS) $*.c $(ERRFILE) | |
53 | ||
54 | pngmem$(O): png.h pngconf.h pngpriv.h | |
55 | $(CC) -c $(CFLAGS) $*.c $(ERRFILE) | |
56 | ||
57 | pngrio$(O): png.h pngconf.h pngpriv.h | |
58 | $(CC) -c $(CFLAGS) $*.c $(ERRFILE) | |
59 | ||
60 | pngwio$(O): png.h pngconf.h pngpriv.h | |
61 | $(CC) -c $(CFLAGS) $*.c $(ERRFILE) | |
62 | ||
63 | pngtrans$(O): png.h pngconf.h pngpriv.h | |
64 | $(CC) -c $(CFLAGS) $*.c $(ERRFILE) | |
65 | ||
66 | pngwrite$(O): png.h pngconf.h pngpriv.h | |
67 | $(CC) -c $(CFLAGS) $*.c $(ERRFILE) | |
68 | ||
69 | pngwtran$(O): png.h pngconf.h pngpriv.h | |
70 | $(CC) -c $(CFLAGS) $*.c $(ERRFILE) | |
71 | ||
72 | pngwutil$(O): png.h pngconf.h pngpriv.h | |
73 | $(CC) -c $(CFLAGS) $*.c $(ERRFILE) | |
74 | ||
75 | libpng.lib: $(OBJS1) $(OBJS2) $(OBJS3) | |
76 | del libpng.lib | |
77 | lib libpng $(OBJS1); | |
78 | lib libpng $(OBJS2); | |
79 | lib libpng $(OBJS3); | |
80 | ||
81 | pngtest$(O): png.h pngconf.h | |
82 | $(CC) -c $(CFLAGS) $*.c $(ERRFILE) | |
83 | ||
84 | pngtest.exe: pngtest.obj libpng.lib | |
85 | $(LD) $(LDFLAGS) pngtest.obj,,,libpng.lib ..\zlib\zlib.lib ; | |
86 | ||
87 | test: pngtest.exe | |
88 | pngtest | |
89 | ||
90 | # End of makefile for libpng | |
91 |