]>
Commit | Line | Data |
---|---|---|
1 | # | |
2 | # File: makefile.vc | |
3 | # Author: David Webster | |
4 | # Created: 1999 | |
5 | # Updated: | |
6 | # Copyright: c) 1993, AIAI, University of Edinburgh | |
7 | # | |
8 | # "%W% %G%" | |
9 | # | |
10 | # Makefile : Builds os2zlib.lib library for OS/2 3.0/4.0 | |
11 | ||
12 | # Suffixes | |
13 | OBJSUFF=obj | |
14 | SRCSUFF=c | |
15 | ||
16 | OS2FLAGS=/c /W2 /DOS232 /D__VISAGECPP__ /Ss /Q /N100 | |
17 | OS2LINKFLAGS=/BASE:0x00010000 /PMTYPE:PM /NOE /NOD /ALIGN:16 | |
18 | OS2LIBFLAGS=/NOL /NOE | |
19 | OS2LIBS=CPPOM30.lib CPPOOC3.LIB OS2386.LIB | |
20 | ||
21 | !if "$(WXMAKINGDLL)" != "0" | |
22 | EXTRADLLFLAGS=/DWXMAKINGDLL=1 /Ge- /D__OS2DLL__ | |
23 | EXTRALNKFLAGS=/DLL | |
24 | !endif | |
25 | ||
26 | # Change WXDIR or WXWIN to wherever wxWindows is found | |
27 | WXDIR = $(WXWIN) | |
28 | ||
29 | OS2ZLIBDIR=$(WXDIR)\src\zlib | |
30 | OS2ZLIBINC=$(WINPNGDIR) | |
31 | !if "$(WXMAKINGDLL)" != "1" | |
32 | OS2ZLIBLIB=$(WXDIR)\lib\os2zlib.lib | |
33 | !else | |
34 | OS2ZLIBLIB=$(WXDIR)\lib\os2zlib.dll | |
35 | !endif | |
36 | INC= | |
37 | ||
38 | !ifndef FINAL | |
39 | FINAL=0 | |
40 | !endif | |
41 | ||
42 | !if "$(NOPCH)" == "1" | |
43 | PCH= | |
44 | PRECOMP= | |
45 | MAKEPRECOMP= | |
46 | !else | |
47 | PCH=$(WXLIBNAME).pch | |
48 | PRECOMP=/Si$(PCH) | |
49 | MAKEPRECOMP=/Fi$(PCH) | |
50 | !endif | |
51 | ||
52 | !if "$(FINAL)" == "0" | |
53 | !if "$(WXMAKINGDLL)" == "1" | |
54 | D=DebugOS2DLL | |
55 | !else | |
56 | D=DebugOS2 | |
57 | !endif | |
58 | OPT = | |
59 | DEBUG_FLAGS= /Ti /D__WXDEBUG__ #/Fb | |
60 | LINK_DEBUG_FLAGS=/DEBUG | |
61 | CRTFLAG=/Gm /Gd | |
62 | !else | |
63 | # /O1 - smallest code | |
64 | # /O2 - fastest code | |
65 | !if "$(WXMAKINGDLL)" == "1" | |
66 | D=RelseOS2DLL | |
67 | !else | |
68 | D=RelseOS2 | |
69 | !endif | |
70 | OPT = /O+ /Oc /G5 | |
71 | DEBUG_FLAGS= | |
72 | LINK_DEBUG_FLAGS=/RELEASE | |
73 | CRTFLAG=/Gm /Gd | |
74 | !endif | |
75 | ||
76 | !if [md $(OS2ZLIBDIR)\$D] | |
77 | !endif | |
78 | ||
79 | CPPFLAGS=$(OS2FLAGS) $(EXTRADLLFLAGS) $(DEBUG_FLAGS) $(PRECOMP) $(INC) $(OPT) $(CRTFLAG) | |
80 | LINKFKAGS=$(OS2LINKFLAGS) $(EXTRALNKFLAGS) | |
81 | ||
82 | {..\zlib}.c{..\zlib\$D}.obj: | |
83 | @echo $< | |
84 | icc @<< | |
85 | $(CPPFLAGS) /Fo$@ /Tp $< | |
86 | << | |
87 | ||
88 | OBJECTS = \ | |
89 | ..\zlib\$D\adler32.obj \ | |
90 | ..\zlib\$D\compress.obj \ | |
91 | ..\zlib\$D\crc32.obj \ | |
92 | ..\zlib\$D\deflate.obj \ | |
93 | ..\zlib\$D\gzio.obj \ | |
94 | ..\zlib\$D\infblock.obj \ | |
95 | ..\zlib\$D\infcodes.obj \ | |
96 | ..\zlib\$D\inflate.obj \ | |
97 | ..\zlib\$D\inftrees.obj \ | |
98 | ..\zlib\$D\infutil.obj \ | |
99 | ..\zlib\$D\inffast.obj \ | |
100 | ..\zlib\$D\trees.obj \ | |
101 | ..\zlib\$D\uncompr.obj \ | |
102 | ..\zlib\$D\zutil.obj | |
103 | ||
104 | all: $(OS2ZLIBLIB) | |
105 | ||
106 | !if "$(WXMAKINGDLL)" != "1" | |
107 | ||
108 | $(WXDIR)\lib\os2zlib.lib: $(OBJECTS) | |
109 | touch $(WXDIR)\lib\os2zlib.lib | |
110 | del $(WXDIR)\lib\os2zlib.lib | |
111 | ilib $(OS2LIBFLAGS) $@ @<< | |
112 | $**; | |
113 | << | |
114 | ||
115 | !else | |
116 | ||
117 | # Update the dynamic link library | |
118 | $(WXDIR)\lib\os2zlib.dll: $(OBJECTS) | |
119 | icc @<< | |
120 | /B" $(LINKFLAGS)" /Fe$@ | |
121 | $(LIBS) | |
122 | $(OBJECTS) | |
123 | $(WXDIR)\lib\os2zlib.def | |
124 | << | |
125 | implib $(WXDIR)\lib\os2zlibd.lib $(WXDIR)\lib\os2zlib.def | |
126 | ||
127 | !endif | |
128 | ||
129 | clean: | |
130 | del $(OS2ZLIBLIB) | |
131 | erase /N $(OS2ZLIBDIR)\$D | |
132 | rd $(OS2ZLIBDIR)\$D | |
133 | ||
134 | cleanall: clean | |
135 |