1 | # $Id: odin32.profile.emx.mk,v 1.4 2003-02-28 10:28:10 sandervl Exp $
|
---|
2 |
|
---|
3 | #
|
---|
4 | # Odin32 API
|
---|
5 | #
|
---|
6 | # DEBUG makefile for the GNU EMX compiler environment.
|
---|
7 | #
|
---|
8 | # ---------------------------------------------------------------------------------
|
---|
9 | # NOTE: this configuration is not supported neither working, it's experimental only.
|
---|
10 | # ---------------------------------------------------------------------------------
|
---|
11 |
|
---|
12 |
|
---|
13 | #
|
---|
14 | # Library macros.
|
---|
15 | #
|
---|
16 | SOMLIB = somtk.lib
|
---|
17 | RTLLIB = \
|
---|
18 | #$(EMX)\lib\mt\c.lib \
|
---|
19 | #$(EMX)\lib\mt\c_app.lib \
|
---|
20 | #$(EMX)\lib\c_alias.lib \
|
---|
21 | #$(EMX)\lib\mt\emx.lib \
|
---|
22 | #$(EMX)\lib\emx2.lib \
|
---|
23 | #$(EMX)\lib\stdcpp.lib \
|
---|
24 | #$(EMX)\lib\gcc.lib \
|
---|
25 | $(ODIN32_BASE)\src\msvcrt\libs\m.lib \
|
---|
26 | $(EMX)\lib\iberty_s.lib \
|
---|
27 | $(EMX)\lib\gcc-lib\i386-pc-os2_emx\3.0.3\mt\gcc.lib \
|
---|
28 | $(EMX)\lib\mt\c.lib \
|
---|
29 | $(EMX)\lib\mt\c_dllso.lib \
|
---|
30 | $(EMX)\lib\mt\sys.lib \
|
---|
31 | $(EMX)\lib\c_alias.lib \
|
---|
32 | $(EMX)\lib\mt\emx.lib \
|
---|
33 | $(EMX)\lib\emx2.lib \
|
---|
34 | $(EMX)\lib\gcc-lib\i386-pc-os2_emx\3.0.3\mt\stdcxx.lib \
|
---|
35 | $(EMX)\lib\gcc-lib\i386-pc-os2_emx\3.0.3\mt\gpp.lib \
|
---|
36 | #$(EMX)\lib\stdcpp.lib \
|
---|
37 | #$(EMX)\lib\mt\c_app.lib makes trouble for crtdll \
|
---|
38 |
|
---|
39 | RTLLIB_O = $(EMX)\lib\mt\c_import.lib $(RTLLIB)
|
---|
40 | RTLLIB_NRE =
|
---|
41 | DLLENTRY = $(ODIN32_LIB)\dllentry.obj
|
---|
42 | ODINCRT = odincrt
|
---|
43 | !ifdef DEBUG
|
---|
44 | ODINCRT = odincrtd
|
---|
45 | !endif
|
---|
46 | LIB_DEMANGLE =
|
---|
47 | !ifndef DEBUG
|
---|
48 | #OBJ_PROFILE = $(ODIN32_LIB)\cppopa3.obj $(ODIN32_LIB)\cppopa3_fix2.obj
|
---|
49 | LIB_PROFILE = $(ODIN32_LIB)\kProfile.lib
|
---|
50 | NO_LXLITE = 1
|
---|
51 | !endif
|
---|
52 |
|
---|
53 |
|
---|
54 | #
|
---|
55 | # Tools
|
---|
56 | #
|
---|
57 | CC = gcc
|
---|
58 | CXX = gcc
|
---|
59 | AS = alp
|
---|
60 | LD = gcc
|
---|
61 | LD2 = link386
|
---|
62 | IMPLIB = implib
|
---|
63 | ILIB = emxomfar
|
---|
64 | RC = $(ODIN32_TOOLS)\wrc
|
---|
65 | OS2RC = rc
|
---|
66 |
|
---|
67 | #
|
---|
68 | # This knuts take at profiling.
|
---|
69 | # - Profile the RELEASE version of the system using a real profiler.
|
---|
70 | #
|
---|
71 | !ifndef DEBUG
|
---|
72 |
|
---|
73 | #
|
---|
74 | # Tool Flags
|
---|
75 | #
|
---|
76 | ASFLAGS = -Mb -Sc -Sv:ALP +Od
|
---|
77 | IMPLIBFLAGS = /nologo
|
---|
78 | ILIBFLAGS = rcv
|
---|
79 | RCFLAGS = -s -I. -I$(CPPMAIN)\include
|
---|
80 | !ifdef WRC_PREFIX_RESOURCE
|
---|
81 | RCFLAGS = $(RCFLAGS) -p $(TARGET)
|
---|
82 | !endif
|
---|
83 | OS2RCFLAGS = -r -n
|
---|
84 | OS2RCLFLAGS = -x2 -n
|
---|
85 |
|
---|
86 |
|
---|
87 | #
|
---|
88 | # C Compiler flags.
|
---|
89 | # This may look a bit like a mess but, there is usually a reason behind
|
---|
90 | # every line and the way it is done. We have some problems with nmake
|
---|
91 | # when we add new flags to for example CXXFLAGS too many times.
|
---|
92 | #
|
---|
93 | !ifndef NOPROFILEHOOKS
|
---|
94 | PROFILEFLAGS = -pg
|
---|
95 | !endif
|
---|
96 | !ifdef EXETARGET
|
---|
97 | CTARGETFLAGS = -Zexe
|
---|
98 | CXXTARGETFLAGS = -Zexe
|
---|
99 | !else
|
---|
100 | CTARGETFLAGS = -Zdll
|
---|
101 | CXXTARGETFLAGS = -Zdll
|
---|
102 | !endif
|
---|
103 | CXXEXCEPTIONS = -fhandle-exceptions
|
---|
104 | CFLAGS = -Zomf -pipe -Wall -Zmt -g -O6 -mcpu=pentium $(PROFILEFLAGS) $(CTARGETFLAGS)
|
---|
105 | CXXFLAGS = -Zomf -pipe -Wall -Zmt -g -O6 -mcpu=pentium $(PROFILEFLAGS) $(CXXTARGETFLAGS)
|
---|
106 | CXXFLAGS_ODINCRT = -Zomf -pipe -Wall -Zmt -g -O6 -mcpu=pentium $(PROFILEFLAGS) $(CXXTARGETFLAGS)
|
---|
107 | CFLAGS_WIN32APP = -Zomf -pipe -Wall -Zmt -g -O6 -mcpu=pentium $(PROFILEFLAGS) $(CTARGETFLAGS)
|
---|
108 | CXXFLAGS_WIN32APP= -Zomf -pipe -Wall -Zmt -g -O6 -mcpu=pentium $(PROFILEFLAGS) $(CXXTARGETFLAGS) $(CXXEXCEPTIONS)
|
---|
109 | CINCLUDES = -I$(ODIN32_INCLUDE)\Win -I. -I$(ODIN32_INCLUDE)
|
---|
110 | CDEFINES = -D__WIN32OS2__ -D__i386__ -D__WINE__ -DTCPV40HDRS -DCOMCTL32UNDOC
|
---|
111 | CDEFINES_ODINCRT = -D__WIN32OS2__ -D__i386__ -D__WINE__
|
---|
112 | CDEFINES_WIN32APP= -D__WIN32OS2__ -D__i386__
|
---|
113 |
|
---|
114 |
|
---|
115 | #
|
---|
116 | # Linker flags.
|
---|
117 | # This may look a bit like a mess but, there is usually a reason behind
|
---|
118 | # every line and the way it is done. We have some problems with nmake
|
---|
119 | # when we add new flags to for example LD2FLAGS too many times.
|
---|
120 | #
|
---|
121 | !ifdef EXETARGET
|
---|
122 | !ifndef STACKSIZE
|
---|
123 | STACKSIZE = 0x50000
|
---|
124 | !endif
|
---|
125 | ! ifdef VIO
|
---|
126 | LDTARGETFLAGS = -Zexe -Zstack 80
|
---|
127 | LD2TARGETFLAGS = /pmtype:vio /stack:$(STACKSIZE)
|
---|
128 | ! else
|
---|
129 | LDTARGETFLAGS = -Zexe -Zstack 80
|
---|
130 | LD2TARGETFLAGS = /pmtype:pm /stack:$(STACKSIZE)
|
---|
131 | ! endif
|
---|
132 | !else
|
---|
133 | LDTARGETFLAGS = -Zdll -Zso -Zsys
|
---|
134 | LD2TARGETFLAGS = /DLL
|
---|
135 | !endif
|
---|
136 | LDFLAGS = -Zmt -Zomf -Zmap -Zlinker "/MAP:FULL /Linenumbers /exepack:2 /Nod" $(LDTARGETFLAGS) -g
|
---|
137 | LDFLAGS_ODINCRT = -Zmt -Zomf -Zmap -Zlinker "/MAP:FULL /Linenumbers /exepack:2 " $(LDTARGETFLAGS) -g
|
---|
138 | LD2FLAGS = /nologo /noe /map:full /NoIgnoreCase /Linenumbers /packcode /packdata /exepack:2 /debug /nod $(LD2TARGETFLAGS)
|
---|
139 | LD2FLAGS_ODINCRT = /nologo /noe /map:full /NoIgnoreCase /Linenumbers /packcode /packdata /exepack:2 /debug $(LD2TARGETFLAGS)
|
---|
140 |
|
---|
141 |
|
---|
142 |
|
---|
143 | !else
|
---|
144 | #
|
---|
145 | # This is Patricks take at profiling.
|
---|
146 | # - Profile the DEBUG version of the system.
|
---|
147 | #
|
---|
148 |
|
---|
149 | #
|
---|
150 | # Tool Flags
|
---|
151 | #
|
---|
152 | ASFLAGS = -Mb -Sc -Sv:ALP +Od -D:DEBUG
|
---|
153 | IMPLIBFLAGS = /nologo
|
---|
154 | ILIBFLAGS = rcv
|
---|
155 | RCFLAGS = -s -I. -I$(CPPMAIN)\include
|
---|
156 | OS2RCFLAGS = -r -n
|
---|
157 | OS2RCLFLAGS = -x2 -n
|
---|
158 |
|
---|
159 |
|
---|
160 | #
|
---|
161 | # C Compiler flags.
|
---|
162 | # This may look a bit like a mess but, there is usually a reason behind
|
---|
163 | # every line and the way it is done. We have some problems with nmake
|
---|
164 | # when we add new flags to for example CXXFLAGS too many times.
|
---|
165 | #
|
---|
166 | !ifdef EXETARGET
|
---|
167 | CTARGETFLAGS = -Zexe
|
---|
168 | CXXTARGETFLAGS = -Zexe
|
---|
169 | !else
|
---|
170 | CTARGETFLAGS = -Zdll
|
---|
171 | CXXTARGETFLAGS = -Zdll
|
---|
172 | !endif
|
---|
173 | CXXEXCEPTIONS = -fhandle-exceptions
|
---|
174 | CFLAGS = -c -mprobe -pg -pipe -Wall -Zmt -g $(CTARGETFLAGS)
|
---|
175 | CXXFLAGS = -c -mprobe -pg -pipe -Wall -Zmt -g $(CXXTARGETFLAGS)
|
---|
176 | CXXFLAGS_ODINCRT = -c -mprobe -pg -pipe -Wall -Zmt -g $(CXXTARGETFLAGS)
|
---|
177 | CFLAGS_WIN32APP = -c -mprobe -pg -pipe -Wall -Zmt -g $(CTARGETFLAGS)
|
---|
178 | CXXFLAGS_WIN32APP= -c -mprobe -pg -pipe -Wall -Zmt -g $(CXXTARGETFLAGS) $(CXXEXCEPTIONS)
|
---|
179 | CINCLUDES = -I$(ODIN32_INCLUDE)\Win -I. -I$(ODIN32_INCLUDE)
|
---|
180 | CDEFINES_WIN32APP= -DDEBUG -DPROFILE -D__WIN32OS2__ -D__i386__
|
---|
181 | CDEFINES_ODINCRT = -DDEBUG -DPROFILE -D__WIN32OS2__ -D__i386__ -D__WINE__
|
---|
182 | CDEFINES = -DDEBUG -DPROFILE -D__WIN32OS2__ -D__i386__ -D__WINE__ -DTCPV40HDRS -DCOMCTL32UNDOC \
|
---|
183 | !ifdef DEBUGALL
|
---|
184 | -DDEBUG_ENABLELOG_LEVEL2 \
|
---|
185 | !endif
|
---|
186 | !ifdef NODEBUGINFO
|
---|
187 | -DDEFAULT_LOGGING_OFF
|
---|
188 | !endif
|
---|
189 |
|
---|
190 |
|
---|
191 | #
|
---|
192 | # Linker flags.
|
---|
193 | # This may look a bit like a mess but, there is usually a reason behind
|
---|
194 | # every line and the way it is done. We have some problems with nmake
|
---|
195 | # when we add new flags to for example LD2FLAGS too many times.
|
---|
196 | #
|
---|
197 | !ifdef EXETARGET
|
---|
198 | ! ifdef VIO
|
---|
199 | LDTARGETFLAGS = -Zexe /Zstack 80
|
---|
200 | LD2TARGETFLAGS = -Zexe /Zstack 80
|
---|
201 | ! else
|
---|
202 | LDTARGETFLAGS = -Zexe /Zstack 80
|
---|
203 | LD2TARGETFLAGS = -Zexe /Zstack 80
|
---|
204 | ! endif
|
---|
205 | !else
|
---|
206 | LDTARGETFLAGS = -Zdll
|
---|
207 | LD2TARGETFLAGS = -Zdll -Zso -Zsys
|
---|
208 | !endif
|
---|
209 | !ifdef NODEBUGINFO
|
---|
210 | LDFLAGS = -Zmt -Zomf -Zmap -Zlinker "/MAP:FULL /Linenumbers /exepack:2 /Nod" $(LDTARGETFLAGS) -s
|
---|
211 | LDFLAGS_ODINCRT = -Zmt -Zomf -Zmap -Zlinker "/MAP:FULL /Linenumbers /exepack:2 " $(LDTARGETFLAGS) -s
|
---|
212 | LD2FLAGS = /nologo /noe /map:full /NoIgnoreCase /Linenumbers /packcode /packdata /exepack:2 /nodebug /nod $(LD2TARGETFLAGS)
|
---|
213 | LD2FLAGS_ODINCRT = /nologo /noe /map:full /NoIgnoreCase /Linenumbers /packcode /packdata /exepack:2 /nodebug $(LD2TARGETFLAGS)
|
---|
214 | !else
|
---|
215 | LDFLAGS = -Zmt -Zomf -Zmap -Zlinker "/MAP:FULL /Linenumbers /exepack:2 /Nod" $(LDTARGETFLAGS) -g
|
---|
216 | LDFLAGS_ODINCRT = -Zmt -Zomf -Zmap -Zlinker "/MAP:FULL /Linenumbers /exepack:2 " $(LDTARGETFLAGS) -g
|
---|
217 | LD2FLAGS = /nologo /noe /map:full /NoIgnoreCase /Linenumbers /packcode /packdata /exepack:2 /debug /nod $(LD2TARGETFLAGS)
|
---|
218 | LD2FLAGS_ODINCRT = /nologo /noe /map:full /NoIgnoreCase /Linenumbers /packcode /packdata /exepack:2 /debug $(LD2TARGETFLAGS)
|
---|
219 | !endif
|
---|
220 |
|
---|
221 | !endif
|
---|