diff options
author | elliott_c <ocielliottc@users.noreply.github.com> | 2006-02-15 16:03:44 +0000 |
---|---|---|
committer | elliott_c <ocielliottc@users.noreply.github.com> | 2006-02-15 16:03:44 +0000 |
commit | 86b1c3d893751964b506af2f85760010c18bc11a (patch) | |
tree | 6198a9434e1c1be2649300ecbe9aa7e3f596c83b /templates/make.mpd | |
parent | e4c8829220f171bde21c52bdfe1ed85fce7261e1 (diff) | |
download | MPC-86b1c3d893751964b506af2f85760010c18bc11a.tar.gz |
ChangeLogTag: Wed Feb 15 16:03:06 UTC 2006 Chad Elliott <elliott_c@ociweb.com>
Diffstat (limited to 'templates/make.mpd')
-rw-r--r-- | templates/make.mpd | 43 |
1 files changed, 33 insertions, 10 deletions
diff --git a/templates/make.mpd b/templates/make.mpd index f83b3ba3..e150b913 100644 --- a/templates/make.mpd +++ b/templates/make.mpd @@ -27,6 +27,9 @@ OBJEXT = <%obj_ext%> OUTPUT_OPTION = <%output_option(-o \"$@\")%> COMPILE.cc = $(CXX) $(CCFLAGS) $(CPPFLAGS) <%compile_option("-c")%> <%foreach(platforms)%> +<%if(rc)%> +RESEXT = <%res_ext%> +<%endif%> <%if(build64bit && arflags64)%> ARFLAGS = <%if(extraarflags)%><%extraarflags%> <%endif%><%arflags64%> <%else%> @@ -43,14 +46,16 @@ LDFLAGS =<%if(libpaths)%><%foreach(libpaths)%> <%libpathopt(-L)%>"<%libpat CCC = $(CXX) MAKEFILE = <%project_file%> DEPENDENCIES = .depend.$(MAKEFILE) +<%foreach(compilers)%> +<%foreach(platforms)%> <%if(exename)%> BTARGETDIR = <%if(install)%><%install%><%else%>.<%endif%><%slash%><%targetoutdir%> BIN = $(BTARGETDIR)<%exename%>$(EXESUFFIX)$(EXEEXT) <%else%> LTARGETDIR = <%libout%><%slash%><%targetoutdir%> <%endif%> -<%foreach(compilers)%> -<%foreach(platforms)%> +CAT = <%type("cat")%> +MV = <%move("mv -f")%> RM = <%delete("rm -rf")%> CP = <%copy("cp -p")%> NUL = <%devnull("/dev/null")%> @@ -69,7 +74,7 @@ GENFLAGS = <%genflags("-g")%> <%endif%> <%endfor%> LDLIBS =<%foreach(libs)%> <%libopt%>"<%libname_prefix%><%lib%>$(LIBSUFFIX)"<%endfor%><%foreach(lit_libs)%> <%libopt%>"<%lit_lib%>"<%endfor%><%foreach(pure_libs)%> "<%pure_lib%>"<%endfor%> <%ldlibs%> -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%> +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%>$(RESEXT)<%endfor%><%endif%> <%if(lib_ext)%> <%if(staticname)%> AREXT = <%lib_ext%> @@ -80,6 +85,9 @@ LIB = $(LTARGETDIR)$(LIBPREFIX)<%staticname%>$(LIBSUFFIX)$(AREXT) <%if(sharedname)%> SOEXT = <%dll_ext%> SHTARGETDIR = <%if(dllout)%><%dllout%><%else%><%libout%><%endif%><%slash%><%targetoutdir%> +<%if(version && versupport)%> +SHLIB_BASE = $(LIBPREFIX)<%sharedname%>$(LIBSUFFIX)$(SOEXT) +<%endif%> SHLIB = $(SHTARGETDIR)$(LIBPREFIX)<%sharedname%>$(LIBSUFFIX)$(SOEXT) <%if(shflags)%> SHFLAGS = <%shflags%> @@ -137,15 +145,26 @@ $(BIN): $(BTARGETDIR)<%foreach(compilers)%><%if(tempinc)%> $(TEMPINCDIR)<%endif% <%foreach(platforms)%> <%if(dll_ext)%> <%if(sharedname)%> -all: $(SHLIB)<%if(postbuild)%> __postbuild__<%endif%> +all:<%if(version && versupport)%> $(SHLIB).<%version%><%endif%> $(SHLIB)<%if(postbuild)%> __postbuild__<%endif%> <%if(dllout)%> $(SHTARGETDIR): @$(MKDIR) "$@" <%endif%> -$(SHLIB): $(SHTARGETDIR) <%foreach(compilers)%><%if(tempinc)%>$(TEMPINCDIR) <%endif%><%endfor%>$(OBJS) - <%foreach(compilers)%><%foreach(platforms)%><%if(dld)%><%dld%> $(LDFLAGS)<%else%>$(LINK.cc)<%endif%><%endfor%><%endfor%> $(SHFLAGS) $(OBJS) $(LDLIBS) $(OUTPUT_OPTION) +<%if(version && versupport)%> +$(SHLIB): + cd $(SHTARGETDIR) && ln -s $(SHLIB_BASE).<%version%> $(SHLIB_BASE) + +<%endif%> +$(SHLIB)<%if(version && versupport)%>.<%version%><%endif%>: $(SHTARGETDIR) <%foreach(compilers)%><%if(tempinc)%>$(TEMPINCDIR) <%endif%><%endfor%>$(OBJS) +<%foreach(compilers)%> +<%if(dmclink)%> + link /impl <%if(pch_source && pchsupport)%><%targetoutdir%><%noextension(pch_source)%>$(OBJEXT)+<%endif%><%foreach(source_files)%><%targetoutdir%><%noextension(source_file)%>$(OBJEXT)<%fornotlast("+")%><%endfor%>,$@,<%foreach(platforms)%><%ldlibs%><%endfor%><%if(rc)%><%foreach(resource_files)%><%forfirst(",,")%><%targetoutdir%><%resource_file%>$(RESEXT)<%fornotlast("+")%><%endfor%><%endif%> +<%else%> + <%foreach(platforms)%><%if(dld)%><%dld%> $(LDFLAGS)<%else%>$(LINK.cc)<%endif%><%endfor%> $(SHFLAGS) $(OBJS) $(LDLIBS) $(OUTPUT_OPTION) +<%endif%> +<%endfor%> <%else%> <%if(staticname)%> all: $(LIB)<%if(postbuild)%> __postbuild__<%endif%> @@ -210,7 +229,7 @@ GENERATED_DIRTY =<%foreach(custom_types)%><%foreach(custom_type->input_files) <%if(pch_header)%> <%if(custom_type->pch_postrule)%> <%foreach(custom_type->input_file->source_output_files)%> - @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%> + @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%> <%endfor%> <%endif%> <%endif%> @@ -256,8 +275,8 @@ $(TEMPINCDIR): <%foreach(platforms)%> <%if(rc)%> <%foreach(resource_files)%> -<%targetoutdir%><%resource_file%>$(OBJEXT): - <%rc%><%foreach(includes)%> -I<%include%><%endfor%> <%resource_file%> <%targetoutdir%><%resource_file%>$(OBJEXT) +<%targetoutdir%><%resource_file%>$(RESEXT): + <%rc%><%foreach(includes)%> -I<%include%><%endfor%> <%resource_file%> <%targetoutdir%><%resource_file%>$(RESEXT) <%endfor%> <%endif%> @@ -275,7 +294,7 @@ clean: <%endfor%> realclean: clean - -$(RM) <%if(exename)%>$(BIN)<%else%>$(SHLIB) $(LIB)<%endif%> + -$(RM) <%if(exename)%>$(BIN)<%else%><%if(version && versupport)%>$(SHLIB).<%version%> <%endif%>$(SHLIB) $(LIB)<%endif%> <%if(custom_types)%> -$(RM) $(GENERATED_DIRTY) <%endif%> @@ -286,6 +305,8 @@ __postbuild__: <%endif%> <%marker(local)%> +<%foreach(compilers)%> +<%if(dependencies)%> #---------------------------------------------------------------------------- # Dependencies #---------------------------------------------------------------------------- @@ -301,4 +322,6 @@ depend: <%endif%> include $(DEPENDENCIES) +<%endif%> +<%endfor%> <%marker(bottom)%> |