summaryrefslogtreecommitdiff
path: root/bin/MakeProjectCreator/templates/nmake.mpd
blob: ae609bd22f9bb8652d239a455397ccda61c3b837 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
# Microsoft Developer Studio Generated NMAKE File
<%foreach(platforms)%>
!<%fornotfirst("ELSE")%>IF "$(CFG)" == ""
CFG=<%platform%> <%default_configuration%>
!MESSAGE No configuration specified. Defaulting to <%platform%> <%default_configuration%>.
<%endfor%>
!ENDIF

!IF <%foreach(platforms)%><%foreach(configurations)%>"$(CFG)" != "<%platform%> <%configuration%>"<%fornotlast(" && ")%><%endfor%><%endfor%>
!MESSAGE Invalid configuration "$(CFG)" specified.
!MESSAGE You can specify a configuration when running NMAKE
!MESSAGE by defining the macro CFG on the command line. For example:
!MESSAGE
<%foreach(platforms)%>
!MESSAGE NMAKE /f "<%project_file%>" CFG="<%platform%> <%default_configuration%>"
<%endfor%>
!MESSAGE
!MESSAGE Possible choices for configuration are:
!MESSAGE
<%foreach(platforms)%>
<%foreach(configurations)%>
!MESSAGE "<%platform%> <%configuration%>" (based on "<%platform%> (<%machine_description%>) <%type_description("Dynamic-Lynk Library")%>")
<%endfor%>
<%endfor%>
!MESSAGE
!ERROR An invalid configuration is specified.
!ENDIF

!IF "$(OS)" == "Windows_NT"
NULL=
!ELSE
NULL=nul
!ENDIF

<%foreach(platforms)%>
<%foreach(configurations)%>
!<%fornotfirst("ELSE")%>IF  "$(CFG)" == "<%platform%> <%configuration%>"

<%if(exename)%>
OUTDIR=<%output_dir(".")%>
INSTALLDIR=<%if(install)%><%install%><%else%><%output_dir%><%endif%>
<%endif%>
<%if(type_is_static)%>
OUTDIR=<%output_dir(".")%>
<%endif%>
<%if(type_is_dynamic)%>
OUTDIR=<%libout%>
<%endif%>
INTDIR=<%intermediate_dir%>\<%noextension(project_file)%>

