Subversion Repositories gelsvn

Rev

Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
107 bj 1
#----------------------------------------------------------------------------
2
#       Borland Makefile
3
#
4
# This file was automatically generated by MPC.  Any changes made directly to
5
# this file will be lost the next time it is generated.
6
#
7
#----------------------------------------------------------------------------
8
<%marker(top)%>
9
<%foreach(configurations)%>
10
!ifdef <%uc(configuration)%>
11
OCFLAGS      = <%if(optimize)%>-O2<%else%>-v -y -Od -vi- -k<%endif%><%foreach(defines debug_macros)%> -D<%define%><%endfor%>
12
CFG_DIR      = <%intermediate_dir%>\\
13
ILIBMODIFIER = <%lib_modifier%>
14
OLIBMODIFIER = <%if(use_lib_modifier)%><%lib_modifier%><%endif%>
15
EXEMODIFIER  = <%if(use_exe_modifier)%><%lib_modifier%><%endif%>
16
<%if(postlinkrmext)%>
17
POSTLINKRM   = <%postlinkrmext%>
18
<%endif%>
19
<%if(exename)%>
20
EXEOUTPUTDIR = <%exeoutputdir(".")%>\\
21
<%endif%>
22
!else
23
<%endfor%>
24
!error You must define one of these valid configurations: <%configurations%>
25
<%foreach(configurations)%>
26
!endif
27
<%endfor%>
28
 
29
!ifdef UNICODE
30
UC_CFLAGS    = <%unicode_flags%>
31
UNICODE_DIR  = Unicode\\
32
UC_MAIN      = w
33
!endif
34
 
35
!ifdef CODEGUARD
36
CG_CFLAGS = -vG
37
CG_LIB    = cg32.lib
38
!endif
39
 
40
<%foreach(compilers)%>
41
<%fornotlast("!ifdef")%><%forlast("!else #")%> <%uc(compiler)%>
42
OBJ_EXT      = <%obj_ext%>
43
DLL_EXT      = <%dll_ext%>
44
LIB_EXT      = <%lib_ext%>
45
EXE_EXT      = <%exe_ext%>
46
CC           = <%cc%>
47
RC           = <%rc%>
48
LINK         = <%link%>
49
TLIB         = <%tlib%>
50
THREADFLAGS  = <%thflags%>
51
DLLFLAGS     = <%dllflags%>
52
LIBFLAGS     = <%libflags%>
53
EXEFLAGS     = <%exeflags%>
54
WARNFLAGS    = <%warnflags%>
55
CCFLAGS      = <%ccflags%><%if(compile_flags)%> <%compile_flags%><%endif%>
56
<%endfor%>
57
!endif
58
 
59
INTERMEDIATE = $(CFG_DIR)$(UNICODE_DIR)<%noextension(project_name)%>
60
<%if(exename)%>
61
NAME         = <%exename%>$(EXEMODIFIER)
62
<%else%>
63
<%if(sharedname)%>
64
NAME         = <%sharedname%>$(OLIBMODIFIER)
65
<%else%>
66
<%if(staticname)%>
67
NAME         = <%staticname%>$(OLIBMODIFIER)
68
<%endif%>
69
<%endif%>
70
<%endif%>
71
CPPDIR       = <%cppdir%>
72
RESDIR       = <%rcdir%>
73
<%if(exename || sharedname || staticname)%>
74
 
75
OBJFILES = \
76
<%foreach(source_files)%>
77
           "$(INTERMEDIATE)\<%if(dirname(source_file))%><%noextension(source_file)%><%else%><%basenoextension(source_file)%><%endif%>$(OBJ_EXT)"<%fornotlast(" \\")%>
78
<%endfor%>
79
<%endif%>
80
<%if(libpaths)%>
81
 
82
LFLAGS   = \
83
<%if(StackReserveSize)%>
84
           /S:<%StackReserveSize%> \
85
<%endif%>
86
<%if(StackCommitSize)%>
87
           /Sc:<%StackCommitSize%> \
88
<%endif%>
89
<%if(!optimize)%>
90
           -v<%if(libpaths)%> \<%endif%>
91
<%endif%>
92
<%foreach(libpaths)%>
93
           -L"<%libpath%>" -j"<%libpath%>"<%fornotlast(" \\")%>
94
<%endfor%>
95
<%endif%>
96
 
97
LIBFILES = \
98
<%foreach(reverse(libs))%>
99
           <%lib%>$(ILIBMODIFIER)$(LIB_EXT) \
100
<%endfor%>
101
<%foreach(reverse(lit_libs))%>
102
           <%lit_lib%>$(LIB_EXT) \
103
<%endfor%>
104
<%foreach(reverse(pure_libs))%>
105
           <%pure_lib%> \
