]>
Commit | Line | Data |
---|---|---|
735c116a DW |
1 | # |
2 | # File: makefile.vc | |
3 | # Author: David Webster | |
4 | # Created: 1999 | |
5 | # Updated: | |
4a9dba0e | 6 | # Copyright: |
735c116a DW |
7 | # |
8 | # "%W% %G%" | |
9 | # | |
7e415a0f | 10 | # Makefile : Builds os2zlib.lib library for OS/2 3.0/4.0 |
735c116a DW |
11 | |
12 | # Suffixes | |
13 | OBJSUFF=obj | |
14 | SRCSUFF=c | |
15 | ||
57e3f9d9 | 16 | OS2FLAGS=/c /W2 /DOS232 /D__VISAGECPP__ /Ss /Q /N100 |
735c116a DW |
17 | OS2LINKFLAGS=/BASE:0x00010000 /PMTYPE:PM /NOE /NOD /ALIGN:16 |
18 | OS2LIBFLAGS=/NOL /NOE | |
19 | OS2LIBS=CPPOM30.lib CPPOOC3.LIB OS2386.LIB | |
20 | ||
7e415a0f DW |
21 | !if "$(WXMAKINGDLL)" != "0" |
22 | EXTRADLLFLAGS=/DWXMAKINGDLL=1 /Ge- /D__OS2DLL__ | |
23 | EXTRALNKFLAGS=/DLL | |
24 | !endif | |
25 | ||
735c116a | 26 | # Change WXDIR or WXWIN to wherever wxWindows is found |
57e3f9d9 | 27 | WXDIR = $(WXWIN) |
735c116a DW |
28 | |
29 | OS2ZLIBDIR=$(WXDIR)\src\zlib | |
30 | OS2ZLIBINC=$(WINPNGDIR) | |
7e415a0f | 31 | !if "$(WXMAKINGDLL)" != "1" |
735c116a | 32 | OS2ZLIBLIB=$(WXDIR)\lib\os2zlib.lib |
7e415a0f DW |
33 | !else |
34 | OS2ZLIBLIB=$(WXDIR)\lib\os2zlib.dll | |
35 | !endif | |
735c116a DW |
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" | |
7e415a0f DW |
53 | !if "$(WXMAKINGDLL)" == "1" |
54 | D=DebugOS2DLL | |
55 | !else | |
57e3f9d9 | 56 | D=DebugOS2 |
7e415a0f | 57 | !endif |
735c116a DW |
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 | |
7e415a0f DW |
65 | !if "$(WXMAKINGDLL)" == "1" |
66 | D=RelseOS2DLL | |
67 | !else | |
57e3f9d9 | 68 | D=RelseOS2 |
7e415a0f | 69 | !endif |
735c116a DW |
70 | OPT = /O+ /Oc /G5 |
71 | DEBUG_FLAGS= | |
72 | LINK_DEBUG_FLAGS=/RELEASE | |
73 | CRTFLAG=/Gm /Gd | |
74 | !endif | |
75 | ||
50c375d3 DW |
76 | !if [md $(OS2ZLIBDIR)\$D] |
77 | !endif | |
78 | ||
7e415a0f DW |
79 | CPPFLAGS=$(OS2FLAGS) $(EXTRADLLFLAGS) $(DEBUG_FLAGS) $(PRECOMP) $(INC) $(OPT) $(CRTFLAG) |
80 | LINKFKAGS=$(OS2LINKFLAGS) $(EXTRALNKFLAGS) | |
735c116a DW |
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 | ||
50c375d3 | 104 | all: $(OS2ZLIBLIB) |
735c116a | 105 | |
7e415a0f DW |
106 | !if "$(WXMAKINGDLL)" != "1" |
107 | ||
735c116a DW |
108 | $(WXDIR)\lib\os2zlib.lib: $(OBJECTS) |
109 | touch $(WXDIR)\lib\os2zlib.lib | |
110 | del $(WXDIR)\lib\os2zlib.lib | |
111 | ilib $(OS2LIBFLAGS) $@ @<< | |
112 | $**; | |
113 | << | |
114 | ||
7e415a0f DW |
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) | |
872ae055 | 123 | $(WXDIR)\src\os2\os2zlib.def |
7e415a0f | 124 | << |
872ae055 | 125 | implib $(WXDIR)\lib\os2zlibd.lib $(WXDIR)\src\os2\os2zlib.def |
7e415a0f DW |
126 | |
127 | !endif | |
128 | ||
735c116a | 129 | clean: |
50c375d3 DW |
130 | del $(OS2ZLIBLIB) |
131 | erase /N $(OS2ZLIBDIR)\$D | |
132 | rd $(OS2ZLIBDIR)\$D | |
735c116a DW |
133 | |
134 | cleanall: clean | |
135 |