Rename UNICODE to ACE_UNICODE
[MPC.git] / templates / bmake.mpd
blob63dfa5768aa0c42b2e2f100ce80d2d538e528874
1 #----------------------------------------------------------------------------
2 #       Borland Makefile
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.
7 #----------------------------------------------------------------------------
8 <%marker(top)%>
9 <%foreach(compilers)%>
10 !ifdef <%normalize(uc(compiler))%>
11 CC = <%cc%>
12 OPTIMIZE_CFLAGS = <%optimize_flags%>
13 UNICODE_CFLAGS = <%unicode_flags%>
14 PDB_FLAGS = <%pdb_flags%>
15 DEBUG_CFLAGS = <%debug_flags%>
16 RELEASE_CFLAGS = <%release_flags%>
17 CC_CFLAGS = <%ccflags%>
18 STACK_LFLAG = <%stack_flag%>
19 WARN_FLAGS = <%warn_flags%>
20 BINARY_FLAGS = <%binary_flags%>
21 THREAD_FLAGS = <%thr_flags%>
22 LIB_EXT = <%lib_ext%>
23 COMMON_DEFINES =<%foreach(common_defines)%> -D<%common_define%><%endfor%>
24 COMMON_FLAGS = <%foreach(common_flags)%><%common_flag%><%endfor%>
25 PLATFORM_LIBS_PREFIX = <%platform_libs_prefix%>
26 OBJ_EXT = <%obj_ext%>
27 LINKER_PATHS = <%linker_paths%>
28 LINKER_PASSTHROUGH = <%linker_passthrough%>
29 STARTUP_BITS = <%startup_bits%>
30 LINK = <%link%>
31 COMMON_LIBS = <%common_libs%>
32 TLIB = <%tlib%>
33 DLLFLAGS = <%dllflags%>
34 <%if(pch)%>PCH = 1<%endif%>
35 <%if(objectsearchpath)%>
36 OBJECTSEARCHPATH = \
37 <%foreach(libpaths)%>
38    -j"<%libpath%>"<%fornotlast(" \\")%>
39 <%endfor%>
40 <%endif%>
41 EXEFLAGS = <%exeflags%>
42 LINKER_DLL_ARGUMENTS = <%linker_dll_arguments%>
43 LINKER_EXE_ARGUMENTS = <%linker_exe_arguments%>
44 DEBUG_EXT = <%debug_ext%>
45 !else
46 <%endfor%>
47 !error You must select one of these compilers:<%foreach(compilers)%> <%normalize(uc(compiler))%><%endfor%>
48 <%foreach(compilers)%>
49 !endif
50 <%endfor%>
52 <%foreach(configurations)%>
53 !ifdef <%normalize(uc(configuration))%>
54 OCFLAGS = <%if(optimize)%>$(OPTIMIZE_CFLAGS) <%else%><%if(debug_prj)%>$(DEBUG_CFLAGS)<%foreach(debug_macros)%> -D<%debug_macro%><%endfor%><%endif%><%endif%><%foreach(defines)%> -D<%define%><%endfor%><%if(!debug_prj)%> $(RELEASE_CFLAGS)<%endif%>
55 LFLAGS =<%if(debug_prj)%> $(PDB_FLAGS)<%endif%>
56 CFG_DIR = <%intermediate_dir%>\\
57 LIBMODIFIER = <%if(use_lib_modifier)%><%lib_modifier%><%endif%>
58 EXEMODIFIER = <%if(use_exe_modifier)%><%lib_modifier%><%endif%>
59 <%if(type_is_static)%>
60 STATIC_CFG = 1
61 <%endif%>
62 <%if(type_is_static || need_staticflags)%>
63 <%if(staticflags)%>
64 STATIC_FLAGS =<%foreach(staticflags)%> -D<%staticflag%><%endfor%>
65 <%endif%>
66 <%else%>
67 <%if(dynamicflags)%>
68 DYN_FLAGS =<%foreach(dynamicflags)%> -D<%dynamicflag%><%endfor%>
69 <%endif%>
70 <%endif%>
71 <%if(exename)%>
72 EXEOUTPUTDIR = <%if(exeout)%><%exeout%><%if(windows_style)%>\<%output_dir("Debug")%><%endif%><%else%><%if(windows_style)%><%output_dir("Debug")%><%else%><%output_dir(".")%><%endif%><%endif%>\\
73 <%endif%>
74 !else
75 <%endfor%>
76 !error You must define one of these valid configurations:<%foreach(configurations)%> <%normalize(uc(configuration))%><%endfor%>
77 <%foreach(configurations)%>
78 !endif
79 <%endfor%>
81 !ifdef ACE_UNICODE
82 UC_CFLAGS    = $(UNICODE_CFLAGS)
83 UNICODE_DIR  = Unicode\\
84 UC_MAIN      = w
85 ULIBMODIFIER = <%unicode_lib_modifier%>
86 UEXEMODIFIER = <%unicode_lib_modifier%>
87 !endif
89 !ifdef CODEGUARD
90 CG_CFLAGS = -vG
91 CG_LIB    = cg32.lib
92 !endif
94 DLL_EXT      = <%dll_ext%>
95 EXE_EXT      = <%exe_ext%>
96 RC           = <%rc%>
97 LIBFLAGS     = <%libflags%>
98 CCFLAGS      = $(CC_CFLAGS)<%if(type_is_binary)%> $(BINARY_FLAGS)<%endif%><%if(compile_flags)%> <%compile_flags%><%endif%>
100 <%if(use_vcl)%>
101 STARTUP_LETTER = <%if(exename)%>w<%else%><%startup_letter%><%endif%>
102 <%else%>
103 VCL_CFLAGS     = -D_NO_VCL
104 STARTUP_LETTER = <%startup_letter%>
105 <%endif%>
106 STARTUP_OBJ    = c0$(STARTUP_LETTER)$(STARTUP_BITS)$(UC_MAIN)$(OBJ_EXT)
108 INTERMEDIATE = $(CFG_DIR)$(UNICODE_DIR)<%noextension(project_name)%>
109 <%if(exename)%>
110 NAME         = <%exename%>$(EXEMODIFIER)
111 <%else%>
112 <%if(sharedname)%>
113 NAME         = <%libname_prefix%><%sharedname%>$(LIBMODIFIER)$(ULIBMODIFIER)
114 <%else%>
115 <%if(staticname)%>
116 NAME         = <%libname_prefix%><%staticname%>$(LIBMODIFIER)$(ULIBMODIFIER)
117 <%endif%>
118 <%endif%>
119 <%endif%>
120 CPPDIR       = <%cppdir%>
121 RESDIR       = <%rcdir%>
122 <%if(exename || sharedname || staticname)%>
124 OBJFILES = \
125 <%foreach(source_files)%>
126            "$(INTERMEDIATE)\<%transdir(source_file)%><%basenoextension(source_file)%>$(OBJ_EXT)"<%fornotlast(" \\")%>
127 <%endfor%>
128 <%endif%>
129 <%if(libpaths)%>
131 LFLAGS   = \
132            $(LFLAGS) \
133            $(LINKER_PATHS) \
134 <%if(debug_prj)%>
135            -v \
136            -r \
137 <%endif%>
138 <%if(linkflags)%>
139         <%linkflags%> \
140 <%endif%>
141 <%if(StackReserveSize)%>
142            $(STACK_LFLAG)<%StackReserveSize%> \
143 <%endif%>
144 <%if(StackCommitSize)%>
145            /Sc:<%StackCommitSize%> \
146 <%endif%>
147 <%if(!optimize)%>
148            -v<%if(libpaths)%> \<%endif%>
149 <%endif%>
150 <%foreach(libpaths)%>
151            -L"<%libpath%>" \
152 <%endfor%>
153            $(OBJECTSEARCHPATH)
154 <%endif%>
156 LIBFILES = \
157 <%foreach(reverse(libs))%>
158            $(LINKER_PASSTHROUGH) <%libname_prefix%><%lib%>$(LIBMODIFIER)$(ULIBMODIFIER)$(LIB_EXT) \
159 <%endfor%>
160 <%foreach(reverse(lit_libs))%>
161            $(LINKER_PASSTHROUGH) <%lit_lib%>$(LIB_EXT) \
162 <%endfor%>
163 <%foreach(reverse(platform_libs))%>
164            $(PLATFORM_LIBS_PREFIX)<%platform_libs%> \
165 <%endfor%>
166 <%foreach(reverse(pure_libs))%>
167            <%pure_lib%> \
168 <%endfor%>
169            $(COMMON_LIBS)
171 <%if(resource_files)%>
173 !ifndef STATIC_CFG
174 RESOURCE = \
175 <%foreach(resource_files)%>
176            $(INTERMEDIATE)\<%transdir(resource_file)%><%basenoextension(resource_file)%>.res<%fornotlast(" \\")%>
177 <%endfor%>
178 <%if(includes)%>
180 RC_FLAGS = \
181 <%foreach(includes)%>
182         -i"<%include%>"<%fornotlast(" \\")%>
183 <%endfor%>
184 <%endif%>
185 !endif
186 <%endif%>
188 <%if(pch_header)%>
189 # Set NO_USE_PCH if you do not want to use precompiled headers.
190 !ifndef NO_USE_PCH
191 !ifdef PCH
192 PCH_CFLAGS = <%foreach(pch_defines)%>-D<%pch_define%> <%endfor%>-H=$(INTERMEDIATE)\<%noextension(project_name)%>.csm -Hh=<%pch_header%>
193 !endif
194 !endif
195 <%endif%>
197 CFLAGS = \
198 <%foreach(cflags)%>
199          <%cflag%> \
200 <%endfor%>
201          $(COMMON_FLAGS) \
202          $(COMMON_DEFINES) \
203 <%foreach(macros common_defines)%>
204          -D<%macro%> \
205 <%endfor%>
206 <%foreach(includes)%>
207          -I"<%include%>" \
208 <%endfor%>
209          $(PCH_CFLAGS) \
210          $(VCL_CFLAGS)
212 <%marker(macros)%>
213 <%if(exename)%>
214 OUTPUTDIR = $(EXEOUTPUTDIR)
215 all:<%if(prebuild)%> __prebuild__<%endif%> $(OUTPUTDIR)$(NAME)$(EXE_EXT)<%if(postbuild)%> __postbuild__<%endif%>
217 $(OUTPUTDIR)$(NAME)$(EXE_EXT): $(OBJFILES) $(RESOURCE)
218   @if not exist "$(OUTPUTDIR)" mkdir "$(OUTPUTDIR)"
219 <%if(prelink)%>
220   <%eval(prelink)%>
221 <%endif%>
222   $(LINK) @&&!
223   $(LINKER_EXE_ARGUMENTS)
226 <%endif%>
227 <%if(sharedname)%>
228 !ifndef STATIC_CFG
229 OUTPUTDIR = <%if(dllout)%><%dllout%><%else%><%libout%><%endif%>\\
230 all:<%if(prebuild)%> __prebuild__<%endif%> $(OUTPUTDIR)$(NAME)$(DLL_EXT)<%if(postbuild)%> __postbuild__<%endif%>
232 $(OUTPUTDIR)$(NAME)$(DLL_EXT): $(OBJFILES) $(RESOURCE)
233   @if not exist "$(OUTPUTDIR)" mkdir "$(OUTPUTDIR)"
234 <%if(prelink)%>
235   <%eval(prelink)%>
236 <%endif%>
237   $(LINK) @&&!
238   $(LINKER_DLL_ARGUMENTS)
240 !endif
242 <%endif%>
243 <%if(staticname)%>
244 !ifdef STATIC_CFG
245 OUTPUTDIR = <%libout%>\\
246 all:<%if(prebuild)%> __prebuild__<%endif%> $(OUTPUTDIR)$(NAME)$(LIB_EXT)<%if(postbuild)%> __postbuild__<%endif%>
248 $(OUTPUTDIR)$(NAME)$(LIB_EXT): $(OBJFILES)
249   @if not exist "$(OUTPUTDIR)" mkdir "$(OUTPUTDIR)"
250   $(TLIB) $(LIBFLAGS) $(OUTPUTDIR)$(NAME)$(LIB_EXT) @&&!
251 + $(**: = &^
252 + )
254 !endif
256 <%endif%>
257 <%if(!exename && !sharedname && !staticname)%>
258 all:<%if(prebuild)%> __prebuild__<%endif%><%if(postbuild)%> __postbuild__<%endif%>
259   @-rem
261 <%endif%>
262 <%if(custom_types)%>
263 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%>
264 <%foreach(custom_types)%>
265 <%if(custom_type->libpath)%>
266 PATH = $(PATH);<%custom_type->libpath%>
267 <%endif%>
268 <%foreach(custom_type->input_files)%>
269 <%if(custom_type->input_file->output_files)%>
270 <%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%>
271 <%if(flag_overrides(custom_type->input_file, gendir))%>
272         @if not exist "<%flag_overrides(custom_type->input_file, gendir)%>" mkdir "<%flag_overrides(custom_type->input_file, gendir)%>"
273 <%endif%>
274   <%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->input_file%> <%custom_type->output_option%> $@<%else%><%custom_type->input_file%><%endif%>
275 <%if(flag_overrides(custom_type->input_file, postcommand))%>
276 <%foreach(custom_type->input_file)%>
277   <%flag_overrides(custom_type->input_file, postcommand)%>
278 <%endfor%>
279 <%else%>
280 <%if(custom_type->postcommand)%>
281 <%foreach(custom_type->input_file)%>
282   <%custom_type->postcommand%>
283 <%endfor%>
284 <%endif%>
285 <%endif%>
286 <%if(pch_header)%>
287 <%if(custom_type->pch_postrule)%>
288 <%foreach(custom_type->input_file->source_output_files)%>
289   @echo \#include "<%pch_header%>" > temporary.src
290   @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
291   @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%>
292 <%endfor%>
293 <%endif%>
294 <%endif%>
296 <%endif%>
297 <%endfor%>
298 <%endfor%>
299 <%if(exename || sharedname || staticname)%>
300 <%if(source_files)%>
301 $(OBJFILES): $(GENERATED_DIRTY)
302 <%else%>
303 all:<%if(prebuild)%> __prebuild__<%endif%> $(GENERATED_DIRTY)<%if(postbuild)%> __postbuild__<%endif%>
304 <%endif%>
305 <%else%>
306 all:<%if(prebuild)%> __prebuild__<%endif%> $(GENERATED_DIRTY)<%if(postbuild)%> __postbuild__<%endif%>
307 <%endif%>
309 <%endif%>
310 generated: $(GENERATED_DIRTY)
311   @-rem
313 .path$(OBJ_EXT) = $(INTERMEDIATE)
315 .path.cpp = $(CPPDIR)
316 .cpp$(OBJ_EXT):
317   @if not exist "$(INTERMEDIATE)" mkdir "$(INTERMEDIATE)"
318         $(CC) $(DYN_FLAGS) $(STATIC_FLAGS) $(OCFLAGS) $(CG_CFLAGS) $(UC_CFLAGS) $(THREAD_FLAGS) $(CCFLAGS) $(CFLAGS) $(WARN_FLAGS) -c -o $(@D)\$(@F) $<
320 .path.cxx = $(CPPDIR)
321 .cxx$(OBJ_EXT):
322   @if not exist "$(INTERMEDIATE)" mkdir "$(INTERMEDIATE)"
323         $(CC) $(DYN_FLAGS) $(STATIC_FLAGS) $(OCFLAGS) $(CG_CFLAGS) $(UC_CFLAGS) $(THREAD_FLAGS) $(CCFLAGS) $(CFLAGS) $(WARN_FLAGS) -c -o $(@D)\$(@F) $<
325 .path.cc = $(CPPDIR)
326 .cc$(OBJ_EXT):
327   @if not exist "$(INTERMEDIATE)" mkdir "$(INTERMEDIATE)"
328         $(CC) $(DYN_FLAGS) $(STATIC_FLAGS) $(OCFLAGS) $(CG_CFLAGS) $(UC_CFLAGS) $(THREAD_FLAGS) $(CCFLAGS) $(CFLAGS) $(WARN_FLAGS) -c -o $(@D)\$(@F) $<
330 .path.C = $(CPPDIR)
331 .C$(OBJ_EXT):
332   @if not exist "$(INTERMEDIATE)" mkdir "$(INTERMEDIATE)"
333         $(CC) $(DYN_FLAGS) $(STATIC_FLAGS) $(OCFLAGS) $(CG_CFLAGS) $(UC_CFLAGS) $(THREAD_FLAGS) $(CCFLAGS) $(CFLAGS) $(WARN_FLAGS) -c -o $(@D)\$(@F) $<
335 .path.c = $(CPPDIR)
336 .c$(OBJ_EXT):
337   @if not exist "$(INTERMEDIATE)" mkdir "$(INTERMEDIATE)"
338         $(CC) $(DYN_FLAGS) $(STATIC_FLAGS) $(OCFLAGS) $(CG_CFLAGS) $(UC_CFLAGS) $(THREAD_FLAGS) $(CCFLAGS) $(CFLAGS) $(WARN_FLAGS) -c -o $(@D)\$(@F) $<
340 <%foreach(source_files)%>
341 <%if(transdir(source_file) || flag_overrides(source_file, buildflags))%>
342 "$(INTERMEDIATE)\<%transdir(source_file)%><%basenoextension(source_file)%>$(OBJ_EXT)":
343   @if not exist "$(INTERMEDIATE)\<%transdir(source_file)%>" mkdir "$(INTERMEDIATE)\<%transdir(source_file)%>"
344   $(CC) <%if(flag_overrides(source_file, buildflags))%><%flag_overrides(source_file, buildflags)%> <%endif%>$(DYN_FLAGS) $(STATIC_FLAGS) $(OCFLAGS) $(CG_CFLAGS) $(UC_CFLAGS) $(THREAD_FLAGS) $(CCFLAGS) $(CFLAGS) $(WARN_FLAGS) -c -o $(@D)\$(@F) <%source_file%>
345 <%endif%>
346 <%endfor%>
347 <%if(resource_files)%>
348 !ifndef STATIC_CFG
349 .path.res = $(INTERMEDIATE)
350 .path.rc = $(RESDIR)
351 .rc.res:
352   @if not exist "$(INTERMEDIATE)" mkdir "$(INTERMEDIATE)"
353         $(RC) $(RC_FLAGS) -fo$@ $<
354 <%foreach(resource_files)%>
355 <%if(transdir(resource_file))%>
356 "$(INTERMEDIATE)\<%transdir(resource_file)%><%basenoextension(resource_file)%>.res":
357   @if not exist "$(INTERMEDIATE)\<%transdir(resource_file)%>" mkdir "$(INTERMEDIATE)\<%transdir(resource_file)%>"
358   $(RC) -fo$@ <%resource_file%>
359 <%endif%>
360 <%endfor%>
361 !endif
363 <%endif%>
364 clean:
365         @if exist "$(INTERMEDIATE)" rmdir /s/q $(INTERMEDIATE)
367 realclean: clean
368 <%foreach(custom_types)%>
369 <%foreach(custom_type->input_files)%>
370 <%if(custom_type->input_file->output_files)%>
371 <%foreach(custom_type->input_file->output_files)%>
372 <%if(flag_overrides(custom_type->input_file, gendir))%>
373         @del "<%flag_overrides(custom_type->input_file, gendir)%>\<%basename(custom_type->input_file->output_file)%>" 2>NUL
374 <%else%>
375         @del "<%custom_type->input_file->output_file%>" 2>NUL
376 <%endif%>
377 <%endfor%>
378 <%endif%>
379 <%endfor%>
380 <%endfor%>
381 <%if(exename)%>
382         @del "$(OUTPUTDIR)$(NAME)$(EXE_EXT)" del "$(OUTPUTDIR)$(NAME)$(EXE_EXT)" 2>NUL
383 <%else%>
384 <%if(sharedname)%>
385         @del "$(OUTPUTDIR)$(NAME)$(DLL_EXT)" del "$(OUTPUTDIR)$(NAME)$(DLL_EXT)" 2>NUL
386 <%endif%>
387 <%if(staticname)%>
388         @del "$(OUTPUTDIR)$(NAME)$(LIB_EXT)" del "$(OUTPUTDIR)$(NAME)$(LIB_EXT)" 2>NUL
389 <%endif%>
390 <%endif%>
391 <%if(exename || sharedname || staticname)%>
392         @del "$(OUTPUTDIR)$(NAME)$(DEBUG_EXT)" 2>NUL
393 <%endif%>
394 <%if(postclean)%>
395   -<%eval(postclean)%>
396 <%endif%>
398 <%if(prebuild)%>
399 __prebuild__:
400   @<%eval(prebuild)%>
402 <%endif%>
403 <%if(postbuild)%>
404 __postbuild__:
405   @<%eval(postbuild)%>
407 <%endif%>
408 <%marker(local)%>
409 <%marker(bottom)%>