Subversion Repositories gelsvn

Rev

Rev 107 | Only display areas with differences | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 107 Rev 119
1
#----------------------------------------------------------------------------
1
#----------------------------------------------------------------------------
2
#       Macros
2
#       Macros
3
#----------------------------------------------------------------------------
3
#----------------------------------------------------------------------------
4
<%marker(top)%>
4
<%marker(top)%>
5
<%foreach(configurations)%>
5
<%foreach(configurations)%>
6
CXX           = <%cxx%>
6
CXX           = <%cxx%>
7
<%if(ld)%>
7
<%if(ld)%>
8
LD            = <%ld%>
8
LD            = <%ld%>
9
<%else%>
9
<%else%>
10
LD            = $(CXX) $(CCFLAGS) $(CPPFLAGS)
10
LD            = $(CXX) $(CCFLAGS) $(CPPFLAGS)
11
<%endif%>
11
<%endif%>
12
AR            = <%if(ar)%><%ar%><%else%>ar<%endif%>
12
AR            = <%if(ar)%><%ar%><%else%>ar<%endif%>
13
<%if(nm)%>
13
<%if(nm)%>
14
NM            = <%nm%>
14
NM            = <%nm%>
15
<%endif%>
15
<%endif%>
16
<%if(cputype)%>
16
<%if(cputype)%>
17
CPUTYPE       = <%cputype%>
17
CPUTYPE       = <%cputype%>
18
<%endif%>
18
<%endif%>
19
<%if(cpu)%>
19
<%if(cpu)%>
20
CPU           = <%cpu%>
20
CPU           = <%cpu%>
21
<%endif%>
21
<%endif%>
22
<%if(pic)%>
22
<%if(pic)%>
23
PICFLAGS      = <%pic%>
23
PICFLAGS      = <%pic%>
24
<%endif%>
24
<%endif%>
25
CPPFLAGS      = $(PICFLAGS) $(GENFLAGS)<%if(compile_flags)%> <%compile_flags%><%endif%><%if(cpu)%> -DCPU=$(CPU)<%endif%><%if(tempinc)%> <%tempincopt%>$(TEMPINCDIR)<%endif%><%if(compilerflags)%> <%compilerflags%><%endif%><%if(build64bit && compilerflags64)%> <%compilerflags64%><%endif%><%if(pch_source && pchsupport)%><%foreach(pch_defines)%> -D<%pch_define%><%endfor%><%endif%><%foreach(platforms)%><%if(extracppflags)%> <%extracppflags%><%endif%><%endfor%><%if(includes)%><%foreach(includes)%> -I<%include%><%endfor%><%endif%><%if(macros)%><%foreach(macros)%> -D<%macro%><%endfor%><%endif%>
25
CPPFLAGS      = $(PICFLAGS) $(GENFLAGS)<%if(compile_flags)%> <%compile_flags%><%endif%><%if(cpu)%> -DCPU=$(CPU)<%endif%><%if(tempinc)%> <%tempincopt%>$(TEMPINCDIR)<%endif%><%if(compilerflags)%> <%compilerflags%><%endif%><%if(build64bit && compilerflags64)%> <%compilerflags64%><%endif%><%if(pch_source && pchsupport)%><%foreach(pch_defines)%> -D<%pch_define%><%endfor%><%endif%><%foreach(platforms)%><%if(extracppflags)%> <%extracppflags%><%endif%><%endfor%><%if(includes)%><%foreach(includes)%> -I<%include%><%endfor%><%endif%><%if(macros)%><%foreach(macros)%> -D<%macro%><%endfor%><%endif%>
26
OBJEXT        = <%obj_ext%>
26
OBJEXT        = <%obj_ext%>
27
OUTPUT_OPTION = <%output_option(-o \"$@\")%>
27
OUTPUT_OPTION = <%output_option(-o \"$@\")%>
28
COMPILE.cc    = $(CXX) $(CCFLAGS) $(CPPFLAGS) <%compile_option("-c")%>
28
COMPILE.cc    = $(CXX) $(CCFLAGS) $(CPPFLAGS) <%compile_option("-c")%>
29
<%foreach(platforms)%>
29
<%foreach(platforms)%>
30
<%if(build64bit && arflags64)%>
30
<%if(build64bit && arflags64)%>
31
ARFLAGS       = <%if(extraarflags)%><%extraarflags%> <%endif%><%arflags64%>
31
ARFLAGS       = <%if(extraarflags)%><%extraarflags%> <%endif%><%arflags64%>
32
<%else%>
32
<%else%>
33
<%if(arflags)%>
33
<%if(arflags)%>
34
ARFLAGS       = <%if(extraarflags)%><%extraarflags%> <%endif%><%arflags%>
34
ARFLAGS       = <%if(extraarflags)%><%extraarflags%> <%endif%><%arflags%>
35
<%endif%>
35
<%endif%>
36
<%endif%>
36
<%endif%>
37
<%endfor%>
37
<%endfor%>
38
<%if(tempinc)%>
38
<%if(tempinc)%>
39
TEMPINCDIR    = <%tempinc%><%slash%><%project_name%>
39
TEMPINCDIR    = <%tempinc%><%slash%><%project_name%>
40
<%endif%>
40
<%endif%>
41
LDFLAGS       =<%if(libpaths)%><%foreach(libpaths)%> -L<%libpath%><%endfor%><%endif%><%if(linkflags)%> <%linkflags%><%endif%><%if(build64bit && linkflags64)%> <%linkflags64%><%endif%>
41
LDFLAGS       =<%if(libpaths)%><%foreach(libpaths)%> -L<%libpath%><%endfor%><%endif%><%if(linkflags)%> <%linkflags%><%endif%><%if(build64bit && linkflags64)%> <%linkflags64%><%endif%>
42
<%endfor%>
42
<%endfor%>
43
CCC           = $(CXX)
43
CCC           = $(CXX)
44
MAKEFILE      = <%project_file%>
44
MAKEFILE      = <%project_file%>
45
DEPENDENCIES  = .depend.$(MAKEFILE)
45
DEPENDENCIES  = .depend.$(MAKEFILE)
46
<%if(exename)%>
46
<%if(exename)%>
47
BTARGETDIR    = <%if(install)%><%install%><%else%>.<%endif%><%slash%><%targetoutdir%>
47
BTARGETDIR    = <%if(install)%><%install%><%else%>.<%endif%><%slash%><%targetoutdir%>
48
BIN           = $(BTARGETDIR)<%exename%>$(EXEEXT)
48
BIN           = $(BTARGETDIR)<%exename%>$(EXEEXT)
49
<%else%>
49
<%else%>
50
LTARGETDIR    = <%libout%><%slash%><%targetoutdir%>
50
LTARGETDIR    = <%libout%><%slash%><%targetoutdir%>
51
<%endif%>
51
<%endif%>
52
<%foreach(configurations)%>
52
<%foreach(configurations)%>
53
<%foreach(platforms)%>
53
<%foreach(platforms)%>
54
RM            = <%delete("rm -rf")%>
54
RM            = <%delete("rm -rf")%>
55
CP            = <%copy("cp -p")%>
55
CP            = <%copy("cp -p")%>
56
NUL           = <%devnull("/dev/null")%>
56
NUL           = <%devnull("/dev/null")%>
57
MKDIR         = <%makedir("mkdir -p")%>
57
MKDIR         = <%makedir("mkdir -p")%>
58
EXEEXT        = <%exe_ext%>
58
EXEEXT        = <%exe_ext%>
59
LIBPREFIX     = <%lib_prefix%>
59
LIBPREFIX     = <%lib_prefix%>
60
LDLIBS        =<%foreach(libs lit_libs)%> <%libopt%><%lib%><%endfor%><%foreach(pure_libs)%> <%pure_lib%><%endfor%> <%ldlibs%>
60
LDLIBS        =<%foreach(libs lit_libs)%> <%libopt%><%lib%><%endfor%><%foreach(pure_libs)%> <%pure_lib%><%endfor%> <%ldlibs%>
61
OBJS          =<%if(pch_source && pchsupport)%> <%targetoutdir%><%noextension(pch_source)%>$(OBJEXT)<%endif%><%foreach(source_files)%> <%targetoutdir%><%noextension(source_file)%>$(OBJEXT)<%endfor%><%if(rc)%><%foreach(resource_files)%> <%targetoutdir%><%resource_file%>$(OBJEXT)<%endfor%><%endif%>
61
OBJS          =<%if(pch_source && pchsupport)%> <%targetoutdir%><%noextension(pch_source)%>$(OBJEXT)<%endif%><%foreach(source_files)%> <%targetoutdir%><%noextension(source_file)%>$(OBJEXT)<%endfor%><%if(rc)%><%foreach(resource_files)%> <%targetoutdir%><%resource_file%>$(OBJEXT)<%endfor%><%endif%>
62
<%if(lib_ext)%>
62
<%if(lib_ext)%>
63
<%if(staticname)%>
63
<%if(staticname)%>
64
AREXT         = <%lib_ext%>
64
AREXT         = <%lib_ext%>
65
LIB           = $(LTARGETDIR)$(LIBPREFIX)<%staticname%>$(AREXT)
65
LIB           = $(LTARGETDIR)$(LIBPREFIX)<%staticname%>$(AREXT)
66
<%endif%>
66
<%endif%>
67
<%endif%>
67
<%endif%>
68
<%if(dll_ext)%>
68
<%if(dll_ext)%>
69
<%if(sharedname)%>
69
<%if(sharedname)%>
70
SOEXT         = <%dll_ext%>
70
SOEXT         = <%dll_ext%>
71
SHTARGETDIR   = <%if(dllout)%><%dllout%><%else%><%libout%><%endif%><%slash%><%targetoutdir%>
71
SHTARGETDIR   = <%if(dllout)%><%dllout%><%else%><%libout%><%endif%><%slash%><%targetoutdir%>
72
SHLIB         = $(SHTARGETDIR)$(LIBPREFIX)<%sharedname%>$(SOEXT)
72
SHLIB         = $(SHTARGETDIR)$(LIBPREFIX)<%sharedname%>$(SOEXT)
73
<%if(shflags)%>
73
<%if(shflags)%>
74
SHFLAGS       = <%shflags%>
74
SHFLAGS       = <%shflags%>
75
<%endif%>
75
<%endif%>
76
<%endif%>
76
<%endif%>
77
<%endif%>
77
<%endif%>
78
<%endfor%>
78
<%endfor%>
79
<%endfor%>
79
<%endfor%>
80
GENFLAGS      = <%genflags(-g)%>
80
GENFLAGS      = <%genflags(-g)%>
81
SRC           =<%if(pch_source && pchsupport)%> <%pch_source%><%endif%> <%source_files%>
81
SRC           =<%if(pch_source && pchsupport)%> <%pch_source%><%endif%> <%source_files%>
82
LINK.cc       = $(LD) $(LDFLAGS)
82
LINK.cc       = $(LD) $(LDFLAGS)
83
<%if(dynamicflags)%>
83
<%if(dynamicflags)%>
84
DYNAMICFLAGS  =<%foreach(dynamicflags)%> -D<%dynamicflag%><%endfor%>
84
DYNAMICFLAGS  =<%foreach(dynamicflags)%> -D<%dynamicflag%><%endfor%>
85
<%endif%>
85
<%endif%>
86
<%if(staticflags)%>
86
<%if(staticflags)%>
87
STATICFLAGS   =<%foreach(staticflags)%> -D<%staticflag%><%endfor%>
87
STATICFLAGS   =<%foreach(staticflags)%> -D<%staticflag%><%endfor%>
88
<%endif%>
88
<%endif%>
89
EXPORTFLAGS   = <%if(exename)%><%if(need_staticflags)%>$(STATICFLAGS)<%endif%><%else%><%foreach(configurations)%><%foreach(platforms)%><%if(dll_ext && sharedname)%>$(DYNAMICFLAGS)<%else%>$(STATICFLAGS)<%endif%><%endfor%><%endfor%><%endif%>
89
EXPORTFLAGS   = <%if(exename)%><%if(need_staticflags)%>$(STATICFLAGS)<%endif%><%else%><%foreach(configurations)%><%foreach(platforms)%><%if(dll_ext && sharedname)%>$(DYNAMICFLAGS)<%else%>$(STATICFLAGS)<%endif%><%endfor%><%endfor%><%endif%>
90
<%marker(macros)%>
90
<%marker(macros)%>
91
 
91
 
92
#----------------------------------------------------------------------------
92
#----------------------------------------------------------------------------
93
#       Local targets
93
#       Local targets
94
#----------------------------------------------------------------------------
94
#----------------------------------------------------------------------------
95
 
95
 
96
<%if(exename)%>
96
<%if(exename)%>
97
all: $(BIN)<%if(postbuild)%> __postbuild__<%endif%>
97
all: $(BIN)<%if(postbuild)%> __postbuild__<%endif%>
98
 
98
 
99
<%foreach(configurations)%>
99
<%foreach(configurations)%>
100
<%foreach(platforms)%>
100
<%foreach(platforms)%>
101
<%if(specialscript)%>
101
<%if(specialscript)%>
102
specialscript:
102
specialscript:
103
	@echo '<%specialscript%>' > specialscript
103
	@echo '<%specialscript%>' > specialscript
104
	@chmod 755 specialscript
104
	@chmod 755 specialscript
105
 
105
 
106
<%endif%>
106
<%endif%>
107
<%if(prelink)%>
107
<%if(prelink)%>
108
<%prelink%>: specialscript $(OBJS)
108
<%prelink%>: specialscript $(OBJS)
109
	@.<%slash%>specialscript $(NM) "$(OBJS)" "$(LDLIBS)" "<%if(libpaths)%><%libpaths%><%else%>.<%endif%>" <%prelink%>
109
	@.<%slash%>specialscript $(NM) "$(OBJS)" "$(LDLIBS)" "<%if(libpaths)%><%libpaths%><%else%>.<%endif%>" <%prelink%>
110
	@$(RM) specialscript
110
	@$(RM) specialscript
111
 
111
 
112
<%targetoutdir%><%noextension(prelink)%>$(OBJEXT): <%prelink%>
112
<%targetoutdir%><%noextension(prelink)%>$(OBJEXT): <%prelink%>
113
	$(COMPILE.cc) <%prelink%> $(OUTPUT_OPTION)
113
	$(COMPILE.cc) <%prelink%> $(OUTPUT_OPTION)
114
	@$(RM) <%prelink%>
114
	@$(RM) <%prelink%>
115
 
115
 
116
<%endif%>
116
<%endif%>
117
<%endfor%>
117
<%endfor%>
118
<%endfor%>
118
<%endfor%>
119
$(BTARGETDIR):
119
$(BTARGETDIR):
120
	@$(MKDIR) "$@"
120
	@$(MKDIR) "$@"
121
 
121
 
122
$(BIN): $(BTARGETDIR)<%foreach(configurations)%><%if(tempinc)%> $(TEMPINCDIR)<%endif%><%foreach(platforms)%><%if(prelink)%> <%targetoutdir%><%noextension(prelink)%>$(OBJEXT)<%endif%><%endfor%><%endfor%> $(OBJS)
122
$(BIN): $(BTARGETDIR)<%foreach(configurations)%><%if(tempinc)%> $(TEMPINCDIR)<%endif%><%foreach(platforms)%><%if(prelink)%> <%targetoutdir%><%noextension(prelink)%>$(OBJEXT)<%endif%><%endfor%><%endfor%> $(OBJS)
123
	$(LINK.cc) $(OUTPUT_OPTION) $(OBJS) $(LDLIBS)
123
	$(LINK.cc) $(OUTPUT_OPTION) $(OBJS) $(LDLIBS)
124
 
124
 
125
<%else%>
125
<%else%>
126
$(LTARGETDIR):
126
$(LTARGETDIR):
127
	@$(MKDIR) "$@"
127
	@$(MKDIR) "$@"
128
<%endif%>
128
<%endif%>
129
 
129
 
130
<%foreach(configurations)%>
130
<%foreach(configurations)%>
131
<%foreach(platforms)%>
131
<%foreach(platforms)%>
132
<%if(dll_ext)%>
132
<%if(dll_ext)%>
133
<%if(sharedname)%>
133
<%if(sharedname)%>
134
all: $(SHLIB)<%if(postbuild)%> __postbuild__<%endif%>
134
all: $(SHLIB)<%if(postbuild)%> __postbuild__<%endif%>
135
 
135
 
136
<%if(dllout)%>
136
<%if(dllout)%>
137
$(SHTARGETDIR):
137
$(SHTARGETDIR):
138
	@$(MKDIR) "$@"
138
	@$(MKDIR) "$@"
139
 
139
 
140
<%endif%>
140
<%endif%>
141
$(SHLIB): $(SHTARGETDIR) <%foreach(configurations)%><%if(tempinc)%>$(TEMPINCDIR) <%endif%><%endfor%>$(OBJS)
141
$(SHLIB): $(SHTARGETDIR) <%foreach(configurations)%><%if(tempinc)%>$(TEMPINCDIR) <%endif%><%endfor%>$(OBJS)
142
	<%foreach(configurations)%><%foreach(platforms)%><%if(dld)%><%dld%> $(LDFLAGS)<%else%>$(LINK.cc)<%endif%><%endfor%><%endfor%> $(SHFLAGS) $(OUTPUT_OPTION) $(OBJS) $(LDLIBS)
142
	<%foreach(configurations)%><%foreach(platforms)%><%if(dld)%><%dld%> $(LDFLAGS)<%else%>$(LINK.cc)<%endif%><%endfor%><%endfor%> $(SHFLAGS) $(OUTPUT_OPTION) $(OBJS) $(LDLIBS)
143
<%else%>
143
<%else%>
144
<%if(staticname)%>
144
<%if(staticname)%>
145
all: $(LIB)<%if(postbuild)%> __postbuild__<%endif%>
145
all: $(LIB)<%if(postbuild)%> __postbuild__<%endif%>
146
<%endif%>
146
<%endif%>
147
<%endif%>
147
<%endif%>
148
 
148
 
149
<%else%>
149
<%else%>
150
<%if(staticname)%>
150
<%if(staticname)%>
151
all: $(LIB)<%if(postbuild)%> __postbuild__<%endif%>
151
all: $(LIB)<%if(postbuild)%> __postbuild__<%endif%>
152
 
152
 
153
<%endif%>
153
<%endif%>
154
<%endif%>
154
<%endif%>
155
<%endfor%>
155
<%endfor%>
156
<%endfor%>
156
<%endfor%>
157
<%if(staticname)%>
157
<%if(staticname)%>
158
$(LIB): $(LTARGETDIR) <%foreach(configurations)%><%if(tempinc)%>$(TEMPINCDIR) <%endif%><%endfor%>$(OBJS)
158
$(LIB): $(LTARGETDIR) <%foreach(configurations)%><%if(tempinc)%>$(TEMPINCDIR) <%endif%><%endfor%>$(OBJS)
159
<%foreach(configurations)%>
159
<%foreach(configurations)%>
160
<%foreach(platforms)%>
160
<%foreach(platforms)%>
161
	$(AR) $(ARFLAGS) $(LIB) $(OBJS)<%if(tempinc)%> `find $(TEMPINCDIR) -type f`<%endif%>
161
	$(AR) $(ARFLAGS) $(LIB) $(OBJS)<%if(tempinc)%> `find $(TEMPINCDIR) -type f`<%endif%>
162
<%if(ranlib)%>
162
<%if(ranlib)%>
163
	ranlib $(LIB)
163
	ranlib $(LIB)
164
<%endif%>
164
<%endif%>
165
<%endfor%>
165
<%endfor%>
166
<%endfor%>
166
<%endfor%>
167
 
167
 
168
<%endif%>
168
<%endif%>
169
<%if(custom_types)%>
169
<%if(custom_types)%>
170
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%>
170
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%>
171
<%foreach(custom_types)%>
171
<%foreach(custom_types)%>
172
<%if(custom_type->libpath)%>
172
<%if(custom_type->libpath)%>
173
# These may be needed, but some versions of make do not accept this syntax
173
# These may be needed, but some versions of make do not accept this syntax
174
#DYLD_LIBRARY_PATH := $(DYLD_LIBRARY_PATH):<%custom_type->libpath%>
174
#DYLD_LIBRARY_PATH := $(DYLD_LIBRARY_PATH):<%custom_type->libpath%>
175
#LD_LIBRARY_PATH   := $(LD_LIBRARY_PATH):<%custom_type->libpath%>
175
#LD_LIBRARY_PATH   := $(LD_LIBRARY_PATH):<%custom_type->libpath%>
176
#SHLIB_PATH        := $(SHLIB_PATH):<%custom_type->libpath%>
176
#SHLIB_PATH        := $(SHLIB_PATH):<%custom_type->libpath%>
177
#LIBPATH           := $(LIBPATH):<%custom_type->libpath%>
177
#LIBPATH           := $(LIBPATH):<%custom_type->libpath%>
178
#PATH              := $(PATH):<%custom_type->libpath%>
178
#PATH              := $(PATH):<%custom_type->libpath%>
179
 
179
 
180
<%endif%>
180
<%endif%>
181
<%foreach(custom_type->input_files)%>
181
<%foreach(custom_type->input_files)%>
182
<%if(custom_type->input_file->output_files)%>
182
<%if(custom_type->input_file->output_files)%>
183
<%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%>
183
<%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%>
184
<%if(flag_overrides(custom_type->input_file, gendir))%>
184
<%if(flag_overrides(custom_type->input_file, gendir))%>
185
	@$(MKDIR) <%flag_overrides(custom_type->input_file, gendir)%>
185
	@$(MKDIR) <%flag_overrides(custom_type->input_file, gendir)%>
186
<%endif%>
186
<%endif%>
187
	<%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%> <%custom_type->input_file%><%if(custom_type->output_option)%> <%custom_type->output_option%> "$@"<%endif%>
187
	<%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%> <%custom_type->input_file%><%if(custom_type->output_option)%> <%custom_type->output_option%> "$@"<%endif%>
188
<%if(flag_overrides(custom_type->input_file, postcommand))%>
188
<%if(flag_overrides(custom_type->input_file, postcommand))%>
189
<%foreach(custom_type->input_file)%>
189
<%foreach(custom_type->input_file)%>
190
	<%flag_overrides(custom_type->input_file, postcommand)%>
190
	<%flag_overrides(custom_type->input_file, postcommand)%>
191
<%endfor%>
191
<%endfor%>
192
<%else%>
192
<%else%>
193
<%if(custom_type->postcommand)%>
193
<%if(custom_type->postcommand)%>
194
<%foreach(custom_type->input_file)%>
194
<%foreach(custom_type->input_file)%>
195
	<%custom_type->postcommand%>
195
	<%custom_type->postcommand%>
196
<%endfor%>
196
<%endfor%>
197
<%endif%>
197
<%endif%>
198
<%endif%>
198
<%endif%>
199
<%if(pch_header)%>
199
<%if(pch_header)%>
200
<%if(custom_type->pch_postrule)%>
200
<%if(custom_type->pch_postrule)%>
201
<%foreach(custom_type->input_file->source_output_files)%>
201
<%foreach(custom_type->input_file->source_output_files)%>
202
	@echo '#include "<%pch_header%>"' > 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%>
202
	@echo '#include "<%pch_header%>"' > 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%>
203
<%endfor%>
203
<%endfor%>
204
<%endif%>
204
<%endif%>
205
<%endif%>
205
<%endif%>
206
 
206
 
207
<%endif%>
207
<%endif%>
208
<%endfor%>
208
<%endfor%>
209
<%endfor%>
209
<%endfor%>
210
.PRECIOUS: $(GENERATED_DIRTY)
210
.PRECIOUS: $(GENERATED_DIRTY)
211
<%if(source_files)%>
211
<%if(source_files)%>
212
$(OBJS): $(GENERATED_DIRTY)
212
$(OBJS): $(GENERATED_DIRTY)
213
<%else%>
213
<%else%>
214
all: $(GENERATED_DIRTY)<%if(postbuild)%> __postbuild__<%endif%>
214
all: $(GENERATED_DIRTY)<%if(postbuild)%> __postbuild__<%endif%>
215
<%endif%>
215
<%endif%>
216
 
216
 
217
<%endif%>
217
<%endif%>
218
generated: $(GENERATED_DIRTY)
218
generated: $(GENERATED_DIRTY)
219
	@-:
219
	@-:
220
 
220
 
221
<%foreach(configurations)%>
221
<%foreach(configurations)%>
222
<%if(tempinc)%>
222
<%if(tempinc)%>
223
$(TEMPINCDIR):
223
$(TEMPINCDIR):
224
	@-test -d $(TEMPINCDIR) || $(MKDIR) $(TEMPINCDIR) 2> $(NUL) || true
224
	@-test -d $(TEMPINCDIR) || $(MKDIR) $(TEMPINCDIR) 2> $(NUL) || true
225
 
225
 
226
<%endif%>
226
<%endif%>
227
<%if(pch_source && pchsupport)%>
227
<%if(pch_source && pchsupport)%>
228
<%targetoutdir%><%noextension(pch_source)%>$(OBJEXT): <%pch_source%>
228
<%targetoutdir%><%noextension(pch_source)%>$(OBJEXT): <%pch_source%>
229
	$(COMPILE.cc) <%if(pchcreate)%><%pchcreate%><%targetoutdir%><%pch_header%>.gch <%endif%>$(EXPORTFLAGS) <%pch_source%><%if(!pchnobj)%> $(OUTPUT_OPTION)<%endif%>
229
	$(COMPILE.cc) <%if(pchcreate)%><%pchcreate%><%targetoutdir%><%pch_header%>.gch <%endif%>$(EXPORTFLAGS) <%pch_source%><%if(!pchnobj)%> $(OUTPUT_OPTION)<%endif%>
230
<%if(pchnobj)%>
230
<%if(pchnobj)%>
231
	@$(CP) <%pch_header%>.gch <%targetoutdir%><%noextension(pch_source)%>$(OBJEXT)
231
	@$(CP) <%pch_header%>.gch <%targetoutdir%><%noextension(pch_source)%>$(OBJEXT)
232
<%endif%>
232
<%endif%>
233
 
233
 
234
<%endif%>
234
<%endif%>
235
<%foreach(source_files)%>
235
<%foreach(source_files)%>
236
<%targetoutdir%><%noextension(source_file)%>$(OBJEXT): <%source_file%>
236
<%targetoutdir%><%noextension(source_file)%>$(OBJEXT): <%source_file%>
237
<%if(targetoutdir)%>
237
<%if(targetoutdir)%>
238
	@$(MKDIR) <%targetoutdir%><%dirname(source_file)%>
238
	@$(MKDIR) <%targetoutdir%><%dirname(source_file)%>
239
<%endif%>
239
<%endif%>
240
	$(COMPILE.cc) <%if(pchuse && pch_source && pchsupport)%><%pchuse%><%pch_header%>.gch <%endif%>$(EXPORTFLAGS) <%source_file%> $(OUTPUT_OPTION)
240
	$(COMPILE.cc) <%if(pchuse && pch_source && pchsupport)%><%pchuse%><%pch_header%>.gch <%endif%>$(EXPORTFLAGS) <%source_file%> $(OUTPUT_OPTION)
241
 
241
 
242
<%endfor%>
242
<%endfor%>
243
<%endfor%>
243
<%endfor%>
244
<%if(resource_files)%>
244
<%if(resource_files)%>
245
<%foreach(platforms)%>
245
<%foreach(platforms)%>
246
<%if(rc)%>
246
<%if(rc)%>
247
<%foreach(resource_files)%>
247
<%foreach(resource_files)%>
248
<%targetoutdir%><%resource_file%>$(OBJEXT):
248
<%targetoutdir%><%resource_file%>$(OBJEXT):
249
	<%rc%><%foreach(includes)%> -I<%include%><%endfor%> <%resource_file%> <%targetoutdir%><%resource_file%>$(OBJEXT)
249
	<%rc%><%foreach(includes)%> -I<%include%><%endfor%> <%resource_file%> <%targetoutdir%><%resource_file%>$(OBJEXT)
250
 
250
 
251
<%endfor%>
251
<%endfor%>
252
<%endif%>
252
<%endif%>
253
<%endfor%>
253
<%endfor%>
254
<%endif%>
254
<%endif%>
255
clean:
255
clean:
256
	-$(RM) $(OBJS)<%if(pch_source && pchsupport)%> <%pch_header%>.gch<%endif%>
256
	-$(RM) $(OBJS)<%if(pch_source && pchsupport)%> <%pch_header%>.gch<%endif%>
257
<%foreach(configurations)%>
257
<%foreach(configurations)%>
258
<%if(clean)%>
258
<%if(clean)%>
259
	-$(RM) <%clean%>
259
	-$(RM) <%clean%>
260
<%endif%>
260
<%endif%>
261
<%endfor%>
261
<%endfor%>
262
 
262
 
263
realclean: clean
263
realclean: clean
264
	-$(RM) <%if(exename)%>$(BIN)<%else%>$(SHLIB) $(LIB)<%endif%>
264
	-$(RM) <%if(exename)%>$(BIN)<%else%>$(SHLIB) $(LIB)<%endif%>
265
<%if(custom_types)%>
265
<%if(custom_types)%>
266
	-$(RM) $(GENERATED_DIRTY)
266
	-$(RM) $(GENERATED_DIRTY)
267
<%endif%>
267
<%endif%>
268
 
268
 
269
<%if(postbuild)%>
269
<%if(postbuild)%>
270
__postbuild__:
270
__postbuild__:
271
	@<%eval(postbuild)%>
271
	@<%eval(postbuild)%>
272
 
272
 
273
<%endif%>
273
<%endif%>
274
<%marker(local)%>
274
<%marker(local)%>
275
#----------------------------------------------------------------------------
275
#----------------------------------------------------------------------------
276
#       Dependencies
276
#       Dependencies
277
#----------------------------------------------------------------------------
277
#----------------------------------------------------------------------------
278
 
278
 
279
$(DEPENDENCIES):
279
$(DEPENDENCIES):
280
	@touch $(DEPENDENCIES)
280
	@touch $(DEPENDENCIES)
281
 
281
 
282
depend:
282
depend:
283
<%if(source_files || pch_source)%>
283
<%if(source_files || pch_source)%>
284
	-<%depgen("makedepend -Y")%> $(CFLAGS) $(CCFLAGS) $(CPPFLAGS) -f $(DEPENDENCIES) $(SRC) 2> $(NUL)
284
	-<%depgen("makedepend -Y")%> $(CFLAGS) $(CCFLAGS) $(CPPFLAGS) -f $(DEPENDENCIES) $(SRC) 2> $(NUL)
285
<%else%>
285
<%else%>
286
	@-:
286
	@-:
287
<%endif%>
287
<%endif%>
288
 
288
 
289
include $(DEPENDENCIES)
289
include $(DEPENDENCIES)
290
<%marker(bottom)%>
290
<%marker(bottom)%>
291
 
291