ALL : <%if(idl_files)%>IDL_STUBS <%endif%><%if(exename)%><%if(install)%>"$(INSTALLDIR)" <%endif%><%endif%>"<%if(type_is_dynamic)%><%if(dllout)%><%dllout%><%else%><%libout%><%endif%>\<%sharedname%><%lib_modifier%>.dll<%endif%><%if(type_is_static)%>$(OUTDIR)\<%staticname%><%lib_modifier%>.lib<%endif%><%if(exename)%>$(INSTALLDIR)\<%exename%>.exe<%endif%>"<%foreach(custom_types)%><%foreach(custom_type->input_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%><%endfor%><%endfor%>

DEPEND :
	perl <%depgen("$(ACE_ROOT)\\bin\\depgen.pl")%><%foreach(includes)%> -I"<%include%>"<%endfor%><%foreach(defines cpu_defines common_defines macros)%> -D<%define%><%endfor%><%if(type_is_dynamic)%><%foreach(dynamicflags)%> -D<%dynamicflag%><%endfor%><%endif%><%if(need_staticflags)%><%foreach(staticflags)%> -D<%staticflag%><%endfor%><%endif%><%if(pch_header)%><%foreach(pch_defines)%> -D<%pch_define%><%endfor%><%endif%> -f "<%noextension(project_file)%>.dep"<%foreach(source_files)%> <%source_file%><%endfor%>

<%if(idl_files)%>
IDL_STUBS :<%foreach(idl_files)%> "<%if(flag_overrides(idl_file, idlgendir))%><%flag_overrides(idl_file, idlgendir)%><%else%><%if(idlgendir)%><%idlgendir%><%else%><%dirname(idl_file)%><%endif%><%endif%>\<%basenoextension(idl_file)%>C.cpp"<%endfor%>

<%endif%>
CLEAN :
	-@erase "$(INTDIR)\*.obj"
	-@erase "$(INTDIR)\*.res"
	-@erase "$(INTDIR)\*.pch"
	-@erase "$(INTDIR)\*.idb"

REALCLEAN : CLEAN
<%if(pdb)%>
<%if(exename)%>
	-@erase "$(INSTALLDIR)\<%exename%>.pdb"
<%endif%>
<%if(type_is_dynamic)%>
	-@erase "$(OUTDIR)\<%sharedname%><%lib_modifier%>.pdb"
<%endif%>
<%if(type_is_static)%>
	-@erase "$(OUTDIR)\<%staticname%><%lib_modifier%>.pdb"
<%endif%>
<%endif%>
<%if(type_is_dynamic)%>
        -@erase "<%if(dllout)%><%dllout%><%else%><%libout%><%endif%>\<%sharedname%><%lib_modifier%>.dll"
<%endif%>
<%if(exename)%>
        -@erase "$(INSTALLDIR)\<%exename%>.exe"
        -@erase "$(INSTALLDIR)\<%exename%>.ilk"
<%else%>
        -@erase "$(OUTDIR)\<%staticname%><%lib_modifier%>.lib"
        -@erase "$(OUTDIR)\<%staticname%><%lib_modifier%>.exp"
        -@erase "$(OUTDIR)\<%staticname%><%lib_modifier%>.ilk"
<%endif%>
<%if(idl_files)%>
        -@erase<%foreach(idl_files)%> "<%if(flag_overrides(idl_file, idlgendir))%><%flag_overrides(idl_file, idlgendir)%><%else%><%if(idlgendir)%><%idlgendir%><%else%><%dirname(idl_file)%><%endif%><%endif%>\<%basenoextension(idl_file)%>C.*" "<%if(flag_overrides(idl_file, idlgendir))%><%flag_overrides(idl_file, idlgendir)%><%else%><%if(idlgendir)%><%idlgendir%><%else%><%dirname(idl_file)%><%endif%><%endif%>\<%basenoextension(idl_file)%>S.*"<%endfor%>
<%endif%>
<%foreach(custom_types)%>
<%foreach(custom_type->input_files)%>
<%foreach(custom_type->input_file->output_files)%>
        -@erase "<%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%>
<%endfor%>
<%endfor%>

<%if(install)%>
"$(INSTALLDIR)" :
    if not exist "<%install%>/$(NULL)" mkdir "<%install%>"

<%endif%>
"$(OUTDIR)" :
    if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"

"$(INTDIR)" :
    if not exist "<%intermediate_dir%>/$(NULL)" mkdir "<%intermediate_dir%>"
    if not exist "$(INTDIR)/$(NULL)" mkdir "$(INTDIR)"

CPP=cl.exe
CPP_PROJ=/nologo <%if(add_compile)%><%add_compile%> <%endif%><%compile_flags%> <%foreach(includes)%>/I "<%include%>" <%endfor%><%foreach(defines cpu_defines common_defines macros)%>/D <%define%> <%endfor%><%if(zzip)%><%foreach(zzip_defines)%> /D <%zzip_define%><%endfor%> /I "$(ZZIP_ROOT)\include" <%endif%><%if(type_is_dynamic)%><%foreach(dynamicflags)%>/D <%dynamicflag%> <%endfor%><%endif%><%if(need_staticflags)%><%foreach(staticflags)%>/D <%libflag%> <%endfor%><%endif%><%if(pch_header)%><%foreach(pch_defines)%>/D <%pch_define%> <%endfor%><%if(pch_source)%>/Yu<%else%>/YX<%endif%>"<%pch_header%>" /Fp"$(INTDIR)\<%noextension(pch_header)%>.pch" <%endif%>/Fo"<%fo_flag("$(INTDIR)\\\\")%>" /Fd"<%fd_flag("$(INTDIR)\\\\")%>" /FD /c

.c{$(INTDIR)}.obj::
   $(CPP) @<<
   $(CPP_PROJ) $<
<<

.cpp{$(INTDIR)}.obj::
   $(CPP) @<<
   $(CPP_PROJ) $<
<<

.cxx{$(INTDIR)}.obj::
   $(CPP) @<<
   $(CPP_PROJ) $<
<<

.c{$(INTDIR)}.sbr::
   $(CPP) @<<
   $(CPP_PROJ) $<
<<

.cpp{$(INTDIR)}.sbr::
   $(CPP) @<<
   $(CPP_PROJ) $<
<<

.cxx{$(INTDIR)}.sbr::
   $(CPP) @<<
   $(CPP_PROJ) $<
<<

RSC=rc.exe
<%foreach(resource_files)%>
RSC_PROJ=/l 0x409 /fo"$(INTDIR)\<%basenoextension(resource_file)%>.res"<%foreach(defines cpu_defines macros)%> /d <%define%><%endfor%><%foreach(includes)%> /i "<%include%>"<%endfor%>
<%endfor%>
BSC32=bscmake.exe
<%if(sharedname)%>
BSC32_FLAGS=/nologo <%if(type_is_dynamic)%>/o"$(OUTDIR)\<%sharedname%>.bsc"<%endif%>
<%endif%>
BSC32_SBRS= \

<%if(type_is_binary)%>
LINK32=link.exe
LINK32_FLAGS=<%systemlibs("advapi32.lib user32.lib")%> <%if(ssl)%><%foreach(ssl_libs)%><%ssl_lib%>.lib <%endfor%><%endif%><%if(zzip)%><%foreach(zzip_libs)%><%zzip_lib%>.lib <%endfor%><%endif%>/INCREMENTAL:<%incremental("NO")%> <%foreach(lit_libs)%><%lit_lib%>.lib <%endfor%><%foreach(libs defaultlibs)%><%lib%><%lib_modifier%>.lib <%endfor%><%foreach(libpaths)%>/libpath:"<%libpath%>" <%endfor%><%if(zzip)%>/libpath: "$(ZZIP_ROOT)\lib" <%endif%>/nologo /version:<%version("1.0")%> /subsystem:<%subsystem("windows")%><%if(type_is_dynamic)%> /dll<%endif%> <%debug_switch("/debug")%> <%if(pdb)%>/pdb:"<%if(type_is_dynamic)%><%dllout%>\<%sharedname%><%lib_modifier%>.pdb<%endif%><%if(exename)%>$(INSTALLDIR)\<%exename%>.pdb<%endif%><%if(type_is_static)%>$(OUTDIR)\<%staticname%><%lib_modifier%>.pdb<%endif%>" <%endif%>/machine:<%machine("I386")%> /out:"<%if(sharedname)%><%dllout%>\<%sharedname%><%lib_modifier%>.dll<%endif%><%if(exename)%>$(INSTALLDIR)\<%exename%>.exe<%endif%>"<%if(sharedname)%> /implib:"$(OUTDIR)\<%sharedname%><%lib_modifier%>.lib"<%endif%>
<%endif%>
<%if(type_is_static)%>
LINK32=link.exe -lib
LINK32_FLAGS=/nologo /machine:<%machine("I386")%> /out:"<%libout%>\<%staticname%><%lib_modifier%>.lib"
<%endif%>
LINK32_OBJS= \
<%foreach(resource_files)%>
	"$(INTDIR)\<%basenoextension(resource_file)%>.res" \
<%endfor%>
<%if(pch_source)%>
	"$(INTDIR)\<%basenoextension(pch_source)%>.obj" \
<%endif%>
<%foreach(source_files)%>
	"$(INTDIR)\<%basenoextension(source_file)%>.obj"<%fornotlast(" \\")%>
<%endfor%>

"<%if(type_is_dynamic)%><%dllout%>\<%sharedname%><%lib_modifier%>.dll<%endif%><%if(type_is_static)%>$(OUTDIR)\<%staticname%><%lib_modifier%>.lib<%endif%><%if(exename)%>$(INSTALLDIR)\<%exename%>.exe<%endif%>" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
    $(LINK32) @<<
  $(LINK32_FLAGS) $(LINK32_OBJS)
<<

<%endfor%>
!ENDIF
<%endfor%>


!IF "$(NO_EXTERNAL_DEPS)" != "1"
!IF EXISTS("<%noextension(project_file)%>.dep")
!INCLUDE "<%noextension(project_file)%>.dep"
!ELSE
!MESSAGE Warning: cannot find "<%noextension(project_file)%>.dep"
!ENDIF
!ENDIF


!IF <%foreach(platforms)%><%foreach(configurations)%>"$(CFG)" == "<%platform%> <%configuration%>" <%fornotlast("|| ")%><%endfor%><%endfor%>
<%if(pch_source)%>
<%if(pch_header)%>
SOURCE=.\<%pch_source%>

<%foreach(platforms)%>
<%foreach(configurations)%>
!<%fornotfirst("ELSE")%>IF  "$(CFG)" == "<%platform%> <%configuration%>"

CPP_SWITCHES=/nologo <%if(add_compile)%><%add_compile%> <%endif%><%compile_flags%> <%foreach(includes)%>/I "<%include%>" <%endfor%><%foreach(defines cpu_defines common_defines macros)%>/D <%define%> <%endfor%><%if(type_is_dynamic)%><%foreach(dynamicflags)%>/D <%dynamicflag%> <%endfor%><%endif%><%if(need_staticflags)%><%foreach(staticflags)%>/D <%libflag%> <%endfor%><%endif%><%if(pch_header)%><%foreach(pch_defines)%>/D <%pch_define%> <%endfor%>/Fp"$(INTDIR)\<%noextension(pch_header)%>.pch" /Yc"<%pch_header%>" <%endif%>/Fo"<%fo_flag%>" /Fd"<%fd_flag%>" /FD /c

"$(INTDIR)\<%basenoextension(pch_source)%>.obj"	"$(INTDIR)\<%noextension(pch_header)%>.pch" : $(SOURCE) "$(INTDIR)"
	$(CPP) @<<
  $(CPP_SWITCHES) $(SOURCE)
<<

<%endfor%>
<%endfor%>
!ENDIF

<%endif%>
<%endif%>
<%foreach(source_files)%>
SOURCE=.\<%source_file%>

"$(INTDIR)\<%basenoextension(source_file)%>.obj" : $(SOURCE) "$(INTDIR)"<%if(pch_header)%> "$(INTDIR)\<%noextension(pch_header)%>.pch"<%endif%>
<%if(basename_found)%>
	$(CPP) $(CPP_PROJ) $(SOURCE)
<%endif%>

<%endfor%>
<%foreach(template_files)%>
SOURCE=.\<%template_file%>
<%endfor%>
<%foreach(idl_files)%>
SOURCE=<%idl_file%>

<%foreach(platforms)%>
<%foreach(configurations)%>
!<%fornotfirst("ELSE")%>IF  "$(CFG)" == "<%platform%> <%configuration%>"

InputPath=.\<%idl_file%>
InputName=<%basenoextension(idl_file)%>
InputDir=<%dirname(idl_file)%>

"<%if(flag_overrides(idl_file, idlgendir))%><%flag_overrides(idl_file, idlgendir)%><%else%><%if(idlgendir)%><%idlgendir%><%else%><%if(dirname_found)%>$(InputDir)<%else%>.<%endif%><%endif%><%endif%>\$(InputName)C.h"	"<%if(flag_overrides(idl_file, idlgendir))%><%flag_overrides(idl_file, idlgendir)%><%else%><%if(idlgendir)%><%idlgendir%><%else%><%if(dirname_found)%>$(InputDir)<%else%>.<%endif%><%endif%><%endif%>\$(InputName)C.i"	"<%if(flag_overrides(idl_file, idlgendir))%><%flag_overrides(idl_file, idlgendir)%><%else%><%if(idlgendir)%><%idlgendir%><%else%><%if(dirname_found)%>$(InputDir)<%else%>.<%endif%><%endif%><%endif%>\$(InputName)C.cpp"	"<%if(flag_overrides(idl_file, idlgendir))%><%flag_overrides(idl_file, idlgendir)%><%else%><%if(idlgendir)%><%idlgendir%><%else%><%if(dirname_found)%>$(InputDir)<%else%>.<%endif%><%endif%><%endif%>\$(InputName)S.h"	"<%if(flag_overrides(idl_file, idlgendir))%><%flag_overrides(idl_file, idlgendir)%><%else%><%if(idlgendir)%><%idlgendir%><%else%><%if(dirname_found)%>$(InputDir)<%else%>.<%endif%><%endif%><%endif%>\$(InputName)S.i"	"<%if(flag_overrides(idl_file, idlgendir))%><%flag_overrides(idl_file, idlgendir)%><%else%><%if(idlgendir)%><%idlgendir%><%else%><%if(dirname_found)%>$(InputDir)<%else%>.<%endif%><%endif%><%endif%>\$(InputName)S.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
	<<tempfile.bat
	@echo off
	<%idl_compiler%> -o <%if(flag_overrides(idl_file, idlgendir))%><%flag_overrides(idl_file, idlgendir)%><%else%><%if(idlgendir)%><%idlgendir%><%else%><%if(dirname_found)%>$(InputDir)<%else%>.<%endif%><%endif%><%endif%> <%if(flag_overrides(idl_file, idlflags))%><%flag_overrides(idl_file, idlflags)%><%else%><%idlflags("-Sc")%><%endif%> <%idl_file%>
<<

<%endfor%>
!ENDIF
<%endfor%>

<%endfor%>
<%foreach(custom_types)%>
<%foreach(custom_type->input_files)%>
<%if(custom_type->input_file->output_files)%>
SOURCE=<%custom_type->input_file%>

<%foreach(platforms)%>
<%foreach(configurations)%>
!<%fornotfirst("ELSE")%>IF  "$(CFG)" == "<%platform%> <%configuration%>"

InputPath=.\<%custom_type->input_file%>
InputName=<%basenoextension(custom_type->input_file)%>
InputDir=<%dirname(custom_type->input_file)%>

<%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%>: $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
	<<tempfile.bat
	@echo off
<%if(custom_type->output_option)%>
<%foreach(custom_type->input_file->output_files)%>
	<%custom_type->command%> <%if(pch_header)%><%if(custom_type->pch_option)%><%custom_type->pch_option%><%pch_header%> <%endif%><%endif%><%if(flag_overrides(custom_type->input_file, commandflags))%><%flag_overrides(custom_type->input_file, commandflags)%><%else%><%custom_type->commandflags%><%endif%> $(InputPath) <%custom_type->output_option%> <%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%>
<%else%>
	<%custom_type->command%> <%if(pch_header)%><%if(custom_type->pch_option)%><%custom_type->pch_option%><%pch_header%> <%endif%><%endif%><%if(flag_overrides(custom_type->input_file, commandflags))%><%flag_overrides(custom_type->input_file, commandflags)%><%else%><%custom_type->commandflags%><%endif%> $(InputPath)
<%endif%>
<<

<%endfor%>
!ENDIF
<%endfor%>

<%endif%>
<%endfor%>
<%endfor%>
<%foreach(resource_files)%>
SOURCE=.\<%resource_file%>

"$(INTDIR)\<%basenoextension(resource_file)%>.res" : $(SOURCE) "$(INTDIR)"
	$(RSC) $(RSC_PROJ) $(SOURCE)


<%endfor%>

!ENDIF