summaryrefslogtreecommitdiff
path: root/bin/MakeProjectCreator/templates/gnu.mpd
diff options
context:
space:
mode:
Diffstat (limited to 'bin/MakeProjectCreator/templates/gnu.mpd')
-rw-r--r--bin/MakeProjectCreator/templates/gnu.mpd47
1 files changed, 32 insertions, 15 deletions
diff --git a/bin/MakeProjectCreator/templates/gnu.mpd b/bin/MakeProjectCreator/templates/gnu.mpd
index 76e809f17ee..d0619672ee8 100644
--- a/bin/MakeProjectCreator/templates/gnu.mpd
+++ b/bin/MakeProjectCreator/templates/gnu.mpd
@@ -19,8 +19,9 @@ BIN_UNCHECKED = <%if(targetoutdir)%><%targetoutdir%><%endif%><%exename%>
<%if(staticname)%>
## LIB may be set to empty later on in this file
-LIB_UNCHECKED = <%if(targetoutdir)%><%targetoutdir%><%endif%>lib<%staticname%>.a
+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%>
@@ -28,7 +29,7 @@ static_libs_only = 1
<%if(sharedname)%>
## SHLIB may be set to empty later on in this file
-SHLIB_UNCHECKED = <%if(targetoutdir)%><%targetoutdir%><%endif%>lib<%sharedname%>.$(SOEXT)
+SHLIB_UNCHECKED = <%if(targetoutdir)%><%targetoutdir%><%endif%>lib<%libname_prefix%><%sharedname%>.$(SOEXT)
SHLIB = $(SHLIB_UNCHECKED)
<%endif%>
<%if(tao || ciao)%>
@@ -68,10 +69,10 @@ FILES = \
XERCESLIB ?= <%xerceslib%>
<%endif%>
<%if(exename)%>
-LDLIBS =<%foreach(libs lit_libs)%> -l<%lib%><%endfor%><%foreach(pure_libs)%> <%pure_lib%><%endfor%>
+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 lit_libs)%> -l<%lib%><%endfor%><%foreach(pure_libs)%> <%pure_lib%><%endfor%>
+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)%>
@@ -94,6 +95,12 @@ CIDLC_FLAGS = <%cidlc_flags%>
<%endif%>
<%if(exename)%>
+PRJ_TYPE = rtp
+<%else%>
+PRJ_TYPE = library
+<%endif%>
+
+<%if(exename)%>
<%if(install)%>
INSBIN ?= <%install%>
<%endif%>
@@ -153,6 +160,13 @@ RESOURCES += \
<%foreach(resource_files)%>
<%resource_file%><%fornotlast(" \\")%>
<%endfor%>
+<%if(includes)%>
+
+RCFLAGS = \
+<%foreach(includes)%>
+ --include-dir=<%include%><%fornotlast(" \\")%>
+<%endfor%>
+<%endif%>
endif
<%endif%>
@@ -180,7 +194,7 @@ else
ifeq ($(findstring k, $(MAKEFLAGS)),k)
LIBCHECK = 1
else
- LIBCHECK ?= $(filter-out $(foreach lib,<%libs%>,$(findstring $(lib),$(foreach libpath,<%libpaths%> /usr/lib $(INSLIB),$(wildcard $(libpath)/lib$(lib).* $(libpath)/$(lib).lib)))),<%libs%>)
+ 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
@@ -365,34 +379,35 @@ include $(TGT_DIR)/h/make/rules.$(PRJ_TYPE)
endif
<%foreach(source_files)%>
-<%if(dirname(source_file) && !contains(source_file, \.\./))%>
-<%if(starts_with(source_file, \$) || !ends_with(source_file, \.cpp))%>
-<%if(ends_with(source_file, \.c))%>
+<%if(flag_overrides(source_file, buildflags))%>
$(VDIR)<%noextension(source_file)%>.$(OBJEXT): <%source_file%>
@$(MKDIR) $(VDIR)<%dirname(source_file)%>
- $(COMPILE.c) $(ACE_USE_PCH_OPT) $(CC_OUTPUT_FLAG) $@ $<
+ <%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)%>
- $(COMPILE.c) $(ACE_USE_PCH_OPT) $(PIC) $(CC_OUTPUT_FLAG) $@ $<
+ <%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)%>
- $(COMPILE.cc) $(ACE_USE_PCH_OPT) $(CC_OUTPUT_FLAG) $@ $<
+ <%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)%>
- $(COMPILE.cc) $(ACE_USE_PCH_OPT) $(PIC) $(CC_OUTPUT_FLAG) $@ $<
+ <%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%>
+<%endif%>
<%endfor%>
<%if(libpaths)%>
ifeq ($(VXWORKSLINK),true)
@@ -566,9 +581,9 @@ endif
<%endif%>
<%if(idl_files)%>
-<%if(source_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.
@@ -593,7 +608,9 @@ endif
ifneq ($(VXWORKSLINK),true)
<%if(libs && libpaths)%>
ifeq ($(static_libs_only), 1)
- DEPLIBS = $(foreach lib, <%libs%> <%lit_libs%>, $(foreach libpath, <%libpaths%>, $(wildcard $(libpath)/lib$(lib).a)))
+ 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%>