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