]>
Commit | Line | Data |
---|---|---|
1 | # makefile for libpng | |
2 | # Copyright (C) 1998 Tim Wegner | |
3 | # For conditions of distribution and use, see copyright notice in png.h | |
4 | # Assumes that zlib.lib, zconf.h, and zlib.h have been copied to ..\zlib | |
5 | # To use, do "nmake /f scripts\makefile.vcwin32" | |
6 | ||
7 | # -------- Microsoft Visual C++ 2.0 and later, no assembler code -------- | |
8 | # If you want to use assembler (MMX) code, use makefile.vcawin32 instead. | |
9 | ||
10 | # Compiler, linker, librarian, and other tools | |
11 | CC = cl | |
12 | LD = link | |
13 | AR = lib | |
14 | CFLAGS = -nologo -DPNG_NO_MMX_CODE -MD -O2 -W3 -I..\zlib | |
15 | LDFLAGS = -nologo | |
16 | ARFLAGS = -nologo | |
17 | RM = del | |
18 | ||
19 | # File extensions | |
20 | O=.obj | |
21 | ||
22 | #uncomment next to put error messages in a file | |
23 | #ERRFILE= >> pngerrs.log | |
24 | ||
25 | # Variables | |
26 | OBJS1 = png$(O) pngerror$(O) pngget$(O) pngmem$(O) pngpread$(O) | |
27 | OBJS2 = pngread$(O) pngrio$(O) pngrtran$(O) pngrutil$(O) pngset$(O) | |
28 | OBJS3 = pngtrans$(O) pngwio$(O) pngwrite$(O) pngwtran$(O) pngwutil$(O) | |
29 | OBJS = $(OBJS1) $(OBJS2) $(OBJS3) | |
30 | ||
31 | # Targets | |
32 | all: libpng.lib | |
33 | ||
34 | png$(O): png.h pngconf.h | |
35 | $(CC) -c $(CFLAGS) $*.c $(ERRFILE) | |
36 | ||
37 | pngset$(O): png.h pngconf.h | |
38 | $(CC) -c $(CFLAGS) $*.c $(ERRFILE) | |
39 | ||
40 | pngget$(O): png.h pngconf.h | |
41 | $(CC) -c $(CFLAGS) $*.c $(ERRFILE) | |
42 | ||
43 | pngread$(O): png.h pngconf.h | |
44 | $(CC) -c $(CFLAGS) $*.c $(ERRFILE) | |
45 | ||
46 | pngpread$(O): png.h pngconf.h | |
47 | $(CC) -c $(CFLAGS) $*.c $(ERRFILE) | |
48 | ||
49 | pngrtran$(O): png.h pngconf.h | |
50 | $(CC) -c $(CFLAGS) $*.c $(ERRFILE) | |
51 | ||
52 | pngrutil$(O): png.h pngconf.h | |
53 | $(CC) -c $(CFLAGS) $*.c $(ERRFILE) | |
54 | ||
55 | pngerror$(O): png.h pngconf.h | |
56 | $(CC) -c $(CFLAGS) $*.c $(ERRFILE) | |
57 | ||
58 | pngmem$(O): png.h pngconf.h | |
59 | $(CC) -c $(CFLAGS) $*.c $(ERRFILE) | |
60 | ||
61 | pngrio$(O): png.h pngconf.h | |
62 | $(CC) -c $(CFLAGS) $*.c $(ERRFILE) | |
63 | ||
64 | pngwio$(O): png.h pngconf.h | |
65 | $(CC) -c $(CFLAGS) $*.c $(ERRFILE) | |
66 | ||
67 | pngtest$(O): png.h pngconf.h | |
68 | $(CC) -c $(CFLAGS) $*.c $(ERRFILE) | |
69 | ||
70 | pngtrans$(O): png.h pngconf.h | |
71 | $(CC) -c $(CFLAGS) $*.c $(ERRFILE) | |
72 | ||
73 | pngwrite$(O): png.h pngconf.h | |
74 | $(CC) -c $(CFLAGS) $*.c $(ERRFILE) | |
75 | ||
76 | pngwtran$(O): png.h pngconf.h | |
77 | $(CC) -c $(CFLAGS) $*.c $(ERRFILE) | |
78 | ||
79 | pngwutil$(O): png.h pngconf.h | |
80 | $(CC) -c $(CFLAGS) $*.c $(ERRFILE) | |
81 | ||
82 | libpng.lib: $(OBJS) | |
83 | -$(RM) $@ | |
84 | $(AR) $(ARFLAGS) -out:$@ $(OBJS) $(ERRFILE) | |
85 | ||
86 | pngtest.exe: pngtest$(O) libpng.lib | |
87 | $(LD) $(LDFLAGS) -out:$@ pngtest$(O) libpng.lib ..\zlib\zlib.lib $(ERRFILE) | |
88 | ||
89 | test: pngtest.exe | |
90 | pngtest | |
91 | ||
92 | clean: | |
93 | -$(RM) *$(O) | |
94 | -$(RM) libpng.lib | |
95 | -$(RM) pngtest.exe | |
96 | -$(RM) pngout.png | |
97 | ||
98 | # End of makefile for libpng | |
99 |