106
<%endfor%>
107
           $(CG_LIB) <%common_libs%>
108
<%if(resource_files && !type_is_static)%>
109
 
110
RESOURCE = \
111
<%foreach(resource_files)%>
112
           $(INTERMEDIATE)\<%noextension(resource_file)%>.res<%fornotlast(" \\")%>
113
<%endfor%>
114
<%endif%>
115
 
116
<%if(pch_header)%>
117
# Borland precompiled headers can choke on some header files.
118
# Set NO_USE_PCH if you do not want to use precompiled headers.
119
!ifndef NO_USE_PCH
120
PCH_CFLAGS = \
121
<%foreach(pch_defines)%>
122
             -D<%pch_define%> \
123
<%endfor%>
124
             -H=$(INTERMEDIATE)\<%noextension(project_name)%>.csm -Hh=<%pch_header%>
125
!endif
126
<%endif%>
127
 
128
CFLAGS = \
129
         $(PCH_CFLAGS) \
130
<%foreach(cc_flags)%>
131
         <%cc_flags%> \
132
<%endfor%>
133
<%foreach(common_flags)%>
134
         <%common_flags%> \
135
<%endfor%>
136
<%foreach(macros common_defines)%>
137
         -D<%macro%> \
138
<%endfor%>
139
<%if(type_is_static || need_staticflags)%>
140
<%if(staticflags)%>
141
<%foreach(staticflags)%>
142
         -D<%staticflag%> \
143
<%endfor%>
144
<%endif%>
145
<%else%>
146
<%if(dynamicflags)%>
147
<%foreach(dynamicflags)%>
148
         -D<%dynamicflag%> \
149
<%endfor%>
150
<%endif%>
151
<%endif%>
152
<%foreach(includes)%>
153
         -I"<%include%>" \
154
<%endfor%>
155
         $(DUMMY_VALUE_NOT_ENDING_IN_BACKSLASH)
156
 
157
<%marker(macros)%>
158
<%if(exename)%>
159
OUTPUTDIR = <%if(install)%><%install%>\\<%else%>$(EXEOUTPUTDIR)<%endif%>
160
all: $(OUTPUTDIR)$(NAME)$(EXE_EXT)<%if(postbuild)%> __postbuild__<%endif%>
161
 
162
$(OUTPUTDIR)$(NAME)$(EXE_EXT): $(OBJFILES) $(RESOURCE)
163
	@if not exist "$(OUTPUTDIR)" mkdir "$(OUTPUTDIR)"
164
	$(LINK) @&&!
165
	$(EXEFLAGS) $(LFLAGS) <%startup_obj%>$(UC_MAIN)$(OBJ_EXT) $(OBJFILES), $(OUTPUTDIR)$(NAME)$(EXE_EXT),, $(LIBFILES),, $(RESOURCE)
166
!
167
 
168
<%endif%>
169
<%if(sharedname)%>
170
OUTPUTDIR = <%if(dllout)%><%dllout%><%else%><%libout%><%endif%>\\
171
all: $(OUTPUTDIR)$(NAME)$(DLL_EXT)<%if(postbuild)%> __postbuild__<%endif%>
172
 
173
$(OUTPUTDIR)$(NAME)$(DLL_EXT): $(OBJFILES) $(RESOURCE)
174
	@if not exist "$(OUTPUTDIR)" mkdir "$(OUTPUTDIR)"
175
	$(LINK) @&&!
176
	$(DLLFLAGS) $(LFLAGS) <%startup_obj%>$(UC_MAIN)$(OBJ_EXT) $(OBJFILES), $(OUTPUTDIR)$(NAME)$(DLL_EXT),, $(LIBFILES),, $(RESOURCE)
177
!
178
 
179
<%endif%>
180
<%if(type_is_static && staticname)%>
181
OUTPUTDIR = <%libout%>\\
182
all: $(OUTPUTDIR)$(NAME)$(LIB_EXT)<%if(postbuild)%> __postbuild__<%endif%>
183
 
184
$(OUTPUTDIR)$(NAME)$(LIB_EXT): $(OBJFILES)
185
	@if not exist "$(OUTPUTDIR)" mkdir "$(OUTPUTDIR)"
186
	$(TLIB) $(LIBFLAGS) $(OUTPUTDIR)$(NAME)$(LIB_EXT) @&&!
187
+ $(**: = &^
188
+ )
189
!
190
 
191
<%endif%>
192
<%if(!exename && !sharedname && !staticname)%>
193
all:<%if(postbuild)%> __postbuild__<%endif%>
194
	@-rem
195
 
