PageRenderTime 48ms CodeModel.GetById 19ms RepoModel.GetById 0ms app.codeStats 0ms

/templates/make.mpd

https://bitbucket.org/snaewe/mpc
Unknown | 380 lines | 348 code | 32 blank | 0 comment | 0 complexity | 33d48749311c79d34e980521b37b7f59 MD5 | raw file
  1. #----------------------------------------------------------------------------
  2. # Macros
  3. #----------------------------------------------------------------------------
  4. <%marker(top)%>
  5. <%if(multiple(configurations) || multiple(platforms))%>
  6. <%foreach(configurations)%>
  7. <%if(forfirst)%>
  8. <%if(multiple(platforms))%>
  9. <%foreach(platforms)%>
  10. <%if(forfirst)%>
  11. CFG = <%platform%> <%configuration%>
  12. <%endif%>
  13. <%endfor%>
  14. <%else%>
  15. CFG = <%configuration%>
  16. <%endif%>
  17. <%endif%>
  18. <%endfor%>
  19. <%endif%>
  20. <%foreach(compilers)%>
  21. <%foreach(platforms)%>
  22. <%foreach(configurations)%>
  23. <%if(multiple(platforms))%>
  24. ifeq ($(CFG), <%platform%> <%configuration%>)
  25. <%else%>
  26. <%if(multiple(configurations))%>
  27. ifeq ($(CFG), <%configuration%>)
  28. <%endif%>
  29. <%endif%>
  30. CC = <%cc%>
  31. CXX = <%cxx%>
  32. <%if(ld)%>
  33. LD = <%ld%>
  34. <%else%>
  35. LD = $(CXX) $(CCFLAGS) $(CPPFLAGS)
  36. <%endif%>
  37. AR = <%ar("ar")%>
  38. <%if(nm)%>
  39. NM = <%nm%>
  40. <%endif%>
  41. <%if(cxxint)%>
  42. CXXINT = <%cxxint%>
  43. <%endif%>
  44. <%if(cputype)%>
  45. CPUTYPE = <%cputype%>
  46. <%endif%>
  47. <%if(cpu)%>
  48. CPU = <%cpu%>
  49. <%endif%>
  50. <%if(dll_ext && pic)%>
  51. PICFLAGS = <%pic%>
  52. <%endif%>
  53. <%if(cflags)%>
  54. CFLAGS = <%cflags%>
  55. <%endif%>
  56. <%if(ccflags)%>
  57. CCFLAGS = <%ccflags%>
  58. <%endif%>
  59. CPPFLAGS = <%if(visibility && visopt)%><%visopt%> <%endif%>$(PICFLAGS) $(GENFLAGS)<%if(compile_flags)%> <%compile_flags%><%endif%><%if(profile)%> <%profopt%><%endif%><%if(coverage)%> <%covopt%><%endif%><%if(cpu)%> -DCPU=$(CPU)<%endif%><%if(tempincopt)%> <%tempincopt%>$(TEMPINCDIR)<%endif%><%if(compilerflags)%> <%compilerflags%><%endif%><%if(build64bit && compilerflags64)%> <%compilerflags64%><%endif%><%if(pch_source && pchsupport)%><%foreach(pch_defines)%> -D<%pch_define%><%endfor%><%endif%><%if(extracppflags)%><%foreach(extracppflags)%><%if(!starts_with(extracppflag, -D) || !contains(language, java))%> <%extracppflag%><%endif%><%endfor%><%endif%><%if(includes)%><%foreach(includes)%> -I"<%include%>"<%endfor%><%endif%><%if(!contains(language, java) && macros)%><%foreach(macros)%> -D<%macro%><%endfor%><%endif%>
  60. OBJEXT = <%obj_ext%>
  61. OUTPUT_OPTION = <%output_option(-o \"$@\")%>
  62. COMPILE.c = $(CC) $(CFLAGS) $(CPPFLAGS) <%compile_option("-c")%>
  63. COMPILE.cc = $(CXX) $(CCFLAGS) $(CPPFLAGS) <%compile_option%>
  64. <%if(rc)%>
  65. RESEXT = <%res_ext%>
  66. <%endif%>
  67. <%if(build64bit && arflags64)%>
  68. ARFLAGS = <%if(extraarflags)%><%extraarflags%> <%endif%><%arflags64%>
  69. <%else%>
  70. <%if(arflags)%>
  71. ARFLAGS = <%if(extraarflags)%><%extraarflags%> <%endif%><%arflags%>
  72. <%endif%>
  73. <%endif%>
  74. <%if(tempinc)%>
  75. TEMPINCDIR = <%tempinc%><%if(tempincopt)%><%slash%><%project_name%><%endif%>
  76. <%endif%>
  77. LDFLAGS =<%if(libpaths)%><%foreach(libpaths)%><%if(targetoutdir)%> <%libpathopt(-L)%>"<%libpath%><%slash%><%targetoutdir%>"<%endif%> <%libpathopt(-L)%>"<%libpath%>"<%endfor%><%endif%><%if(linkflags)%> <%linkflags%><%endif%><%if(profile)%> <%profopt%><%endif%><%if(coverage)%> <%covopt%><%endif%><%if(build64bit && linkflags64)%> <%linkflags64%><%endif%>
  78. CCC = $(CXX)
  79. MAKEFILE = <%project_file%>
  80. DEPENDENCIES = <%if(supports_include)%>.depend.<%endif%>$(MAKEFILE)
  81. <%if(exename)%>
  82. BTARGETDIR = <%if(exeout)%><%exeout%><%output_dir_ext%><%else%>.<%endif%><%slash%><%targetoutdir%>
  83. BIN = $(BTARGETDIR)<%exename%>$(EXESUFFIX)$(EXEEXT)
  84. <%else%>
  85. LTARGETDIR = <%libout%><%if(!compares(libout, .))%><%output_dir_ext%><%endif%><%slash%><%targetoutdir%>
  86. <%endif%>
  87. CAT = <%type("cat")%>
  88. MV = <%move("mv -f")%>
  89. RM = <%delete("rm -rf")%>
  90. CP = <%copy("cp -p")%>
  91. NUL = <%devnull("/dev/null")%>
  92. MKDIR = <%makedir("mkdir -p")%>
  93. TESTDIRSTART = <%testdirstart("test -d")%>
  94. TESTDIREND = <%testdirend("||")%>
  95. TOUCH = <%touch("touch")%>
  96. EXEEXT = <%exe_ext%>
  97. LIBPREFIX = <%lib_prefix%><%libname_prefix%>
  98. <%if(use_lib_modifier)%>
  99. LIBSUFFIX = <%lib_modifier%>
  100. <%endif%>
  101. <%if(use_exe_modifier)%>
  102. EXESUFFIX = <%lib_modifier%>
  103. <%endif%>
  104. GENFLAGS =<%if(!contains(configuration, Release) || optimize)%> <%genflags%><%endif%>
  105. LDLIBS =<%foreach(libs)%> <%libopt%>"<%libname_prefix%><%lib%>$(LIBSUFFIX)"<%endfor%><%foreach(lit_libs)%> <%libopt%>"<%lit_lib%>"<%endfor%><%foreach(pure_libs)%> "<%pure_lib%>"<%endfor%> <%ldlibs%>
  106. OBJS =<%if(pch_source && pchsupport)%> <%targetoutdir%><%obj_dir%><%noextension(pch_source)%>$(OBJEXT)<%endif%><%foreach(source_files)%> <%if(targetoutdir || obj_dir)%><%targetoutdir%><%obj_dir%><%transdir(source_file)%><%basenoextension(source_file)%><%else%><%noextension(source_file)%><%endif%>$(OBJEXT)<%endfor%><%if(rc)%><%foreach(resource_files)%> <%targetoutdir%><%obj_dir%><%resource_file%>$(RESEXT)<%endfor%><%endif%>
  107. <%if(lib_ext)%>
  108. <%if(staticname)%>
  109. AREXT = <%lib_ext%>
  110. LIB = $(LTARGETDIR)$(LIBPREFIX)<%staticname%>$(LIBSUFFIX)$(AREXT)
  111. <%endif%>
  112. <%endif%>
  113. <%if(dll_ext && sharedname)%>
  114. SOEXT = <%dll_ext%>
  115. SHTARGETDIR = <%if(dllout)%><%dllout%><%if(!compares(dllout, .))%><%output_dir_ext%><%endif%><%else%><%libout%><%if(!compares(libout, .))%><%output_dir_ext%><%endif%><%endif%><%slash%><%targetoutdir%>
  116. <%if(version && versupport)%>
  117. SHLIB_BASE = $(LIBPREFIX)<%sharedname%>$(LIBSUFFIX)$(SOEXT)
  118. <%endif%>
  119. SHLIB = $(SHTARGETDIR)$(LIBPREFIX)<%sharedname%>$(LIBSUFFIX)$(SOEXT)
  120. <%if(shflags)%>
  121. SHFLAGS = <%shflags%>
  122. <%endif%>
  123. <%endif%>
  124. SRC =<%if(pch_source && pchsupport)%> <%pch_source%><%endif%> <%source_files%>
  125. LINK.cc = <%if(dld)%><%dld%> $(LDFLAGS)<%else%>$(LD) $(LDFLAGS)<%endif%>
  126. <%if(!contains(language, java))%>
  127. <%if(dynamicflags)%>
  128. DYNAMICFLAGS =<%foreach(dynamicflags)%> -D<%dynamicflag%><%endfor%>
  129. <%endif%>
  130. <%if(staticflags)%>
  131. STATICFLAGS =<%foreach(staticflags)%> -D<%staticflag%><%endfor%>
  132. <%endif%>
  133. EXPORTFLAGS = <%if(exename)%><%if(need_staticflags)%>$(STATICFLAGS)<%endif%><%else%><%if(dll_ext && sharedname)%>$(DYNAMICFLAGS)<%else%>$(STATICFLAGS)<%endif%><%endif%>
  134. <%endif%>
  135. <%if(gnumake && libpaths)%>
  136. <%if(exename || sharedname)%>
  137. DEPLIBS = $(foreach lib,<%foreach(libs)%> <%libname_prefix%><%lib%>$(LIBSUFFIX)<%endfor%> <%lit_libs%>, $(foreach libpath,<%foreach(libpaths)%><%if(targetoutdir)%> <%libpath%>/<%targetoutdir%><%endif%> <%libpath%><%endfor%>, $(wildcard $(libpath)/lib$(lib)<%lib_ext(".a")%>)))
  138. <%endif%>
  139. <%endif%>
  140. <%if(multiple(configurations) || multiple(platforms))%>
  141. endif
  142. <%endif%>
  143. <%endfor%>
  144. <%if(supports_include && make_include)%>
  145. include <%make_include%>
  146. <%endif%>
  147. <%marker(macros)%>
  148. #----------------------------------------------------------------------------
  149. # Local targets
  150. #----------------------------------------------------------------------------
  151. <%if(exename)%>
  152. all:<%if(prebuild)%> __prebuild__<%endif%> $(BIN)<%if(postbuild)%> __postbuild__<%endif%>
  153. <%if(specialscript)%>
  154. specialscript:
  155. @echo '<%specialscript%>' > $@
  156. @<%chmod("chmod")%> 755 $@
  157. <%endif%>
  158. <%if(prelinktarget)%>
  159. <%prelinktarget%>: specialscript $(OBJS)
  160. @specialscript "$(NM)" "$(OBJS)" "$(LDLIBS)" "<%if(libpaths)%><%foreach(libpaths)%><%if(targetoutdir)%><%libpath%><%slash%><%targetoutdir%> <%endif%><%libpath%><%fornotlast(" ")%><%endfor%><%else%>.<%endif%>" "$(BIN)" "$@"
  161. @$(RM) specialscript
  162. <%if(prelinktargetobj)%>
  163. <%targetoutdir%><%obj_dir%><%prelinktargetobj%>: <%prelinktarget%>
  164. $(COMPILE.cc) $(OUTPUT_OPTION) <%prelinktarget%>
  165. @$(RM) <%prelinktarget%>
  166. <%endif%>
  167. <%endif%>
  168. $(BIN):<%if(tempinc)%> $(TEMPINCDIR)<%endif%><%if(prelinktargetobj)%> <%targetoutdir%><%obj_dir%><%prelinktargetobj%><%else%><%if(prelinktarget)%> <%prelinktarget%><%endif%><%endif%> $(OBJS)<%if(gnumake && libpaths)%> $(DEPLIBS)<%endif%>
  169. @$(TESTDIRSTART) "$(BTARGETDIR)" $(TESTDIREND) $(MKDIR) "$(BTARGETDIR)"
  170. <%if(prelink)%>
  171. <%eval(prelink)%>
  172. <%endif%>
  173. $(LINK.cc) $(OBJS) $(LDLIBS)<%if(exe_linkflags)%> <%eval(exe_linkflags)%><%endif%> $(OUTPUT_OPTION)
  174. <%if(postlinkbinary)%>
  175. <%postlinkbinary%>
  176. <%endif%>
  177. <%endif%>
  178. <%if(dll_ext && sharedname)%>
  179. all:<%if(prebuild)%> __prebuild__<%endif%><%if(version && versupport)%> $(SHLIB).<%version%><%endif%> $(SHLIB)<%if(postbuild)%> __postbuild__<%endif%>
  180. <%if(version && versupport)%>
  181. $(SHLIB):
  182. cd $(SHTARGETDIR) && ln -s $(SHLIB_BASE).<%version%> $(SHLIB_BASE)
  183. <%endif%>
  184. $(SHLIB)<%if(version && versupport)%>.<%version%><%endif%>: <%if(tempinc)%>$(TEMPINCDIR) <%endif%>$(OBJS)<%if(gnumake && libpaths)%> $(DEPLIBS)<%endif%>
  185. @$(TESTDIRSTART) "$(SHTARGETDIR)" $(TESTDIREND) $(MKDIR) "$(SHTARGETDIR)"
  186. <%if(prelink)%>
  187. <%eval(prelink)%>
  188. <%endif%>
  189. <%if(dmclink)%>
  190. link /impl <%if(pch_source && pchsupport)%><%targetoutdir%><%obj_dir%><%noextension(pch_source)%>$(OBJEXT)+<%endif%><%foreach(source_files)%><%if(targetoutdir || obj_dir)%><%targetoutdir%><%obj_dir%><%transdir(source_file)%><%basenoextension(source_file)%><%else%><%noextension(source_file)%><%endif%>$(OBJEXT)<%fornotlast("+")%><%endfor%>,$@,<%ldlibs%><%if(rc)%><%foreach(resource_files)%><%forfirst(",,")%><%targetoutdir%><%obj_dir%><%resource_file%>$(RESEXT)<%fornotlast("+")%><%endfor%><%endif%>
  191. <%else%>
  192. $(LINK.cc) $(SHFLAGS) $(OBJS) $(LDLIBS) $(OUTPUT_OPTION)
  193. <%endif%>
  194. <%else%>
  195. <%if(staticname)%>
  196. all:<%if(prebuild)%> __prebuild__<%endif%> $(LIB)<%if(postbuild)%> __postbuild__<%endif%>
  197. <%endif%>
  198. <%endif%>
  199. <%if(staticname)%>
  200. $(LIB): <%if(tempinc)%>$(TEMPINCDIR) <%endif%>$(OBJS)
  201. @$(TESTDIRSTART) "$(LTARGETDIR)" $(TESTDIREND) $(MKDIR) "$(LTARGETDIR)"
  202. $(AR) $(ARFLAGS) <%libgenopt%>$(LIB) $(OBJS)<%if(tempinc)%> `find $(TEMPINCDIR) -name \*.o\*`<%endif%>
  203. <%if(ranlib)%>
  204. ranlib $(LIB)
  205. <%endif%>
  206. <%endif%>
  207. <%if(custom_types)%>
  208. <%if(gnumake)%>
  209. SPACE = $(should_be_unset) $(should_be_unset)
  210. <%endif%>
  211. 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)%><%slash%><%basename(custom_type->input_file->output_file)%><%else%><%custom_type->input_file->output_file%><%endif%><%endfor%><%endif%><%endfor%><%endfor%>
  212. <%if(!source_files)%>
  213. all:<%if(prebuild)%> __prebuild__<%endif%> $(GENERATED_DIRTY)<%if(postbuild)%> __postbuild__<%endif%>
  214. <%endif%>
  215. <%foreach(custom_types)%>
  216. <%if(expanded_variable_assignment && custom_type->libpath)%>
  217. DYLD_LIBRARY_PATH := $(DYLD_LIBRARY_PATH):<%custom_type->libpath%>
  218. LD_LIBRARY_PATH := $(LD_LIBRARY_PATH):<%custom_type->libpath%>
  219. SHLIB_PATH := $(SHLIB_PATH):<%custom_type->libpath%>
  220. LIBPATH := $(LIBPATH):<%custom_type->libpath%>
  221. PATH := $(PATH):<%custom_type->libpath%>
  222. <%endif%>
  223. <%foreach(custom_type->input_files)%>
  224. <%if(custom_type->input_file->output_files)%>
  225. <%if(notparallel && multiple(custom_type->input_file->output_files))%>
  226. .NOTPARALLEL:
  227. <%endif%>
  228. <%foreach(custom_type->input_file->output_files)%><%if(flag_overrides(custom_type->input_file, gendir))%><%flag_overrides(custom_type->input_file, gendir)%><%slash%><%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)%><%foreach(custom_type->input_file->dependencies)%><%if(gnumake)%><%if(contains(custom_type->input_file->dependencie, \$))%> $(subst $(SPACE),\$(SPACE),<%custom_type->input_file->dependencie%>)<%else%> <%scope(enter, escape, \\s)%><%custom_type->input_file->dependencie%><%scope(leave)%><%endif%><%else%><%if(!contains(custom_type->input_file->dependencie, \$))%> <%scope(enter, escape, \\s)%><%custom_type->input_file->dependencie%><%scope(leave)%><%endif%><%endif%><%endfor%><%endif%><%if(flag_overrides(custom_type->input_file, dependent))%><%foreach(dep, flag_overrides(custom_type->input_file, dependent))%><%if(gnumake)%><%if(contains(dep, \$))%> $(subst $(SPACE),\$(SPACE),<%dep%>)<%else%> <%scope(enter, escape, \\s)%><%dep%><%scope(leave)%><%endif%><%else%><%if(!contains(dep, \$))%> <%scope(enter, escape, \\s)%><%dep%><%scope(leave)%><%endif%><%endif%><%endfor%><%else%><%if(custom_type->dependent)%><%foreach(custom_type->dependent)%><%if(gnumake)%><%if(contains(custom_type->dependent, \$))%> $(subst $(SPACE),\$(SPACE),<%custom_type->dependent%>)<%else%> <%scope(enter, escape, \\s)%><%custom_type->dependent%><%scope(leave)%><%endif%><%else%><%if(!contains(custom_type->dependent, \$))%> <%scope(enter, escape, \\s)%><%custom_type->dependent%><%scope(leave)%><%endif%><%endif%><%endfor%><%endif%><%endif%><%if(!need_staticflags)%><%if(flag_overrides(custom_type->input_file, dependent_libs))%><%foreach(dep_lib, flag_overrides(custom_type->input_file, dependent_libs))%><%if(gnumake)%><%if(contains(dep_lib, \$))%> $(subst $(SPACE),\$(SPACE),<%dirname(dep_lib)%>/$(LIBPREFIX)<%basename(dep_lib)%>$(LIBSUFFIX)$(SOEXT))<%else%> <%scope(enter, escape, \\s)%><%dirname(dep_lib)%>/$(LIBPREFIX)<%basename(dep_lib)%>$(LIBSUFFIX)$(SOEXT)<%scope(leave)%><%endif%><%else%><%if(!contains(dep_lib, \$))%> <%scope(enter, escape, \\s)%><%dirname(dep_lib)%>/$(LIBPREFIX)<%basename(dep_lib)%>$(LIBSUFFIX)$(SOEXT)<%scope(leave)%><%endif%><%endif%><%endfor%><%else%><%if(custom_type->dependent_libs)%><%foreach(custom_type->dependent_libs)%><%if(gnumake)%><%if(contains(custom_type->dependent_libs, \$))%> $(subst $(SPACE),\$(SPACE),<%dirname(custom_type->dependent_lib)%>/$(LIBPREFIX)<%basename(custom_type->dependent_lib)%>$(LIBSUFFIX)$(SOEXT))<%else%> <%scope(enter, escape, \\s)%><%dirname(custom_type->dependent_lib)%>/$(LIBPREFIX)<%basename(custom_type->dependent_lib)%>$(LIBSUFFIX)$(SOEXT)<%scope(leave)%><%endif%><%else%><%if(!contains(custom_type->dependent_libs, \$))%> <%scope(enter, escape, \\s)%><%dirname(custom_type->dependent_lib)%>/$(LIBPREFIX)<%basename(custom_type->dependent_lib)%>$(LIBSUFFIX)$(SOEXT)<%scope(leave)%><%endif%><%endif%><%endfor%><%endif%><%endif%><%endif%>
  229. <%if(flag_overrides(custom_type->input_file, gendir))%>
  230. @$(TESTDIRSTART) "<%flag_overrides(custom_type->input_file, gendir)%>" $(TESTDIREND) $(MKDIR) "<%flag_overrides(custom_type->input_file, gendir)%>"
  231. <%endif%>
  232. <%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%>
  233. <%if(flag_overrides(custom_type->input_file, postcommand))%>
  234. <%foreach(custom_type->input_file)%>
  235. <%flag_overrides(custom_type->input_file, postcommand)%>
  236. <%endfor%>
  237. <%else%>
  238. <%if(custom_type->postcommand)%>
  239. <%foreach(custom_type->input_file)%>
  240. <%custom_type->postcommand%>
  241. <%endfor%>
  242. <%endif%>
  243. <%endif%>
  244. <%if(pchsupport && pch_header)%>
  245. <%if(custom_type->pch_postrule)%>
  246. <%foreach(custom_type->input_file->source_output_files)%>
  247. @echo <%echo_outer_quote("'")%>#include "<%pch_header%>"<%echo_outer_quote("'")%> > temp.$$$$ && $(CAT) <%if(flag_overrides(custom_type->input_file, gendir))%><%flag_overrides(custom_type->input_file, gendir)%><%slash%><%basename(custom_type->input_file->source_output_file)%><%else%><%custom_type->input_file->source_output_file%><%endif%> >> temp.$$$$ && $(MV) temp.$$$$ <%if(flag_overrides(custom_type->input_file, gendir))%><%flag_overrides(custom_type->input_file, gendir)%><%slash%><%basename(custom_type->input_file->source_output_file)%><%else%><%custom_type->input_file->source_output_file%><%endif%>
  248. <%endfor%>
  249. <%endif%>
  250. <%endif%>
  251. <%endif%>
  252. <%endfor%>
  253. <%endfor%>
  254. .PRECIOUS: $(GENERATED_DIRTY)
  255. <%if(source_files)%>
  256. $(OBJS): $(GENERATED_DIRTY)
  257. <%endif%>
  258. <%endif%>
  259. generated:<%if(prebuild)%> __prebuild__<%endif%> $(GENERATED_DIRTY)
  260. @-:
  261. <%if(tempinc)%>
  262. $(TEMPINCDIR):
  263. @-$(TESTDIRSTART) "$(TEMPINCDIR)" $(TESTDIREND) $(MKDIR) "$(TEMPINCDIR)" 2> $(NUL)
  264. <%endif%>
  265. <%if(pch_source && pchsupport)%>
  266. <%targetoutdir%><%obj_dir%><%noextension(pch_source)%>$(OBJEXT): <%pch_source%>
  267. <%if(targetoutdir || obj_dir)%>
  268. @$(TESTDIRSTART) "<%targetoutdir%><%obj_dir%><%dirname(pch_source)%>" $(TESTDIREND) $(MKDIR) "<%targetoutdir%><%obj_dir%><%dirname(pch_source)%>"
  269. <%endif%>
  270. <%if(ends_with(pch_source, \.c))%>$(COMPILE.c)<%else%>$(COMPILE.cc)<%endif%> <%if(pchcreate)%><%pchcreate%><%targetoutdir%><%obj_dir%><%pch_header%><%pchext%> <%endif%>$(EXPORTFLAGS)<%if(!pchnobj)%> $(OUTPUT_OPTION)<%endif%> <%pch_source%>
  271. <%if(pchnobj)%>
  272. @$(CP) <%targetoutdir%><%obj_dir%><%pch_header%><%pchext%> <%targetoutdir%><%obj_dir%><%noextension(pch_source)%>$(OBJEXT)
  273. <%endif%>
  274. <%endif%>
  275. <%foreach(source_files)%>
  276. <%if(targetoutdir || obj_dir)%><%targetoutdir%><%obj_dir%><%transdir(source_file)%><%basenoextension(source_file)%><%else%><%noextension(source_file)%><%endif%>$(OBJEXT): <%source_file%>
  277. <%if(targetoutdir || obj_dir)%>
  278. @$(TESTDIRSTART) "<%targetoutdir%><%obj_dir%><%transdir(source_file)%>" $(TESTDIREND) $(MKDIR) "<%targetoutdir%><%obj_dir%><%transdir(source_file)%>"
  279. <%endif%>
  280. <%if(ends_with(source_file, \.c) || ends_with(source_file, \.[Ss]))%>$(COMPILE.c)<%else%>$(COMPILE.cc)<%endif%> <%if(flag_overrides(source_file, buildflags))%><%flag_overrides(source_file, buildflags)%> <%endif%><%if(pchuse && pch_source && pchsupport)%><%pchuse%><%pch_header%><%pchext%> <%if(pchstop)%><%pchstop%><%pch_header%><%endif%><%endif%>$(EXPORTFLAGS) $(OUTPUT_OPTION) <%source_file%>
  281. <%if(source_file->postcommand)%>
  282. <%source_file->postcommand%>
  283. <%endif%>
  284. <%endfor%>
  285. <%if(resource_files)%>
  286. <%if(rc)%>
  287. <%foreach(resource_files)%>
  288. <%targetoutdir%><%obj_dir%><%resource_file%>$(RESEXT):
  289. <%if(targetoutdir || obj_dir)%>
  290. @$(TESTDIRSTART) "<%targetoutdir%><%obj_dir%><%dirname(resource_file)%>" $(TESTDIREND) $(MKDIR) "<%targetoutdir%><%obj_dir%><%dirname(resource_file)%>"
  291. <%endif%>
  292. <%rc%><%foreach(includes)%> -I<%include%><%endfor%> <%resource_file%> <%targetoutdir%><%obj_dir%><%resource_file%>$(RESEXT)
  293. <%endfor%>
  294. <%endif%>
  295. <%endif%>
  296. clean:
  297. -$(RM) $(OBJS)
  298. <%if(pch_source && pchsupport)%>
  299. -$(RM) <%targetoutdir%><%obj_dir%><%pch_header%><%pchext%>
  300. <%endif%>
  301. <%if(clean)%>
  302. -$(RM) <%clean%><%if(sharedname)%><%foreach(dir, clean)%> $(SHTARGETDIR)<%dir%><%endfor%><%endif%><%if(staticname || sharedname)%><%foreach(dir, clean)%> $(LTARGETDIR)<%dir%><%endfor%><%endif%><%if(exename)%><%foreach(dir, clean)%> $(BTARGETDIR)<%dir%><%endfor%><%endif%>
  303. <%endif%>
  304. realclean: clean
  305. -$(RM) <%if(exename)%>$(BIN)<%else%><%if(dll_ext && sharedname && version && versupport)%>$(SHLIB).<%version%> <%endif%>$(SHLIB) $(LIB)<%endif%>
  306. <%if(custom_types)%>
  307. -$(RM) $(GENERATED_DIRTY)
  308. <%endif%>
  309. <%if(obj_dir)%>
  310. -$(RM) <%targetoutdir%><%obj_dir%>
  311. <%endif%>
  312. <%if(postclean)%>
  313. -<%eval(postclean)%>
  314. <%endif%>
  315. check-syntax:
  316. $(COMPILE.cc) $(EXPORTFLAGS)<%if(checkopt)%> <%checkopt%><%endif%> $(CHK_SOURCES)
  317. <%if(prebuild)%>
  318. __prebuild__:
  319. @<%eval(prebuild)%>
  320. <%endif%>
  321. <%if(postbuild)%>
  322. __postbuild__:<%if(exename)%> $(BIN)<%endif%><%if(dll_ext && sharedname)%><%if(version && versupport)%> $(SHLIB).<%version%><%endif%> $(SHLIB)<%endif%><%if(staticname)%> $(LIB)<%endif%>
  323. @<%eval(postbuild)%>
  324. <%endif%>
  325. <%marker(local)%>
  326. #----------------------------------------------------------------------------
  327. # Dependencies
  328. #----------------------------------------------------------------------------
  329. <%if(!gnumake)%>
  330. $(DEPENDENCIES):
  331. @$(TOUCH) $(DEPENDENCIES)
  332. <%endif%>
  333. depend:
  334. <%if(source_files || pch_source)%>
  335. -<%if(targetoutdir || obj_dir)%>VDIR='<%subst(targetoutdir,\$,$$)%><%subst(obj_dir,\$,$$)%>' <%endif%><%depgen("$(MPC_ROOT)/depgen.pl")%> <%depgen_flags%> $(CFLAGS) $(CCFLAGS) $(CPPFLAGS) -f $(DEPENDENCIES) $(SRC) 2> $(NUL)
  336. <%else%>
  337. @-:
  338. <%endif%>
  339. <%if(forlast)%>
  340. <%if(supports_include)%>
  341. <%if(gnumake)%>-<%endif%>include $(DEPENDENCIES)
  342. <%else%>
  343. # DO NOT DELETE THIS LINE
  344. <%endif%>
  345. <%endif%>
  346. <%endfor%>
  347. <%endfor%>
  348. <%marker(bottom)%>