diff options
Diffstat (limited to 'ACE/bin/MakeProjectCreator/templates')
-rw-r--r-- | ACE/bin/MakeProjectCreator/templates/bor.mpd | 219 | ||||
-rw-r--r-- | ACE/bin/MakeProjectCreator/templates/bordll.mpt | 8 | ||||
-rw-r--r-- | ACE/bin/MakeProjectCreator/templates/borexe.mpt | 7 | ||||
-rw-r--r-- | ACE/bin/MakeProjectCreator/templates/gnu.mpd | 644 | ||||
-rw-r--r-- | ACE/bin/MakeProjectCreator/templates/gnudll.mpt | 6 | ||||
-rw-r--r-- | ACE/bin/MakeProjectCreator/templates/gnuexe.mpt | 4 |
6 files changed, 888 insertions, 0 deletions
diff --git a/ACE/bin/MakeProjectCreator/templates/bor.mpd b/ACE/bin/MakeProjectCreator/templates/bor.mpd new file mode 100644 index 00000000000..1e3cef6caa8 --- /dev/null +++ b/ACE/bin/MakeProjectCreator/templates/bor.mpd @@ -0,0 +1,219 @@ +# Makefile for building the <%if(exename)%><%exename%> exe<%endif%><%if(sharedname)%><%sharedname%> library<%else%><%if(staticname)%><%staticname%> library<%endif%><%endif%> with Borland C++ Make + +<%marker(top)%> +<%if(exename)%> +NAME = <%exename%> +<%else%> +<%if(sharedname || staticname)%> +NAME = <%if(sharedname)%><%sharedname%><%else%><%staticname%><%endif%> +<%endif%> +<%endif%> + +NO_FULL_PATH=1 +<%if(exename || sharedname || staticname)%> +<%if(source_files)%> + +OBJFILES = \ +<%foreach(source_files)%> + $(OBJDIR)\<%basenoextension(source_file)%>.$(OBJ_EXT)<%fornotlast(" \\")%> +<%endfor%> +<%endif%> +<%endif%> +<%if(libpaths)%> + +LFLAGS = \ +<%if(linkflags)%> + <%linkflags%> \ +<%endif%> +<%if(StackReserveSize)%> + /S:<%StackReserveSize%> \ +<%endif%> +<%if(StackCommitSize)%> + /Sc:<%StackCommitSize%> \ +<%endif%> +<%foreach(libpaths)%> + -L"<%libpath%>" \ + -j"<%libpath%>" <%fornotlast(" \\")%> +<%endfor%> +<%endif%> +<%if(libs || lit_libs || pure_libs)%> + +LIBFILES = \ +<%foreach(pure_libs)%> + <%pure_lib%> \ +<%endfor%> +<%foreach(lit_libs)%> + <%lit_lib%>.lib \ +<%endfor%> +<%foreach(reverse(libs))%> + <%lib%>$(LIB_DECORATOR).lib \ +<%endfor%> + $(DUMMY_VALUE_NOT_ENDING_IN_BACKSLASH) +<%endif%> +<%if(rcdir)%> + +RESDIR = <%rcdir%> +<%endif%> +<%if(resource_files)%> + +RESOURCE =<%foreach(resource_files)%> $(OBJDIR)\<%basenoextension(resource_file)%>.res<%endfor%> + +<%if(includes)%> +RC_FLAGS = \ +<%foreach(includes)%> + -i"<%include%>"<%fornotlast(" \\")%> +<%endfor%> +<%endif%> + +<%endif%> + +!ifdef STATIC +<%if(staticflags)%> +LIB_FLAGS = \ +<%foreach(staticflags)%> + -D<%staticflag%><%fornotlast(" \\")%> +<%endfor%> +<%endif%> +!else +<%if(dynamicflags)%> +DLL_FLAGS = \ +<%foreach(dynamicflags)%> + -D<%dynamicflag%><%fornotlast(" \\")%> +<%endfor%> +<%endif%> +!endif + +CFLAGS = \ +<%if(pch_header)%> +<%foreach(pch_defines)%> +# Borland precompiled headers choke on several tao header files. +# For example, any place that uses ACE_LIB_TEXT(). +# -D<%pch_define%> \ +<%endfor%> +<%endif%> +<%if(compile_flags)%> + <%compile_flags%> \ +<%endif%> +<%foreach(macros)%> + -D<%macro%> \ +<%endfor%> +<%foreach(includes)%> + -I"<%include%>" \ +<%endfor%> + $(LIB_FLAGS) \ + $(DLL_FLAGS) +<%if(pch_header)%> + +# Borland precompiled headers choke on several tao header files. +# For example, any place that uses ACE_LIB_TEXT(). +#PCH_HEADER=<%pch_header%> +<%endif%> +<%if(cppdir)%> + +CPPDIR = <%cppdir%> +CDIR = <%cppdir%> +<%endif%> +<%if(header_files || template_files || inline_files || idl_files)%> + +INCDIR_NAME = <%relwd%> +<%endif%> +<%foreach(custom_types)%> + +# +# <%custom_type%> rules +# + +<%if(cutom_type->libpath)%> +PATH := $(PATH);<%custom_type->libpath%> + +<%endif%> +<%foreach(custom_type->input_files)%> +<%if(custom_type->input_file->output_files)%> + +<%custom_type%>_<%forcount(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%> +$(<%custom_type%>_<%forcount(custom_type->input_files)%>): <%custom_type->input_file%> +<%if(flag_overrides(custom_type->input_file, gendir))%> + -if not exist <%flag_overrides(custom_type->input_file, gendir)%> mkdir <%flag_overrides(custom_type->input_file, gendir)%> 2> nul +<%endif%> + <%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%> +<%if(flag_overrides(custom_type->input_file, postcommand))%> +<%foreach(custom_type->input_file->output_files)%> + <%flag_overrides(custom_type->input_file, postcommand)%> +<%endfor%> +<%else%> +<%if(custom_type->postcommand)%> +<%foreach(custom_type->input_file->output_files)%> + <%custom_type->postcommand%> +<%endfor%> +<%endif%> +<%endif%> +<%if(pch_header)%> +<%if(custom_type->pch_postrule)%> +<%foreach(custom_type->input_file->source_output_files)%> + @echo #include "<%pch_header%>" > temporary.src + @type <%if(flag_overrides(custom_type->input_file, gendir))%><%flag_overrides(custom_type->input_file, gendir)%>\<%basename(custom_type->input_file->source_output_file)%><%else%><%custom_type->input_file->source_output_file%><%endif%> >> temporary.src + @move /y temporary.src <%if(flag_overrides(custom_type->input_file, gendir))%><%flag_overrides(custom_type->input_file, gendir)%>\<%basename(custom_type->input_file->source_output_file)%><%else%><%custom_type->input_file->source_output_file%><%endif%> +<%endfor%> +<%endif%> +<%endif%> + +all: $(<%custom_type%>_<%forcount(custom_type->input_files)%>) + +customclean_<%custom_type%>_<%forcount(custom_type->input_files)%>: + @del $(<%custom_type%>_<%forcount(custom_type->input_files)%>) 2>nul + +clean: customclean_<%custom_type%>_<%forcount(custom_type->input_files)%> + +realclean: customclean_<%custom_type%>_<%forcount(custom_type->input_files)%> + +<%endif%> +<%endfor%> +<%endfor%> + +# +# Override defaults in outputdir.bor +# +<%if(INSTALL_THIS_TARGET)%> +INSTALL_THIS_TARGET = 1 + +<%endif%> +<%marker(macros)%> +INCLUDES_INSTALL=1 +<%if(exename)%> + +<%if(install)%> +# We use BINDIR for install instead of BASE_BINDIR, because +# this is the location for all scripts too. +BINDIR = <%install%> +<%else%> +BASE_BINDIR = . +<%endif%> + +!include <$(ACE_ROOT)\include\makeinclude\build_exe.bor> +<%else%> +<%if(sharedname || staticname)%> +BINDIR = <%if(dllout)%><%dllout%><%else%><%libout%><%endif%> + +!include <$(ACE_ROOT)\include\makeinclude\build_library.bor> +<%else%> +INSTALL_TYPES = includes + +!include <$(ACE_ROOT)\include\makeinclude\install.bor> + +all: + @-rem +<%endif%> +<%endif%> +<%if(header_files || template_files || inline_files || idl_files || pidl_files)%> + +includes_install: $(INCLUDES) +<%foreach(header_files template_files inline_files idl_files pidl_files)%> + -@if not exist $(INSTALL_DIR)\include\$(INCDIR_NAME)\<%dirname(header_file)%> mkdir $(INSTALL_DIR)\include\$(INCDIR_NAME)\<%dirname(header_file)%> + -© /Y <%header_file%> $(INSTALL_DIR)\include\$(INCDIR_NAME)\<%header_file%> 1> NUL +<%endfor%> +<%else%> + +includes_install: + @echo Nothing to install. +<%endif%> +<%marker(bottom)%> diff --git a/ACE/bin/MakeProjectCreator/templates/bordll.mpt b/ACE/bin/MakeProjectCreator/templates/bordll.mpt new file mode 100644 index 00000000000..c6ff3fc925f --- /dev/null +++ b/ACE/bin/MakeProjectCreator/templates/bordll.mpt @@ -0,0 +1,8 @@ +// -*- MPC -*- +// $Id$ + +conditional_include "common" + +type_is_binary = 1 +type_is_dynamic = 1 +common_defines = WIN32 diff --git a/ACE/bin/MakeProjectCreator/templates/borexe.mpt b/ACE/bin/MakeProjectCreator/templates/borexe.mpt new file mode 100644 index 00000000000..da49b919bc7 --- /dev/null +++ b/ACE/bin/MakeProjectCreator/templates/borexe.mpt @@ -0,0 +1,7 @@ +// -*- MPC -*- +// $Id$ + +conditional_include "common" + +type_is_binary = 1 +common_defines = WIN32 diff --git a/ACE/bin/MakeProjectCreator/templates/gnu.mpd b/ACE/bin/MakeProjectCreator/templates/gnu.mpd new file mode 100644 index 00000000000..d0bd4627816 --- /dev/null +++ b/ACE/bin/MakeProjectCreator/templates/gnu.mpd @@ -0,0 +1,644 @@ +# -*- Makefile -*- +#---------------------------------------------------------------------------- +# GNU Makefile +# +# @file <%project_file%> +# +# $Id$ +# +# This file was automatically generated by MPC. Any changes made directly to +# this file will be lost the next time it is generated. +# +#---------------------------------------------------------------------------- +<%marker(top)%> +MAKEFILE = <%project_file%> +DEPENDENCY_FILE = .depend.<%project_name%> +<%if(exename)%> +BIN_UNCHECKED = <%if(targetoutdir)%><%targetoutdir%><%endif%><%exename%> +<%endif%> +<%if(staticname)%> + +## LIB may be set to empty later on in this file +LIB_UNCHECKED = <%if(targetoutdir)%><%targetoutdir%><%endif%>lib<%libname_prefix%><%staticname%>.a +LIB = $(LIB_UNCHECKED) +LIB_NAME = <%if(targetoutdir)%><%targetoutdir%><%endif%>lib<%libname_prefix%><%staticname%> +<%if(!sharedname)%> +static_libs_only = 1 +<%endif%> +<%endif%> +<%if(sharedname)%> + +## SHLIB may be set to empty later on in this file +SHLIB_UNCHECKED = <%if(targetoutdir)%><%targetoutdir%><%endif%>lib<%libname_prefix%><%sharedname%>.$(SOEXT) +SHLIB = $(SHLIB_UNCHECKED) +<%endif%> +<%if(tao || ciao)%> + +TAO_ROOT ?= $(ACE_ROOT)/TAO +<%if(ciao)%> +CIAO_ROOT ?= $(TAO_ROOT)/CIAO +<%endif%> +<%endif%> + +<%if(grouped_source_files)%> +<%foreach(grouped_source_files)%> +<%grouped_source_file%> = \ +<%foreach(grouped_source_file->files)%> + <%grouped_source_file->file%><%fornotlast(" \\")%> +<%endfor%> + +<%endfor%> +FILES += \ +<%foreach(grouped_source_files)%> + $(<%grouped_source_file%>)<%fornotlast(" \\")%> +<%endfor%> + +<%else%> +FILES = \ +<%foreach(source_files)%> + <%source_file%><%fornotlast(" \\")%> +<%endfor%> + +<%endif%> +<%vpath%> +#---------------------------------------------------------------------------- +# Include macros and targets +#---------------------------------------------------------------------------- +<%marker(macros)%> +<%if(xerceslib)%> +XERCESLIB ?= <%xerceslib%> +<%endif%> +<%if(exename)%> +LDLIBS =<%foreach(libs)%> -l<%libname_prefix%><%lib%><%endfor%><%foreach(lit_libs)%> -l<%lit_lib%><%endfor%><%foreach(pure_libs)%> <%pure_lib%><%endfor%> +<%else%> +<%if(sharedname)%> +ACE_SHLIBS =<%foreach(libs)%> -l<%libname_prefix%><%lib%><%endfor%><%foreach(lit_libs)%> -l<%lit_lib%><%endfor%><%foreach(pure_libs)%> <%pure_lib%><%endfor%> +<%endif%> +<%endif%> +<%if(tao_idl)%> +TAO_IDL = <%tao_idl%> +<%endif%> +<%if(tao_idl_dep)%> +TAO_IDL_DEP = <%tao_idl_dep%>$(EXEEXT) +<%endif%> +<%if(tao_idlflags)%> +TAO_IDLFLAGS = <%tao_idlflags%> +<%endif%> +<%if(cidlc)%> +CIDLC = <%cidlc%> +<%endif%> +<%if(cidlc_dep)%> +CIDLC_DEP = <%cidlc_dep%>$(EXEEXT) +<%endif%> +<%if(cidlc_flags)%> +CIDLC_FLAGS = <%cidlc_flags%> +<%endif%> +<%if(tao_idl3_to_idl2)%> +TAO_IDL3_TO_IDL2 = <%tao_idl3_to_idl2%> +<%endif%> +<%if(tao_idl3_to_idl2_dep)%> +TAO_IDL3_TO_IDL2_DEP = <%tao_idl3_to_idl2_dep%>$(EXEEXT) +<%endif%> + +<%if(exename)%> +PRJ_TYPE = rtp +<%else%> +PRJ_TYPE = library +<%endif%> + +<%if(exename)%> +<%if(install)%> +INSBIN ?= <%install%> +<%endif%> +ifeq ($(INSBIN),.) + ifeq ($(PWD),) + PWD=$(shell pwd) + endif + INSBIN = $(PWD) +endif +<%if(targetoutdir)%> +ifneq ($(INSBIN),) +OUTPUT_DIRECTORY = $(INSBIN)/<%targetoutdir%> +else +<%endif%> +OUTPUT_DIRECTORY = $(INSBIN) +<%if(targetoutdir)%> +endif +<%endif%> +<%else%> +<%if(dllout || libout)%> +INSLIB ?= <%if(dllout)%><%dllout%><%else%><%libout%><%endif%> +<%endif%> +ifeq ($(INSLIB),.) + ifeq ($(PWD),) + PWD=$(shell pwd) + endif + INSLIB = $(PWD) +endif +OUTPUT_DIRECTORY = $(INSLIB)<%if(targetoutdir)%>/<%targetoutdir%><%endif%> +<%endif%> + +<%if(targetoutdir)%> +VDIR = <%targetoutdir%>.obj/ +VSHDIR = <%targetoutdir%>.shobj/ + +<%endif%> +include $(ACE_ROOT)/include/makeinclude/wrapper_macros.GNU +## We don't need the ACELIB setting from wrapper_macros.GNU +ACELIB = +<%if(tao)%> +tao_dont_use_idl_make_rule = 1 +include $(TAO_ROOT)/rules.tao.GNU +<%endif%> +<%if(ciao)%> +include $(CIAO_ROOT)/rules.ciao.GNU +<%endif%> +<%if(version)%> + +ifeq ($(versioned_so),1) +SOVERSION = .<%version%> +endif +<%endif%> + +<%if(resource_files)%> +ifneq (,$(RC)) +RESOURCES += \ +<%foreach(resource_files)%> + <%resource_file%><%fornotlast(" \\")%> +<%endfor%> +<%if(includes)%> + +RCFLAGS = \ +<%foreach(includes)%> + --include-dir=<%include%><%fornotlast(" \\")%> +<%endfor%> +<%endif%> +endif + +<%endif%> +# To build multiple targets in the same directory on AIX, it works +# best to have a template directory per project. +# The compiler/linker isn't too smart about instantiating templates... +ifdef TEMPINCDIR +TEMPINCDIR := $(TEMPINCDIR)/<%project_name%> +all: $(TEMPINCDIR) +endif + +ifneq ($(OUTPUT_DIRECTORY),) +all: $(OUTPUT_DIRECTORY) +$(OUTPUT_DIRECTORY): + -@$(MKDIR) "$(OUTPUT_DIRECTORY)" +endif + +<%if(sharedname || staticname || exename)%> +<%if(libs && libpaths)%> +# turn off libcheck if doing a dry run +ifeq ($(findstring n, $(MAKEFLAGS)),n) + LIBCHECK = 1 +else + # turn off libcheck if keep going was passed too + ifeq ($(findstring k, $(MAKEFLAGS)),k) + LIBCHECK = 1 + else + LIBCHECK ?= $(filter-out $(foreach lib,<%foreach(libs)%><%libname_prefix%><%lib%><%fornotlast(" ")%><%endfor%>,$(findstring $(lib),$(foreach libpath,<%libpaths%> /usr/lib $(INSLIB),$(wildcard $(libpath)/lib$(lib).* $(libpath)/$(lib).lib)))),<%foreach(libs)%><%libname_prefix%><%lib%><%fornotlast(" ")%><%endfor%>) + ifeq ($(LIBCHECK),) + LIBCHECK = 1 + endif + endif +endif +<%else%> +LIBCHECK = 1 +<%endif%> +<%else%> +LIBCHECK = 1 +<%endif%> +<%if(!exename)%> +<%foreach(requires)%> +ifeq ($(<%require%>),1) +<%endfor%> +<%foreach(avoids)%> +ifneq ($(<%avoid%>),1) +<%endfor%> +ifneq ($(LIBCHECK), 1) +<%if(staticname)%> + LIB = +<%endif%> +<%if(sharedname)%> + SHLIB = +<%endif%> + all: lib_warning +endif +<%foreach(avoids)%> +else +<%if(staticname)%> + LIB = +<%endif%> +<%if(sharedname)%> + SHLIB = +<%endif%> + all: avoid_warning +endif +<%endfor%> +<%foreach(requires)%> +else +<%if(staticname)%> + LIB = +<%endif%> +<%if(sharedname)%> + SHLIB = +<%endif%> + all: require_warning +endif +<%endfor%> + +<%if(tagname)%> +ifeq (,$(<%tagname%>)) +<%endif%> +<%foreach(requires)%> +ifeq ($(<%require%>),1) +<%endfor%> +<%foreach(avoids)%> +ifneq ($(<%avoid%>),1) +<%endfor%> +<%foreach(avoids)%> +else +<%if(staticname)%> + LIB = +<%endif%> +<%if(sharedname)%> + SHLIB = +<%endif%> + all: avoid_warning +endif +<%endfor%> +<%foreach(requires)%> +else +<%if(staticname)%> + LIB = +<%endif%> +<%if(sharedname)%> + SHLIB = +<%endif%> + all: require_warning +endif +<%endfor%> +<%if(tagname)%> +else +<%foreach(requires)%> +ifeq ($(<%require%>),1) +<%endfor%> +<%foreach(avoids)%> +ifneq ($(<%avoid%>),1) +<%endfor%> +<%foreach(tagchecks)%> + ifeq (<%tagcheck%>, $(findstring <%tagcheck%>, $(<%tagname%>))) +<%endfor%> +<%foreach(tagchecks)%> + else + LIB = + SHLIB = + endif +<%endfor%> +<%foreach(avoids)%> +else + LIB = + SHLIB = + all: avoid_warning +endif +<%endfor%> +<%foreach(requires)%> +else + LIB = + SHLIB = + all: require_warning +endif +<%endfor%> +endif +<%endif%> +<%endif%> +<%if(exename)%> +<%foreach(requires)%> +ifeq ($(<%require%>),1) +<%endfor%> +<%foreach(avoids)%> +ifneq ($(<%avoid%>),1) +<%endfor%> +ifeq ($(LIBCHECK), 1) +BIN = $(BIN_UNCHECKED)$(EXEEXT) +else + all: lib_warning +endif +<%foreach(avoids)%> +else + all: avoid_warning +endif +<%endfor%> +<%foreach(requires)%> +else + all: require_warning +endif +<%endfor%> + +# If it contains ../ at all use notdir. +OBJS = $(foreach var, $(addsuffix .$(OBJEXT), $(basename $(FILES)) $(RESOURCES)), $(if $(findstring ../,$(var)),$(notdir $(var)),$(var))) +SRC = $(FILES) +<%endif%> +<%if(sharedname || staticname)%> +LSRC = $(FILES) +<%endif%> + +<%marker(circuit)%> +include $(ACE_ROOT)/include/makeinclude/macros.GNU +include $(ACE_ROOT)/include/makeinclude/rules.common.GNU +include $(ACE_ROOT)/include/makeinclude/rules.nonested.GNU +<%if(exename)%> + +ifneq ($(OUTPUT_DIRECTORY),) +ifneq ($(OUTPUT_DIRECTORY),.) + INSTALL = $(VBIN:%=$(INSBIN)/%) + CLEANUP_INSTALL += $(CLEANUP_BIN:%=$(INSBIN)/%$(VAR)$(EXEEXT)) +endif +endif + +<%endif%> +<%if(sharedname || staticname)%> +include $(ACE_ROOT)/include/makeinclude/rules.lib.GNU +<%endif%> +<%if(pch_source)%> + +ACE_PCH_SOURCE = <%pch_source%> +ACE_PCH_FILE = <%basename(pch_header)%>.gch + +ifeq ($(pchsupport),1) +<%if(pch_defines)%> +CPPFLAGS +=<%foreach(pch_defines)%> -D<%pch_define%><%endfor%> +<%endif%> + +$(addprefix $(VDIR), $(OBJS)): $(VDIR)$(ACE_PCH_FILE) +$(VSHOBJS): $(VSHDIR)$(ACE_PCH_FILE) +endif + +<%endif%> +include $(ACE_ROOT)/include/makeinclude/rules.local.GNU +ifeq ($(VXWORKSLINK),true) +include $(TGT_DIR)/h/make/rules.$(PRJ_TYPE) +endif + +<%foreach(source_files)%> +<%if(flag_overrides(source_file, buildflags))%> +$(VDIR)<%noextension(source_file)%>.$(OBJEXT): <%source_file%> + @$(MKDIR) $(VDIR)<%dirname(source_file)%> + <%if(ends_with(source_file, \.c))%>$(COMPILE.c)<%else%>$(COMPILE.cc)<%endif%> <%flag_overrides(source_file, buildflags)%> $(ACE_USE_PCH_OPT) $(CC_OUTPUT_FLAG) $@ $< + ${MVCMD} + +ifneq ($(VSHDIR), $(VDIR)) +$(VSHDIR)<%noextension(source_file)%>.$(OBJEXT): <%source_file%> + @$(MKDIR) $(VSHDIR)<%dirname(source_file)%> + <%if(ends_with(source_file, \.c))%>$(COMPILE.c)<%else%>$(COMPILE.cc)<%endif%> <%flag_overrides(source_file, buildflags)%> $(ACE_USE_PCH_OPT) $(PIC) $(CC_OUTPUT_FLAG) $@ $< +endif + +<%else%> +<%if(dirname(source_file) && !contains(source_file, \.\./))%> +<%if(starts_with(source_file, \$) || !ends_with(source_file, \.cpp))%> +$(VDIR)<%noextension(source_file)%>.$(OBJEXT): <%source_file%> + @$(MKDIR) $(VDIR)<%dirname(source_file)%> + <%if(ends_with(source_file, \.c))%>$(COMPILE.c)<%else%>$(COMPILE.cc)<%endif%> <%if(flag_overrides(source_file, buildflags))%><%flag_overrides(source_file, buildflags)%> <%endif%>$(ACE_USE_PCH_OPT) $(CC_OUTPUT_FLAG) $@ $< + ${MVCMD} + +ifneq ($(VSHDIR), $(VDIR)) +$(VSHDIR)<%noextension(source_file)%>.$(OBJEXT): <%source_file%> + @$(MKDIR) $(VSHDIR)<%dirname(source_file)%> + <%if(ends_with(source_file, \.c))%>$(COMPILE.c)<%else%>$(COMPILE.cc)<%endif%> <%if(flag_overrides(source_file, buildflags))%><%flag_overrides(source_file, buildflags)%> <%endif%>$(ACE_USE_PCH_OPT) $(PIC) $(CC_OUTPUT_FLAG) $@ $< +endif + +<%endif%> +<%endif%> +<%endif%> +<%endfor%> +<%if(libpaths)%> +ifeq ($(VXWORKSLINK),true) +LDLIBPATH =<%foreach(libpaths)%> -L<%libpath%><%endfor%> +else +LDFLAGS +=<%foreach(libpaths)%> -L<%libpath%><%endfor%> +endif +<%endif%> +<%if(includes)%> +CPPFLAGS +=<%foreach(includes)%> -I<%include%><%endfor%> +<%endif%> +<%if(macros)%> +CPPFLAGS +=<%foreach(macros)%> -D<%macro%><%endfor%> +<%endif%> +<%if(dynamicflags)%> +ifeq ($(shared_libs),1) + ifneq ($(SHLIB),) + CPPFLAGS +=<%foreach(dynamicflags)%> -D<%dynamicflag%><%endfor%> + endif +endif +<%endif%> +<%if(staticflags)%> +ifeq ($(static_libs),1) + CPPFLAGS +=<%foreach(staticflags)%> -D<%staticflag%><%endfor%> +endif +<%endif%> + +#---------------------------------------------------------------------------- +# Local targets +#---------------------------------------------------------------------------- +<%marker(local)%> +lib_warning: + @echo <%project_name%> will not be built due to the following missing library: + @echo $(LIBCHECK) + +<%if(requires)%> +require_warning: + @echo <%project_name%> will not be built due to one of the following disabled features: + @echo<%foreach(requires)%> <%require%><%endfor%> + +<%endif%> +<%if(avoids)%> +avoid_warning: + @echo <%project_name%> will not be built due to one of the following enabled features: + @echo<%foreach(avoids)%> <%avoid%><%endfor%> + +<%endif%> +<%if(custom_types)%> +## Some OS's have /bin/test others only have /usr/bin/test +ifeq ($(wildcard /bin/test), /bin/test) + TEST_EXE = /bin/test +else +ifeq ($(wildcard /usr/bin/test), /usr/bin/test) + TEST_EXE = /usr/bin/test +endif +endif + +<%foreach(custom_types)%> +<%if(custom_type->libpath)%> +DYLD_LIBRARY_PATH := $(DYLD_LIBRARY_PATH):<%custom_type->libpath%> +LD_LIBRARY_PATH := $(LD_LIBRARY_PATH):<%custom_type->libpath%> +SHLIB_PATH := $(SHLIB_PATH):<%custom_type->libpath%> +LIBPATH := $(LIBPATH):<%custom_type->libpath%> +PATH := $(PATH):<%custom_type->libpath%> + +<%endif%> +<%foreach(custom_type->input_files)%> +<%if(custom_type->input_file->output_files)%> +GENERATED_DIRTY +=<%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%> +<%if(custom_type->input_file->non_source_output_files)%> +OBJS_DEPEND_ON_GENERATED = 1 +<%endif%> +<%foreach(custom_type->input_file->output_files)%> +<%if(forlast && !forfirst)%> +## More than one file is generated by the command and therefore +## it can not be run in parallel. Unfortunately, there is no way to +## say that only this rule can't be run in parallel. However, we can +## determine if the generated files have already been generated. If that's +## the case, then we don't need this special rule. +ifeq ($(wildcard $(GENERATED_DIRTY)), $(GENERATED_DIRTY)) + ## If we can find /bin/test, then we will continue + ifneq ($(TEST_EXE),) + ## If all of the generated files are there, then we need to check + ## and make sure that the generated files are up-to-date. If they are not + ## then we need the special rule. + ifneq ($(shell<%foreach(custom_type->input_file->output_files)%> $(TEST_EXE) <%custom_type->input_file%> -nt <%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%> 2> /dev/null &&<%endfor%> echo 0),) + .NOTPARALLEL: +<%if(flag_overrides(custom_type->input_file, dependent))%> + else + ## By this point, all of the generated files are here and up-to-date + ## with respect to the source file. Now we need to make sure that + ## they are up-to-date with respect to the generation tool. If the tool + ## is newer than the generated files, then we need the special rule. + ifneq ($(shell<%foreach(dep, flag_overrides(custom_type->input_file, dependent))%><%foreach(custom_type->input_file->output_files)%> $(TEST_EXE) <%dep%> -nt <%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%> 2> /dev/null &&<%endfor%><%endfor%> echo 0),) + .NOTPARALLEL: + endif +<%else%> +<%if(custom_type->dependent)%> + else + ## By this point, all of the generated files are here and up-to-date + ## with respect to the source file. Now we need to make sure that + ## they are up-to-date with respect to the generation tool. If the tool + ## is newer than the generated files, then we need the special rule. + ifneq ($(shell<%foreach(custom_type->dependent)%><%foreach(custom_type->input_file->output_files)%> $(TEST_EXE) <%custom_type->dependent%> -nt <%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%> 2> /dev/null &&<%endfor%><%endfor%> echo 0),) + .NOTPARALLEL: + endif +<%endif%> +<%endif%> + endif + else + .NOTPARALLEL: + endif +else +.NOTPARALLEL: +endif +<%endif%> +<%endfor%> +<%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%><%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(flag_overrides(custom_type->input_file, gendir))%> + $(MKDIR) <%flag_overrides(custom_type->input_file, gendir)%> +<%endif%> + <%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->output_option%> $@<%endif%> <%custom_type->input_file%> +<%if(flag_overrides(custom_type->input_file, postcommand))%> +<%foreach(custom_type->input_file)%> + <%flag_overrides(custom_type->input_file, postcommand)%> +<%endfor%> +<%else%> +<%if(custom_type->postcommand)%> +<%foreach(custom_type->input_file)%> + <%custom_type->postcommand%> +<%endfor%> +<%endif%> +<%endif%> +<%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)%>/<%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)%>/<%basename(custom_type->input_file->source_output_file)%><%else%><%custom_type->input_file->source_output_file%><%endif%> +<%endfor%> +<%endif%> +<%endif%> + +<%endif%> +<%endfor%> +<%endfor%> +ifneq ($(GENERATED_DIRTY),) +.PRECIOUS: $(GENERATED_DIRTY) +<%if(source_files)%> +## If the generated files are anything but source files, we need to +## ensure that those files are generated before we attempt to build anything +## else. +ifeq ($(OBJS_DEPEND_ON_GENERATED),1) +$(VDIR)$(ACE_PCH_FILE) $(addprefix $(VDIR), $(OBJS)): $(GENERATED_DIRTY) +$(VSHDIR)$(ACE_PCH_FILE) $(VSHOBJS): $(GENERATED_DIRTY) +endif +<%else%> +<%foreach(requires)%> +ifeq ($(<%require%>),1) +<%endfor%> +<%foreach(avoids)%> +ifneq ($(<%avoid%>),1) +<%endfor%> +all: $(GENERATED_DIRTY) +<%foreach(avoids)%> +endif +<%endfor%> +<%foreach(requires)%> +endif +<%endfor%> +<%endif%> +endif + +<%endif%> +<%if(idl_files)%> +ADDITIONAL_IDL_TARGETS +=<%foreach(idl_files)%> <%if(flag_overrides(idl_file, gendir))%><%flag_overrides(idl_file, gendir)%>/<%basenoextension(idl_file)%>$(IDL_CLIENT_HDR_EXT)<%else%><%noextension(idl_file)%>$(IDL_CLIENT_HDR_EXT)<%endif%><%endfor%> +idl_stubs: $(ADDITIONAL_IDL_TARGETS) +<%if(source_files)%> + +# This assignment forces make to run the idl_stubs +# target before building any of the source files. +FORCED_IDL_STUBS = <%source_files%> +<%foreach(custom_types)%> +<%foreach(custom_type->input_files)%> +<%if(custom_type->input_file->source_output_files)%> +<%foreach(custom_type->input_file->source_output_files)%> +FORCED_IDL_STUBS := $(FORCED_IDL_STUBS:<%if(flag_overrides(custom_type->input_file, gendir))%><%flag_overrides(custom_type->input_file, gendir)%>/<%basename(custom_type->input_file->source_output_file)%><%else%><%custom_type->input_file->source_output_file%><%endif%>=) +<%endfor%> +<%endif%> +<%endfor%> +<%endfor%> + +ifneq ($(FORCED_IDL_STUBS),) +$(FORCED_IDL_STUBS): idl_stubs +endif +<%endif%> +<%endif%> +<%if(exename)%> + +ifneq ($(VXWORKSLINK),true) +<%if(libs && libpaths)%> +ifeq ($(static_libs_only), 1) + ifeq ($(use_dep_libs), 1) + DEPLIBS = $(foreach lib,<%foreach(libs)%> <%libname_prefix%><%lib%><%endfor%> <%lit_libs%>, $(foreach libpath, <%libpaths%>, $(wildcard $(libpath)/lib$(lib).a))) + endif +endif + +<%endif%> +$(BIN): $(addprefix $(VDIR), $(OBJS)) $(DEPLIBS) +ifndef kylix + $(LINK.cc) $(LDFLAGS) $(CC_OUTPUT_FLAG) $@ $^ $(VLDLIBS) $(POSTLINK) +else + $(LINK.cc) $(LDFLAGS) $(CC_OUTPUT_FLAG) $(VLDLIBS) $(BORINITEXEOBJ) $(POSTLINK) $^, $@,, +endif +endif +<%endif%> + +realclean: clean +ifneq ($(GENERATED_DIRTY),) + -$(RM) -r $(GENERATED_DIRTY) +endif + +<%if(postbuild)%> +all: __postbuild__ + +__postbuild__: + @<%eval(postbuild)%> + +<%endif%> +<%marker(bottom)%> diff --git a/ACE/bin/MakeProjectCreator/templates/gnudll.mpt b/ACE/bin/MakeProjectCreator/templates/gnudll.mpt new file mode 100644 index 00000000000..c5fa1017803 --- /dev/null +++ b/ACE/bin/MakeProjectCreator/templates/gnudll.mpt @@ -0,0 +1,6 @@ +// -*- MPC -*- +// $Id$ + +conditional_include "common" + +targetoutdir = diff --git a/ACE/bin/MakeProjectCreator/templates/gnuexe.mpt b/ACE/bin/MakeProjectCreator/templates/gnuexe.mpt new file mode 100644 index 00000000000..2b595402d86 --- /dev/null +++ b/ACE/bin/MakeProjectCreator/templates/gnuexe.mpt @@ -0,0 +1,4 @@ +// -*- MPC -*- +// $Id$ + +conditional_include "gnudll" |