]> git.saurik.com Git - wxWidgets.git/blob - src/makeva.env
1. some fixes for the problems reported by BoundsChecker
[wxWidgets.git] / src / makeva.env
1 #
2 # File: Makeva.env
3 # Author: David Webster
4 # Created: Wed Apr 17 08:36:42 1999
5 # Updated:
6 #
7 # VisualAge C++ V3.0 makefile include file
8 #
9
10 # Suffixes
11 OBJSUFF=obj
12 SRCSUFF=cpp
13
14 OS2FLAGS=/c /W3 /D__VISAGECPP__ /Ss /Q /N100
15 OS2LINKFLAGS=/BASE:0x00010000 /PMTYPE:PM /NOE /NOD /ALIGN:16
16 OS2LIBFLAGS=/NOL /NOE
17
18 # Set an environment variable, WXWIN, to your WXWIN directory
19 WXDIR=$(WXWIN)
20
21 WXSRC=$(WXDIR)\src\os2
22 WXINC=$(WXDIR)\include
23 WXBASESRC=$(WXDIR)\src\common
24 EXTRAINC=$(WXDIR)\src\png
25 LINK=icc
26 RC=rc
27
28 #####################################################################
29 # These are the possible DLL/non-DLL usages:
30 #
31 # Type _DLL/_WINDLL WXUSINGDLL WXMAKINGDLL Library
32 #--------------------------------------------------------------------
33 # Normal application - - - wx.lib
34 #
35 # wxWin as DLL Defined - Defined wx200.lib
36 #
37 # App using wxWin DLL - Defined - wx200.lib
38 #
39 # App built as one DLL Defined - - wx.lib
40 #
41 ######################################################################
42 #
43 # Compiling your app:
44 #--------------------
45 # when compiling an app to use the DLL version of wxWindows
46 # (but not to be a DLL itself), set WXUSINGDLL to 1 in your
47 # makefile just before including ntwxwin.mak.
48 # To compile wxWin _and_ app itself as a DLL, set DLL to 1
49 # in ntwxwin.mak, and do not set WXUSINGDLL.
50 #
51 # Compiling wxWindows:
52 #---------------------
53 # Use the dll target to compile wxWindows as DLL; then make 'pch'
54 # to generate a precompiled header for your apps to use. BUG: must compile without
55 # wxExpr (USE_WX_RESOURCES = 0) for this to link properly. Don't know why yet.
56 # Use the dllapp target to compile wxWindows for making a DLL app (not implemented yet)
57
58 #DLL=0
59
60 !if "$(WXUSINGDLL)" == "1"
61 EXTRADLLFLAGS=/DWXUSINGDLL=1
62 EXTRALNKFLAGS=/EXEC
63 !endif
64
65 !if "$(WXMAKINGDLL)" == "1"
66 EXTRADLLFLAGS=/DWXMAKINGDLL=1 /Ge- /D__OS2DLL__
67 EXTRALNKFLAGS=/DLL
68 !endif
69
70 !if "$(WXMAKINGDLL)" == "0" && "$(DLL)" == "1"
71 EXTRADLLFLAGS=
72 EXTRALNKFLAGS=/EXEC
73 !endif
74
75 !ifndef FINAL
76 FINAL=0
77 DEBUG=1
78 !endif
79
80 !ifndef DLL
81 DLL=0
82 !endif
83
84 # This sets 'D' to a suitable directory name
85 # for this kind of build, and WXLIBNAME to one of wx (static release), wx_d (static debug),
86 # wx200 (DLL release), wx200_d (DLL debug)
87
88 !if "$(WXMAKINGDLL)" == "1" || "$(WXUSINGDLL)" == "1"
89 WXLIBNAME=wx200
90 !else
91 WXLIBNAME=wx
92 !endif
93
94 !if "$(NEW_WXLIBNAME)" != ""
95 WXLIBNAME=$(NEW_WXLIBNAME)
96 !endif
97
98 !if "$(FINAL)" == "1"
99 D=RelseOS2
100 !else
101 D=DebugOS2
102 !endif
103
104 WXLIB=$(WXDIR)\lib\$(WXLIBNAME).lib
105
106 !if "$(WXMAKINGDLL)" == "1" || "$(WXUSINGDLL)" == "1"
107 D=$(D)DLL
108 !endif
109
110
111 INC=-I$(WXINC) -I$(WXDIR)/src/jpeg -I$(WXDIR)/src/zlib -I$(EXTRAINC)
112 LINKLIBS=CPPOM30I.LIB CPPOOC3I.LIB OS2386.LIB UPM32.LIB NETAPI32.LIB
113 EXTRALIBS=$(WXDIR)\lib\os2png.lib $(WXDIR)\lib\os2zlib.lib $(WXDIR)\lib\os2jpeg.lib $(WXDIR)\lib\os2xpm.lib
114 LIBS=$(WXLIB) $(EXTRALIBS)
115
116 MAKEPRECOMP=/FiWX/WXPREC.H
117 OPTIONS=
118
119 !if "$(FINAL)" == "0"
120 OPT =
121 DEBUG_FLAGS= /Ti /D__WXDEBUG__ #/Fb
122 LINK_DEBUG_FLAGS=/DEBUG
123 CRTFLAG=/Gm /Gd
124 !else
125 # /O1 - smallest code
126 # /O2 - fastest code
127 OPT = /O+ /Oc /G5
128 DEBUG_FLAGS=
129 LINK_DEBUG_FLAGS=/RELEASE
130 CRTFLAG=/Gm /Gd
131 !endif
132
133 !if "$(DLL)" == "0"
134
135 !if "$(NOPCH)" == "1"
136 PCH=
137 PRECOMP=
138 MAKEPRECOMP=
139 !else
140 PCH=$(WXLIBNAME).pch
141 PRECOMP=/Si$(PCH)
142 MAKEPRECOMP=/Fi$(PCH)
143 !endif
144
145 CPPFLAGS=$(OS2FLAGS) $(DEBUG_FLAGS) $(PRECOMP) $(EXTRAFLAGS) /D__WXPM__ $(INC) $(OPT) $(EXTRADLLFLAGS) $(CRTFLAG) $(OVERRIDEFLAGS)
146 # If you don't include wxprec.h, use CPPFLAGS2
147 CPPFLAGS2=$(OS2FLAGS) $(DEBUG_FLAGS) /D__WXPM__ $(INC) $(EXTRAFLAGS) $(OPT) $(EXTRADLLFLAGS) $(CRTFLAG) $(OVERRIDEFLAGS)
148 LINKFLAGS=$(OS2LINKFLAGS) $(LINK_DEBUG_FLAGS) $(EXTRALNKFLAGS)
149 DUMMY=dummy
150
151 !else
152
153 !if "$(WXMAKINGDLL)" == "1"
154 PCH=$(WXLIBNAME).pch
155 DUMMY=dummydll
156 !else
157 PCH=$(WXLIBNAME).pch
158 DUMMY=dummy
159 !endif
160
161 PRECOMP=/SiWX/WXPREC.H
162 CPPFLAGS=$(OS2FLAGS) $(DEBUG_FLAGS) $(PRECOMP) $(EXTRAFLAGS) /D__WXPM__ $(INC) $(OPT) $(CRTFLAG) $(EXTRADLLFLAGS)
163 CPPFLAGS2=$(OS2FLAGS) $(DEBUG_FLAGS) /D__WXPM__ $(INC) $(EXTRAFLAGS) $(OPT) $(CRTFLAG) $(EXTRADLLFLAGS)
164 LINKFLAGS=$(OS2LINKFLAGS) $(LINK_DEBUG_FLAGS) $(EXTRALNKFLAGS)
165 !endif
166
167 DUMMYOBJ=$(WXDIR)\src\os2\$D\$(DUMMY).obj
168
169 .c.obj:
170 icc @<<
171 $(CPPFLAGS2) /Fo$@ /c $<
172 <<
173
174 .cpp.obj:
175 icc @<<
176 $(CPPFLAGS2) /Fo$@ /c $<
177 <<
178