Subversion Repositories gelsvn

Rev

Rev 107 | Go to most recent revision | Details | Compare with Previous | 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)%>
198 bj 64
NAME         = <%libname_prefix%><%sharedname%>$(OLIBMODIFIER)
107 bj 65
<%else%>
66
<%if(staticname)%>
198 bj 67
NAME         = <%libname_prefix%><%staticname%>$(OLIBMODIFIER)
107 bj 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))%>
198 bj 99
           <%libname_prefix%><%lib%>$(ILIBMODIFIER)$(LIB_EXT) \
107 bj 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%>
198 bj 114
<%if(includes)%>
115
 
116
RC_FLAGS = \
117
<%foreach(includes)%>
118
        -i"<%include%>"<%fornotlast(" \\")%>
119
<%endfor%>
107 bj 120
<%endif%>
198 bj 121
<%endif%>
122
<%if(pch_header)%>
107 bj 123
 
124
# Borland precompiled headers can choke on some header files.
125
# Set NO_USE_PCH if you do not want to use precompiled headers.
126
!ifndef NO_USE_PCH
127
PCH_CFLAGS = \
128
<%foreach(pch_defines)%>
129
             -D<%pch_define%> \
130
<%endfor%>
131
             -H=$(INTERMEDIATE)\<%noextension(project_name)%>.csm -Hh=<%pch_header%>
132
!endif
133
<%endif%>
134
 
135
CFLAGS = \
136
         $(PCH_CFLAGS) \
137
<%foreach(cc_flags)%>
138
         <%cc_flags%> \
139
<%endfor%>
140
<%foreach(common_flags)%>
141
         <%common_flags%> \
142
<%endfor%>
143
<%foreach(macros common_defines)%>
144
         -D<%macro%> \
145
<%endfor%>
146
<%if(type_is_static || need_staticflags)%>
147
<%if(staticflags)%>
148
<%foreach(staticflags)%>
149
         -D<%staticflag%> \
150
<%endfor%>
151
<%endif%>
152
<%else%>
153
<%if(dynamicflags)%>
154
<%foreach(dynamicflags)%>
155
         -D<%dynamicflag%> \
156
<%endfor%>
157
<%endif%>
158
<%endif%>
159
<%foreach(includes)%>
160
         -I"<%include%>" \
161
<%endfor%>
162
         $(DUMMY_VALUE_NOT_ENDING_IN_BACKSLASH)
163
 
164
<%marker(macros)%>
165
<%if(exename)%>
166
OUTPUTDIR = <%if(install)%><%install%>\\<%else%>$(EXEOUTPUTDIR)<%endif%>
167
all: $(OUTPUTDIR)$(NAME)$(EXE_EXT)<%if(postbuild)%> __postbuild__<%endif%>
168
 
169
$(OUTPUTDIR)$(NAME)$(EXE_EXT): $(OBJFILES) $(RESOURCE)
170
	@if not exist "$(OUTPUTDIR)" mkdir "$(OUTPUTDIR)"
171
	$(LINK) @&&!
172
	$(EXEFLAGS) $(LFLAGS) <%startup_obj%>$(UC_MAIN)$(OBJ_EXT) $(OBJFILES), $(OUTPUTDIR)$(NAME)$(EXE_EXT),, $(LIBFILES),, $(RESOURCE)
173
!
174
 
175
<%endif%>
176
<%if(sharedname)%>
177
OUTPUTDIR = <%if(dllout)%><%dllout%><%else%><%libout%><%endif%>\\
178
all: $(OUTPUTDIR)$(NAME)$(DLL_EXT)<%if(postbuild)%> __postbuild__<%endif%>
179
 
180
$(OUTPUTDIR)$(NAME)$(DLL_EXT): $(OBJFILES) $(RESOURCE)
181
	@if not exist "$(OUTPUTDIR)" mkdir "$(OUTPUTDIR)"
182
	$(LINK) @&&!
183
	$(DLLFLAGS) $(LFLAGS) <%startup_obj%>$(UC_MAIN)$(OBJ_EXT) $(OBJFILES), $(OUTPUTDIR)$(NAME)$(DLL_EXT),, $(LIBFILES),, $(RESOURCE)
184
!
185
 