196
<%endif%>
197
<%if(custom_types)%>
198
GENERATED_DIRTY =<%foreach(custom_types)%><%foreach(custom_type->input_files)%><%if(custom_type->input_file->output_files)%><%foreach(custom_type->input_file->output_files)%> <%if(flag_overrides(custom_type->input_file, gendir))%><%flag_overrides(custom_type->input_file, gendir)%>\<%basename(custom_type->input_file->output_file)%><%else%><%custom_type->input_file->output_file%><%endif%><%endfor%><%endif%><%endfor%><%endfor%>
199
<%foreach(custom_types)%>
200
<%foreach(custom_type->input_files)%>
201
<%if(custom_type->input_file->output_files)%>
202
<%foreach(custom_type->input_file->output_files)%><%if(flag_overrides(custom_type->input_file, gendir))%><%flag_overrides(custom_type->input_file, gendir)%>\<%basename(custom_type->input_file->output_file)%><%else%><%custom_type->input_file->output_file%><%endif%><%fornotlast(" ")%><%endfor%>: <%custom_type->input_file%><%if(custom_type->input_file->dependencies)%> <%custom_type->input_file->dependencies%><%endif%>
203
<%if(flag_overrides(custom_type->input_file, gendir))%>
204
        @if not exist <%flag_overrides(custom_type->input_file, gendir)%> mkdir <%flag_overrides(custom_type->input_file, gendir)%>
205
<%endif%>
206
	<%if(flag_overrides(custom_type->input_file, command))%><%flag_overrides(custom_type->input_file, command)%><%else%><%custom_type->command%><%endif%> <%if(flag_overrides(custom_type->input_file, commandflags))%><%flag_overrides(custom_type->input_file, commandflags)%><%else%><%custom_type->commandflags%><%endif%> <%custom_type->input_file%> <%if(custom_type->output_option)%><%custom_type->output_option%> $@<%endif%>
207
<%if(flag_overrides(custom_type->input_file, postcommand))%>
208
<%foreach(custom_type->input_file)%>
209
	<%flag_overrides(custom_type->input_file, postcommand)%>
210
<%endfor%>
211
<%else%>
212
<%if(custom_type->postcommand)%>
213
<%foreach(custom_type->input_file)%>
214
	<%custom_type->postcommand%>
215
<%endfor%>
216
<%endif%>
217
<%endif%>
218
<%if(pch_header)%>
219
<%if(custom_type->pch_postrule)%>
220
<%foreach(custom_type->input_file->source_output_files)%>
221
	@echo \#include "<%pch_header%>" > temporary.src
222
	@type <%if(flag_overrides(custom_type->input_file, gendir))%><%flag_overrides(custom_type->input_file, gendir)%>\<%basename(custom_type->input_file->source_output_file)%><%else%><%custom_type->input_file->source_output_file%><%endif%> >> temporary.src
223
	@move /y temporary.src <%if(flag_overrides(custom_type->input_file, gendir))%><%flag_overrides(custom_type->input_file, gendir)%>\<%basename(custom_type->input_file->source_output_file)%><%else%><%custom_type->input_file->source_output_file%><%endif%>
224
<%endfor%>
225
<%endif%>
226
<%endif%>
227
 
228
<%endif%>
229
<%endfor%>
230
<%endfor%>
231
<%if(exename || sharedname || staticname)%>
232
<%if(source_files)%>
233
$(OBJFILES): $(GENERATED_DIRTY)
234
<%else%>
235
all: $(GENERATED_DIRTY)<%if(postbuild)%> __postbuild__<%endif%>
236
<%endif%>
237
<%else%>
238
all: $(GENERATED_DIRTY)<%if(postbuild)%> __postbuild__<%endif%>
239
<%endif%>
240
 
241
<%endif%>
242
generated: $(GENERATED_DIRTY)
243
	@-rem
244
 
245
.path$(OBJ_EXT) = $(INTERMEDIATE)
246
 
247
.path.cpp = $(CPPDIR)
248
.cpp$(OBJ_EXT):
249
	@if not exist "$(INTERMEDIATE)" mkdir "$(INTERMEDIATE)"
250
        $(CC) $(OCFLAGS) $(CG_CFLAGS) $(UC_CFLAGS) $(THREADFLAGS) $(CCFLAGS) $(CFLAGS) $(WARNFLAGS) -c -n$(@D) $<
251
 
252
.path.cxx = $(CPPDIR)
253
.cxx$(OBJ_EXT):
254
	@if not exist "$(INTERMEDIATE)" mkdir "$(INTERMEDIATE)"
255
        $(CC) $(OCFLAGS) $(CG_CFLAGS) $(UC_CFLAGS) $(THREADFLAGS) $(CCFLAGS) $(CFLAGS) $(WARNFLAGS) -c -n$(@D) $<
256
 
257
.path.cc = $(CPPDIR)
258
.cc$(OBJ_EXT):
259
	@if not exist "$(INTERMEDIATE)" mkdir "$(INTERMEDIATE)"
