]>
Commit | Line | Data |
---|---|---|
c801d85f | 1 | # |
7921cf2b | 2 | # File: makefile.vc |
c801d85f KB |
3 | # Author: Julian Smart |
4 | # Created: 1993 | |
3156ba6e | 5 | # Updated: |
c801d85f KB |
6 | # Copyright: (c) 1993, AIAI, University of Edinburgh |
7 | # | |
8 | # "%W% %G%" | |
9 | # | |
10 | # Makefile : Builds winpng.lib library for Windows 3.1 | |
11 | ||
12 | # Change WXDIR or WXWIN to wherever wxWindows is found | |
13 | WXDIR = $(WXWIN) | |
c801d85f KB |
14 | |
15 | WINPNGDIR = ..\png | |
16 | WINPNGINC = $(WINPNGDIR) | |
5fa399c9 JS |
17 | |
18 | !if "$(FINAL)" == "1" | |
19 | WINPNGLIB=..\..\lib\png.lib | |
f641dada RD |
20 | !else if "$(FINAL)" == "hybrid" |
21 | WINPNGLIB=..\..\lib\pngh.lib | |
5fa399c9 JS |
22 | !else |
23 | WINPNGLIB=..\..\lib\pngd.lib | |
24 | !endif | |
c801d85f KB |
25 | |
26 | INC = /I..\zlib | |
27 | ||
28 | # Set this to nothing if your compiler is MS C++ 7 | |
29 | ZOPTION= | |
30 | ||
31 | !ifndef FINAL | |
32 | FINAL=0 | |
33 | !endif | |
34 | ||
3156ba6e | 35 | PRECOMP=/YuWX.H |
c801d85f KB |
36 | |
37 | !if "$(FINAL)" == "0" | |
38 | OPT = /Od | |
3156ba6e RD |
39 | CPPFLAGS= /W4 /Zi $(CRTFLAG) /GX $(ZOPTION) $(OPT) /D__WXMSW__ $(INC) |
40 | CFLAGS= /W4 /Zi $(CRTFLAG) /GX /Od /D__WXMSW__ $(INC) | |
c801d85f | 41 | LINKFLAGS=/NOD /CO /ONERROR:NOEXE |
3156ba6e | 42 | _CRTFLAG=/MDd |
f641dada RD |
43 | !else if "$(FINAL)" == "hybrid" |
44 | OPT = /Od | |
45 | CPPFLAGS= /W4 /Zi $(CRTFLAG) /GX $(ZOPTION) $(OPT) /D__WXMSW__ $(INC) | |
46 | CFLAGS= /W4 /Zi $(CRTFLAG) /GX /Od /D__WXMSW__ $(INC) | |
47 | LINKFLAGS=/NOD /CO /ONERROR:NOEXE | |
48 | _CRTFLAG=/MD | |
c801d85f KB |
49 | !else |
50 | # /Ox for real FINAL version | |
51 | OPT = /O2 | |
3156ba6e RD |
52 | CPPFLAGS= /W4 $(CRTFLAG) /GX /D__WXMSW__ $(INC) |
53 | CFLAGS= /W4 $(CRTFLAG) /GX /D__WXMSW__ $(INC) | |
c801d85f | 54 | LINKFLAGS=/NOD /ONERROR:NOEXE |
f641dada | 55 | _CRTFLAG=/MD |
c801d85f KB |
56 | !endif |
57 | ||
3156ba6e RD |
58 | !if "$(CRTFLAG)" == "" |
59 | CRTFLAG=$(_CRTFLAG) | |
60 | !endif | |
61 | ||
62 | ||
c801d85f KB |
63 | OBJECTS = png.obj pngread.obj pngrtran.obj pngrutil.obj \ |
64 | pngpread.obj pngtrans.obj pngwrite.obj pngwtran.obj pngwutil.obj \ | |
65 | pngerror.obj pngmem.obj pngwio.obj pngrio.obj pngget.obj pngset.obj | |
66 | ||
67 | all: $(WINPNGLIB) | |
68 | ||
69 | $(WINPNGLIB): $(OBJECTS) | |
7fee680b | 70 | -erase $(WINPNGLIB) |
c801d85f KB |
71 | lib @<< |
72 | -out:$(WINPNGLIB) | |
73 | $(OBJECTS) | |
74 | << | |
75 | ||
76 | .c.obj: | |
77 | cl -DWIN32 $(OPT) $(CFLAGS) /c $*.c | |
78 | ||
79 | clean: | |
e6f09be7 BM |
80 | -erase *.obj |
81 | -erase *.exe | |
7fee680b | 82 | -erase $(WINPNGLIB) |
c801d85f KB |
83 | |
84 | cleanall: clean |