186
<%endif%>
187
<%if(type_is_static && staticname)%>
188
OUTPUTDIR = <%libout%>\\
189
all: $(OUTPUTDIR)$(NAME)$(LIB_EXT)<%if(postbuild)%> __postbuild__<%endif%>
190
 
191
$(OUTPUTDIR)$(NAME)$(LIB_EXT): $(OBJFILES)
192
	@if not exist "$(OUTPUTDIR)" mkdir "$(OUTPUTDIR)"
193
	$(TLIB) $(LIBFLAGS) $(OUTPUTDIR)$(NAME)$(LIB_EXT) @&&!
194
+ $(**: = &^
195
+ )
196
!
197
 
198
<%endif%>
199
<%if(!exename && !sharedname && !staticname)%>
200
all:<%if(postbuild)%> __postbuild__<%endif%>
201
	@-rem
202
 
203
<%endif%>
204
<%if(custom_types)%>
205
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%>
206
<%foreach(custom_types)%>
207
<%foreach(custom_type->input_files)%>
208
<%if(custom_type->input_file->output_files)%>
209
<%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%>
210
<%if(flag_overrides(custom_type->input_file, gendir))%>
211
        @if not exist <%flag_overrides(custom_type->input_file, gendir)%> mkdir <%flag_overrides(custom_type->input_file, gendir)%>
212
<%endif%>
198 bj 213
	<%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%><%if(custom_type->output_option)%> <%custom_type->output_option%> $@<%endif%> <%custom_type->input_file%>
107 bj 214
<%if(flag_overrides(custom_type->input_file, postcommand))%>
215
<%foreach(custom_type->input_file)%>
216
	<%flag_overrides(custom_type->input_file, postcommand)%>
217
<%endfor%>
218
<%else%>
219
<%if(custom_type->postcommand)%>
220
<%foreach(custom_type->input_file)%>
221
	<%custom_type->postcommand%>
222
<%endfor%>
223
<%endif%>
224
<%endif%>
225
<%if(pch_header)%>
226
<%if(custom_type->pch_postrule)%>
227
<%foreach(custom_type->input_file->source_output_files)%>
228
	@echo \#include "<%pch_header%>" > temporary.src
229
	@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
230
	@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%>
231
<%endfor%>
232
<%endif%>
233
<%endif%>
234
 
235
<%endif%>
236
<%endfor%>
237
<%endfor%>
238
<%if(exename || sharedname || staticname)%>
239
<%if(source_files)%>
240
$(OBJFILES): $(GENERATED_DIRTY)
241
<%else%>
242
all: $(GENERATED_DIRTY)<%if(postbuild)%> __postbuild__<%endif%>
243
<%endif%>
244
<%else%>
245
all: $(GENERATED_DIRTY)<%if(postbuild)%> __postbuild__<%endif%>
246
<%endif%>
247
 
248
<%endif%>
249
generated: $(GENERATED_DIRTY)
250
	@-rem
251
 
252
.path$(OBJ_EXT) = $(INTERMEDIATE)
253
 
254
.path.cpp = $(CPPDIR)
255
.cpp$(OBJ_EXT):
256
	@if not exist "$(INTERMEDIATE)" mkdir "$(INTERMEDIATE)"
257
        $(CC) $(OCFLAGS) $(CG_CFLAGS) $(UC_CFLAGS) $(THREADFLAGS) $(CCFLAGS) $(CFLAGS) $(WARNFLAGS) -c -n$(@D) $<
258
 
259
.path.cxx = $(CPPDIR)
260
.cxx$(OBJ_EXT):
261
	@if not exist "$(INTERMEDIATE)" mkdir "$(INTERMEDIATE)"
262
        $(CC) $(OCFLAGS) $(CG_CFLAGS) $(UC_CFLAGS) $(THREADFLAGS) $(CCFLAGS) $(CFLAGS) $(WARNFLAGS) -c -n$(@D) $<
263
 
264
.path.cc = $(CPPDIR)
265
.cc$(OBJ_EXT):
266
	@if not exist "$(INTERMEDIATE)" mkdir "$(INTERMEDIATE)"
267
        $(CC) $(OCFLAGS) $(CG_CFLAGS) $(UC_CFLAGS) $(THREADFLAGS) $(CCFLAGS) $(CFLAGS) $(WARNFLAGS) -c -n$(@D) $<