260
        $(CC) $(OCFLAGS) $(CG_CFLAGS) $(UC_CFLAGS) $(THREADFLAGS) $(CCFLAGS) $(CFLAGS) $(WARNFLAGS) -c -n$(@D) $<
261
 
262
.path.C = $(CPPDIR)
263
.C$(OBJ_EXT):
264
	@if not exist "$(INTERMEDIATE)" mkdir "$(INTERMEDIATE)"
265
        $(CC) $(OCFLAGS) $(CG_CFLAGS) $(UC_CFLAGS) $(THREADFLAGS) $(CCFLAGS) $(CFLAGS) $(WARNFLAGS) -c -n$(@D) $<
266
 
267
.path.c = $(CPPDIR)
268
.c$(OBJ_EXT):
269
	@if not exist "$(INTERMEDIATE)" mkdir "$(INTERMEDIATE)"
270
        $(CC) $(OCFLAGS) $(CG_CFLAGS) $(UC_CFLAGS) $(THREADFLAGS) $(CCFLAGS) $(CFLAGS) $(WARNFLAGS) -c -n$(@D) $<
271
 
272
<%foreach(source_files)%>
273
<%if(dirname(source_file))%>
274
"$(INTERMEDIATE)\<%noextension(source_file)%>$(OBJ_EXT)":
275
	@if not exist "$(INTERMEDIATE)\<%dirname(source_file)%>" mkdir "$(INTERMEDIATE)\<%dirname(source_file)%>"
276
	$(CC) $(OCFLAGS) $(CG_CFLAGS) $(UC_CFLAGS) $(THREADFLAGS) $(CCFLAGS) $(CFLAGS) $(WARNFLAGS) -c -n$(@D) <%source_file%>
277
 
278
<%endif%>
279
<%endfor%>
280
<%if(resource_files && !type_is_static)%>
281
.path.res = $(INTERMEDIATE)
282
 
283
.path.rc = $(RESDIR)
284
.rc.res:
285
	@if not exist "$(INTERMEDIATE)" mkdir "$(INTERMEDIATE)"
286
	$(RC) -fo$@ $<
287
 
288
<%foreach(resource_files)%>
289
<%if(dirname(resource_file))%>
290
"$(INTERMEDIATE)\<%noextension(resource_file)%>.res":
291
	@if not exist "$(INTERMEDIATE)\<%dirname(resource_file)%>" mkdir "$(INTERMEDIATE)\<%dirname(resource_file)%>"
292
	$(RC) -fo$@ <%resource_file%>
293
 
294
<%endif%>
295
<%endfor%>
296
<%endif%>
297
clean:
298
	if exist "$(INTERMEDIATE)" rmdir /s/q $(INTERMEDIATE)
299
 
300
realclean: clean
301
<%foreach(custom_types)%>
302
<%foreach(custom_type->input_files)%>
303
<%if(custom_type->input_file->output_files)%>
304
<%foreach(custom_type->input_file->output_files)%>
305
<%if(flag_overrides(custom_type->input_file, gendir))%>
306
	if exist "<%flag_overrides(custom_type->input_file, gendir)%>\<%basename(custom_type->input_file->output_file)%>" del <%flag_overrides(custom_type->input_file, gendir)%>\<%basename(custom_type->input_file->output_file)%>
307
<%else%>
308
	if exist "<%custom_type->input_file->output_file%>" del <%custom_type->input_file->output_file%>
309
<%endif%>
310
<%endfor%>
311
<%endif%>
312
<%endfor%>
313
<%endfor%>
314
<%if(exename)%>
315
	if exist "$(OUTPUTDIR)$(NAME)$(EXE_EXT)" del $(OUTPUTDIR)$(NAME)$(EXE_EXT)
316
<%else%>
317
<%if(sharedname)%>
318
        if exist "$(OUTPUTDIR)$(NAME)$(DLL_EXT)" del $(OUTPUTDIR)$(NAME)$(DLL_EXT)
319
<%endif%>
320
<%if(staticname)%>
321
	if exist "$(OUTPUTDIR)$(NAME)$(LIB_EXT)" del $(OUTPUTDIR)$(NAME)$(LIB_EXT)
322
<%endif%>
323
<%endif%>
324
<%if(exename || sharedname || staticname)%>
325
        if exist "$(OUTPUTDIR)$(NAME)$(POSTLINKRM)" del $(OUTPUTDIR)$(NAME)$(POSTLINKRM)
326
<%endif%>
327
 
328
<%if(postbuild)%>
329
__postbuild__:
330
	@<%eval(postbuild)%>
331
 
332
<%endif%>
333
<%marker(local)%>
334
<%marker(bottom)%>