]>
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 | # | |
10 | # Makefile : Builds os2png.lib library for OS/2 3.0/4.0 | |
11 | ||
12 | # Suffixes | |
13 | OBJSUFF=obj | |
14 | SRCSUFF=cpp | |
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 | ||
1d4ad4df 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 | OS2PNGDIR=$(WXDIR)\src\png | |
30 | OS2PNGINC=$(WINPNGDIR) | |
31 | OS2PNGLIB=$(WXDIR)\lib\os2png.lib | |
1d4ad4df DW |
32 | !if "$(WXMAKINGDLL)" != "1" |
33 | OS2PNGLIB=$(WXDIR)\lib\os2png.lib | |
34 | !else | |
35 | OS2PNGLIB=$(WXDIR)\lib\os2png.dll | |
36 | !endif | |
735c116a DW |
37 | INC=-I$(WXDIR)\src\zlib -I$(OS2PNGINC) |
38 | ||
39 | !ifndef FINAL | |
40 | FINAL=0 | |
41 | !endif | |
42 | ||
43 | !if "$(NOPCH)" == "1" | |
44 | PCH= | |
45 | PRECOMP= | |
46 | MAKEPRECOMP= | |
47 | !else | |
48 | PCH=$(WXLIBNAME).pch | |
49 | PRECOMP=/Si$(PCH) | |
50 | MAKEPRECOMP=/Fi$(PCH) | |
51 | !endif | |
52 | ||
53 | !if "$(FINAL)" == "0" | |
1d4ad4df DW |
54 | !if "$(WXMAKINGDLL)" == "1" |
55 | D=DebugOS2DLL | |
56 | !else | |
57e3f9d9 | 57 | D=DebugOS2 |
1d4ad4df | 58 | !endif |
735c116a DW |
59 | OPT = |
60 | DEBUG_FLAGS= /Ti /D__WXDEBUG__ #/Fb | |
61 | LINK_DEBUG_FLAGS=/DEBUG | |
62 | CRTFLAG=/Gm /Gd | |
63 | !else | |
64 | # /O1 - smallest code | |
65 | # /O2 - fastest code | |
1d4ad4df DW |
66 | !if "$(WXMAKINGDLL)" == "1" |
67 | D=RelseOS2DLL | |
68 | !else | |
57e3f9d9 | 69 | D=RelseOS2 |
1d4ad4df | 70 | !endif |
735c116a DW |
71 | OPT = /O+ /Oc /G5 |
72 | DEBUG_FLAGS= | |
73 | LINK_DEBUG_FLAGS=/RELEASE | |
74 | CRTFLAG=/Gm /Gd | |
75 | !endif | |
76 | ||
50c375d3 DW |
77 | !if [md $(OS2PNGDIR)\$D] |
78 | !endif | |
79 | ||
1d4ad4df DW |
80 | CPPFLAGS=$(OS2FLAGS) $(EXTRADLLFLAGS) $(DEBUG_FLAGS) $(PRECOMP) $(INC) $(OPT) $(CRTFLAG) |
81 | LINKFKAGS=$(OS2LINKFLAGS) $(EXTRALNKFLAGS) | |
82 | LIBS=..\\..\\lib\os2zlibd.lib | |
735c116a DW |
83 | |
84 | {..\png}.c{..\png\$D}.obj: | |
85 | @echo $< | |
86 | icc @<< | |
87 | $(CPPFLAGS) /Fo$@ /Tp $< | |
88 | << | |
89 | ||
90 | OBJECTS = \ | |
91 | ..\png\$D\png.obj \ | |
92 | ..\png\$D\pngread.obj \ | |
93 | ..\png\$D\pngrtran.obj \ | |
94 | ..\png\$D\pngrutil.obj \ | |
95 | ..\png\$D\pngpread.obj \ | |
96 | ..\png\$D\pngtrans.obj \ | |
97 | ..\png\$D\pngwrite.obj \ | |
98 | ..\png\$D\pngwtran.obj \ | |
99 | ..\png\$D\pngwutil.obj \ | |
100 | ..\png\$D\pngerror.obj \ | |
101 | ..\png\$D\pngmem.obj \ | |
102 | ..\png\$D\pngwio.obj \ | |
103 | ..\png\$D\pngrio.obj \ | |
104 | ..\png\$D\pngget.obj \ | |
105 | ..\png\$D\pngset.obj | |
106 | ||
107 | all: $(OS2PNGLIB) | |
108 | ||
1d4ad4df DW |
109 | !if "$(WXMAKINGDLL)" != "1" |
110 | ||
735c116a DW |
111 | $(WXDIR)\lib\os2png.lib: $(OBJECTS) |
112 | touch $(WXDIR)\lib\os2png.lib | |
113 | del $(WXDIR)\lib\os2png.lib | |
114 | ilib $(OS2LIBFLAGS) $@ @<< | |
115 | $**; | |
116 | << | |
117 | ||
1d4ad4df DW |
118 | !else |
119 | ||
120 | # Update the dynamic link library | |
121 | $(WXDIR)\lib\os2png.dll: $(OBJECTS) | |
122 | icc @<< | |
123 | /B" $(LINKFLAGS)" /Fe$@ | |
124 | $(LIBS) | |
125 | $(OBJECTS) | |
872ae055 | 126 | $(WXDIR)\src\os2\os2png.def |
1d4ad4df | 127 | << |
872ae055 | 128 | implib $(WXDIR)\lib\os2pngd.lib $(WXDIR)\src\os2\os2png.def |
1d4ad4df DW |
129 | |
130 | !endif | |
131 | ||
735c116a | 132 | clean: |
50c375d3 DW |
133 | del $(OS2PNGLIB) |
134 | erase /N $(OS2PNGDIR)\$D | |
135 | rd $(OS2PNGDIR)\$D | |
735c116a DW |
136 | |
137 | cleanall: clean | |
138 |