268
 
269
.path.C = $(CPPDIR)
270
.C$(OBJ_EXT):
271
	@if not exist "$(INTERMEDIATE)" mkdir "$(INTERMEDIATE)"
272
        $(CC) $(OCFLAGS) $(CG_CFLAGS) $(UC_CFLAGS) $(THREADFLAGS) $(CCFLAGS) $(CFLAGS) $(WARNFLAGS) -c -n$(@D) $<
273
 
274
.path.c = $(CPPDIR)
275
.c$(OBJ_EXT):
276
	@if not exist "$(INTERMEDIATE)" mkdir "$(INTERMEDIATE)"
277
        $(CC) $(OCFLAGS) $(CG_CFLAGS) $(UC_CFLAGS) $(THREADFLAGS) $(CCFLAGS) $(CFLAGS) $(WARNFLAGS) -c -n$(@D) $<
278
 
279
<%foreach(source_files)%>
280
<%if(dirname(source_file))%>
281
"$(INTERMEDIATE)\<%noextension(source_file)%>$(OBJ_EXT)":
282
	@if not exist "$(INTERMEDIATE)\<%dirname(source_file)%>" mkdir "$(INTERMEDIATE)\<%dirname(source_file)%>"
283
	$(CC) $(OCFLAGS) $(CG_CFLAGS) $(UC_CFLAGS) $(THREADFLAGS) $(CCFLAGS) $(CFLAGS) $(WARNFLAGS) -c -n$(@D) <%source_file%>
284
 
285
<%endif%>
286
<%endfor%>
287
<%if(resource_files && !type_is_static)%>
288
.path.res = $(INTERMEDIATE)
289
 
290
.path.rc = $(RESDIR)
291
.rc.res:
292
	@if not exist "$(INTERMEDIATE)" mkdir "$(INTERMEDIATE)"
198 bj 293
        $(RC) $(RC_FLAGS) -fo$@ $<
107 bj 294
 
295
<%foreach(resource_files)%>
296
<%if(dirname(resource_file))%>
297
"$(INTERMEDIATE)\<%noextension(resource_file)%>.res":
298
	@if not exist "$(INTERMEDIATE)\<%dirname(resource_file)%>" mkdir "$(INTERMEDIATE)\<%dirname(resource_file)%>"
299
	$(RC) -fo$@ <%resource_file%>
300
 
301
<%endif%>
302
<%endfor%>
303
<%endif%>
304
clean:
305
	if exist "$(INTERMEDIATE)" rmdir /s/q $(INTERMEDIATE)
306
 
307
realclean: clean
308
<%foreach(custom_types)%>
309
<%foreach(custom_type->input_files)%>
310
<%if(custom_type->input_file->output_files)%>
311
<%foreach(custom_type->input_file->output_files)%>
312
<%if(flag_overrides(custom_type->input_file, gendir))%>
313
	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)%>
314
<%else%>
315
	if exist "<%custom_type->input_file->output_file%>" del <%custom_type->input_file->output_file%>
316
<%endif%>
317
<%endfor%>
318
<%endif%>
319
<%endfor%>
320
<%endfor%>
321
<%if(exename)%>
322
	if exist "$(OUTPUTDIR)$(NAME)$(EXE_EXT)" del $(OUTPUTDIR)$(NAME)$(EXE_EXT)
323
<%else%>
324
<%if(sharedname)%>
325
        if exist "$(OUTPUTDIR)$(NAME)$(DLL_EXT)" del $(OUTPUTDIR)$(NAME)$(DLL_EXT)
326
<%endif%>
327
<%if(staticname)%>
328
	if exist "$(OUTPUTDIR)$(NAME)$(LIB_EXT)" del $(OUTPUTDIR)$(NAME)$(LIB_EXT)
329
<%endif%>
330
<%endif%>
331
<%if(exename || sharedname || staticname)%>
332
        if exist "$(OUTPUTDIR)$(NAME)$(POSTLINKRM)" del $(OUTPUTDIR)$(NAME)$(POSTLINKRM)
333
<%endif%>
334
 
335
<%if(postbuild)%>
336
__postbuild__:
337
	@<%eval(postbuild)%>
338
 
339
<%endif%>
340
<%marker(local)%>
341
<%marker(bottom)%>