Add languagestandard variable
[MPC.git] / templates / make.net.mpd
blob258abbddf678d6373970fa97baf448c3d3667ada
1 #----------------------------------------------------------------------------
2 #       Macros
3 #----------------------------------------------------------------------------
4 <%marker(top)%>
5 <%foreach(compilers)%>
7 ICONOPT         =<%foreach(ico_files)%><%if(forfirst)%> <%ico_flag%><%ico_file%><%endif%><%endfor%>
8 RESXOPT         =<%foreach(resx_files)%> <%resx_flag%><%resx_file%><%endfor%>
9 TARGETDIR       = <%if(exename && exeout)%><%exeout%><%slash%><%targetoutdir%><%else%><%if(sharedname && libout)%><%libout%><%slash%><%targetoutdir%><%else%>.<%slash%><%targetoutdir%><%endif%><%endif%>
10 TARGET          =<%if(exename)%> $(TARGETDIR)<%exename%><%exe_ext%><%else%><%if(sharedname)%> $(TARGETDIR)<%lib_prefix%><%libname_prefix%><%sharedname%><%dll_ext%><%endif%><%endif%>
11 LDFLAGS         =<%if(libpaths)%> <%lib_flag%><%foreach(libpaths)%><%libpath%><%fornotlast(",")%><%endfor%><%endif%><%if(libs || lit_libs || pure_libs)%> <%ref_flag%><%foreach(libs)%><%libname_prefix%><%lib%><%if(lit_libs || pure_libs)%>,<%else%><%fornotlast(",")%><%endif%><%endfor%><%foreach(lit_libs pure_libs)%><%lit_lib%><%fornotlast(",")%><%endfor%><%endif%><%if(packages)%> <%pkg_flag%><%foreach(packages)%><%package%><%fornotlast(",")%><%endfor%><%endif%>
12 CFLAGS          =<%if(compile_flags)%> <%compile_flags%><%endif%> <%if(optimize)%><%opt_flag%><%else%><%def_flag%>DESIGN,DEBUG<%endif%><%if(trace)%> <%def_flag%>TRACE<%endif%><%if(macros)%> <%def_flag%><%foreach(macros)%><%macro%><%fornotlast(",")%><%endfor%><%endif%><%if(keyfile)%> <%key_flag%><%keyfile%><%endif%><%if(compares(allowunsafeblocks, true))%> <%unsafe_flag%><%endif%>
13 TESTDIRSTART    = <%testdirstart("test -d")%>
14 TESTDIREND      = <%testdirend("||")%>
15 CAT             = <%type("cat")%>
16 MV              = <%move("mv -f")%>
17 RM              = <%delete("rm -rf")%>
18 CP              = <%copy("cp -p")%>
19 NUL             = <%devnull("/dev/null")%>
20 MKDIR           = <%makedir("mkdir -p")%>
21 <%if(custom_types)%>
22 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%>
23 <%endif%>
24 <%if(exename)%>
25 MONO_ETC        = /etc/mono
26 MONO_CONFIG     = $(MONO_ETC)/config
27 BIN             = $(TARGETDIR)<%exename%>
28 <%endif%>
29 <%if(supports_include && make_include)%>
31 include <%make_include%>
32 <%endif%>
33 <%marker(macros)%>
35 #----------------------------------------------------------------------------
36 #       Local targets
37 #----------------------------------------------------------------------------
39 all:<%if(prebuild)%> __prebuild__<%endif%> $(GENERATED_DIRTY) $(TARGET)<%if(postbuild)%> __postbuild__<%endif%>
41 <%if(exename)%>
42 $(TARGET): <%source_files%>
43         @$(TESTDIRSTART) "$(TARGETDIR)" $(TESTDIREND) $(MKDIR) "$(TARGETDIR)"
44         <%compiler%> <%if(winapp)%><%winexe_flag%><%else%><%exe_flag%><%endif%> <%out_flag%>$(TARGET) $(CFLAGS) $(LDFLAGS) $(ICONOPT) $(RESXOPT) <%source_files%>
46 $(BIN): $(TARGET)
47         <%mkbundle%> --static --deps -z --config $(MONO_CONFIG) $(TARGET) $(CONFIG_DIR_OPT) -o $(BIN)
48         strip $(BIN)
50 bundle: $(BIN)
52 <%else%>
53 <%if(sharedname)%>
54 $(TARGET): <%source_files%>
55         @$(TESTDIRSTART) "$(TARGETDIR)" $(TESTDIREND) $(MKDIR) "$(TARGETDIR)"
56         <%compiler%> <%shared_flag%> <%out_flag%>$(TARGET) $(CFLAGS) $(LDFLAGS) $(ICONOPT) $(RESXOPT) <%source_files%>
58 bundle:
60 <%endif%>
61 <%endif%>
62 <%if(custom_types)%>
63 <%foreach(custom_types)%>
64 <%if(expanded_variable_assignment && custom_type->libpath)%>
65 DYLD_LIBRARY_PATH := $(DYLD_LIBRARY_PATH):<%custom_type->libpath%>
66 LD_LIBRARY_PATH   := $(LD_LIBRARY_PATH):<%custom_type->libpath%>
67 SHLIB_PATH        := $(SHLIB_PATH):<%custom_type->libpath%>
68 LIBPATH           := $(LIBPATH):<%custom_type->libpath%>
69 PATH              := $(PATH):<%custom_type->libpath%>
71 <%endif%>
72 <%foreach(custom_type->input_files)%>
73 <%if(custom_type->input_file->output_files)%>
74 <%if(multiple(custom_type->input_file->output_files))%>
75 .NOTPARALLEL:
76 <%endif%>
77 <%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)%> <%custom_type->input_file->dependencies%><%endif%><%if(flag_overrides(custom_type->input_file, dependent))%> <%flag_overrides(custom_type->input_file, dependent)%><%else%><%if(custom_type->dependent)%> <%custom_type->dependent%><%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))%><%dirname(dep_lib)%>/<%lib_prefix%><%libname_prefix%><%basename(dep_lib)%><%dll_ext%><%endfor%><%else%><%if(custom_type->dependent_libs)%><%foreach(custom_type->dependent_libs)%><%dirname(custom_type->dependent_lib)%>/<%lib_prefix%><%libname_prefix%><%basename(custom_type->dependent_lib)%><%dll_ext%><%endfor%><%endif%><%endif%><%endif%>
78 <%if(flag_overrides(custom_type->input_file, gendir))%>
79         @$(TESTDIRSTART) "<%flag_overrides(custom_type->input_file, gendir)%>" $(TESTDIREND) $(MKDIR) "<%flag_overrides(custom_type->input_file, gendir)%>"
80 <%endif%>
81         <%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%>
82 <%if(flag_overrides(custom_type->input_file, postcommand))%>
83 <%foreach(custom_type->input_file)%>
84         <%flag_overrides(custom_type->input_file, postcommand)%>
85 <%endfor%>
86 <%else%>
87 <%if(custom_type->postcommand)%>
88 <%foreach(custom_type->input_file)%>
89         <%custom_type->postcommand%>
90 <%endfor%>
91 <%endif%>
92 <%endif%>
94 <%endif%>
95 <%endfor%>
96 <%endfor%>
97 .PRECIOUS: $(GENERATED_DIRTY)
98 <%endif%>
99 generated: $(GENERATED_DIRTY)
100         @-:
102 clean:
103         -$(RM) $(TARGET)<%if(exename)%> $(BIN)<%endif%><%if(clean)%> <%clean%><%endif%>
105 realclean: clean
106 <%if(custom_types)%>
107         -$(RM) $(GENERATED_DIRTY)
108 <%endif%>
109 <%if(postclean)%>
110         -<%eval(postclean)%>
111 <%endif%>
113 <%if(prebuild)%>
114 __prebuild__:
115         @<%eval(prebuild)%>
117 <%endif%>
118 <%if(postbuild)%>
119 __postbuild__:
120         @<%eval(postbuild)%>
122 <%endif%>
123 <%marker(local)%>
124 #----------------------------------------------------------------------------
125 #       Dependencies
126 #----------------------------------------------------------------------------
128 depend:
129         @-:
130 <%endfor%>
131 <%marker(bottom)%>