summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorelliott_c <ocielliottc@users.noreply.github.com>2006-02-15 16:03:44 +0000
committerelliott_c <ocielliottc@users.noreply.github.com>2006-02-15 16:03:44 +0000
commitcdbb0b7142f7417200618bfb0112a29d851cdac5 (patch)
tree6198a9434e1c1be2649300ecbe9aa7e3f596c83b
parent110841271e9f71c932e328c4af26e98214198c4f (diff)
downloadMPC-cdbb0b7142f7417200618bfb0112a29d851cdac5.tar.gz
ChangeLogTag: Wed Feb 15 16:03:06 UTC 2006 Chad Elliott <elliott_c@ociweb.com>
-rw-r--r--ChangeLog31
-rw-r--r--config/boost_base.mpb2
-rw-r--r--config/bzip2.mpb9
-rw-r--r--config/global.features7
-rw-r--r--config/zlib.mpb4
-rw-r--r--modules/ProjectCreator.pm2
-rw-r--r--templates/make.mpd43
-rw-r--r--templates/makedll.mpt55
-rw-r--r--templates/vc7.mpd2
9 files changed, 132 insertions, 23 deletions
diff --git a/ChangeLog b/ChangeLog
index 0a654609..eee024b3 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,34 @@
+Wed Feb 15 16:03:06 UTC 2006 Chad Elliott <elliott_c@ociweb.com>
+
+ * config/boost_base.mpb:
+
+ Added an include path for $(BOOST_ROOT).
+
+ * config/bzip2.mpb:
+ * config/global.features:
+
+ Added a bzip2 feature project and set the bzip2 feature to zero by
+ default.
+
+ * config/zlib.mpb:
+
+ Switch from libs to lit_libs so that no decorator is added to the
+ library name.
+
+ * modules/ProjectCreator.pm:
+
+ Accept .ipp as inline files.
+
+ * templates/make.mpd:
+ * templates/makedll.mpt:
+
+ Provide library versioning on platforms that support it. Added
+ initial support for the intel compiler on Linux.
+
+ * templates/vc7.mpd:
+
+ Allow switching off exception handling.
+
Tue Feb 14 17:06:40 2006 Steve Huston <shuston@riverace.com>
* templates/vc8platforms.mpt: Changed the WinX86_64 platform to be
diff --git a/config/boost_base.mpb b/config/boost_base.mpb
index 12e40a87..289d3fe6 100644
--- a/config/boost_base.mpb
+++ b/config/boost_base.mpb
@@ -3,6 +3,6 @@
project {
requires += boost
- includes += $(BOOST_ROOT)/include/$(BOOST_VERSION)
+ includes += $(BOOST_ROOT)/include/$(BOOST_VERSION) $(BOOST_ROOT)/.
libpaths += $(BOOST_ROOT)/lib
}
diff --git a/config/bzip2.mpb b/config/bzip2.mpb
new file mode 100644
index 00000000..ea244f44
--- /dev/null
+++ b/config/bzip2.mpb
@@ -0,0 +1,9 @@
+// -*- MPC -*-
+// $Id$
+
+feature(bzip2) {
+ includes += $(BZIP2_ROOT)/include
+ libpaths += $(BZIP2_ROOT)/lib
+ macros += USE_BZIP2
+ lit_libs += bz2
+}
diff --git a/config/global.features b/config/global.features
index 217d53d9..1d9a27e1 100644
--- a/config/global.features
+++ b/config/global.features
@@ -15,12 +15,13 @@
//
// By default we disable these.
boost = 0
+bzip2 = 0
mfc = 0
+python = 0
qt = 0
rpc = 0
+swig_java = 0
+swig_perl = 0
xerces = 0
zlib = 0
zzip = 0
-swig_perl = 0
-swig_java = 0
-python = 0
diff --git a/config/zlib.mpb b/config/zlib.mpb
index e80bd7f0..26362d78 100644
--- a/config/zlib.mpb
+++ b/config/zlib.mpb
@@ -9,8 +9,8 @@ feature(zlib) {
// @@ Notice: If you are building with Cygwin, you may need to manually
// change the following library to zlib.
specific(gnuace, make, sle, automake, ghs) {
- libs += z
+ lit_libs += z
} else {
- libs += zlib
+ lit_libs += zlib
}
}
diff --git a/modules/ProjectCreator.pm b/modules/ProjectCreator.pm
index 58c88c93..4c724c7c 100644
--- a/modules/ProjectCreator.pm
+++ b/modules/ProjectCreator.pm
@@ -146,7 +146,7 @@ my($generic_key) = 'generic_files';
my(%cppvc) = ('source_files' => [ "\\.cpp", "\\.cxx", "\\.cc", "\\.c", "\\.C", ],
'template_files' => [ "_T\\.cpp", "_T\\.cxx", "_T\\.cc", "_T\\.c", "_T\\.C", ],
'header_files' => [ "\\.h", "\\.hpp", "\\.hxx", "\\.hh", ],
- 'inline_files' => [ "\\.i", "\\.inl", ],
+ 'inline_files' => [ "\\.i", "\\.ipp", "\\.inl", ],
'documentation_files' => [ "README", "readme", "\\.doc", "\\.txt", "\\.html" ],
'resource_files' => [ "\\.rc", ],
);
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)%>
diff --git a/templates/makedll.mpt b/templates/makedll.mpt
index d9e7cecd..aba6a75a 100644
--- a/templates/makedll.mpt
+++ b/templates/makedll.mpt
@@ -23,6 +23,7 @@ conditional_include "unixcommon"
configurations = Release
compilers = gcc
obj_ext = .o
+res_ext = .res
compile_flags =
arflags =
pchsupport = 1
@@ -31,6 +32,8 @@ slash = /
libopt = -l
build64bit = 1
pchext = .gch
+versupport = 1
+dependencies = 1
// ***********************************************************************
// Configuration Section
@@ -80,6 +83,16 @@ cxx_vms {
platforms = openvms
}
+dmc {
+ cxx = dmc
+ dmclink = 1
+ ar = lib
+ arflags = -c
+ obj_ext = .obj
+ dependencies =
+ platforms = dmc_win
+}
+
gcc {
cxx = g++
pic = -fPIC
@@ -89,6 +102,13 @@ gcc {
pchnobj = 1
}
+Intel {
+ cxx = icpc
+ pic = -fPIC
+ shflags = -shared
+ platforms = linux
+}
+
SunCC {
cxx = CC
pic = -KPIC
@@ -180,6 +200,7 @@ ghsppc {
// ***********************************************************************
jvm {
+ versupport =
lib_prefix =
dll_ext =
lib_ext = .jar
@@ -194,6 +215,7 @@ tru64 {
openvms {
// If you want to create shareable images, you can
// set dll_ext to .exe using the -value_template option of MPC.
+ versupport =
lib_prefix =
dll_ext =
exe_ext = .exe
@@ -244,7 +266,6 @@ macos {
unixware {
ldlibs = -lsocket -ldl -lnsl -lgen -lposix4 -lthread
extracppflags = -D_REENTRANT
-
}
qnx {
@@ -253,6 +274,7 @@ qnx {
}
vxworks {
+ versupport =
dll_ext =
specialscript = "#!/bin/sh\nfor i in $$3; do\nfor j in $$4; do\ni=`echo $$i | sed sa\^-laa`\n[ -r \"$$j/lib$$i.a\" ] && libs=\"$$libs $$j/lib$$i.a\" && break\ndone\ndone\n$$1 $$2 $$libs | munch | grep -v \\.cpp > $$5"
prelink = __ctordtor.c
@@ -261,21 +283,43 @@ vxworks {
}
cygwin {
- dll_ext = .dll
- exe_ext = .exe
- rc = windres
+ versupport =
+ dll_ext = .dll
+ exe_ext = .exe
+ rc = windres
+ res_ext = .o
}
mingw {
+ versupport =
lib_prefix =
dll_ext = .dll
+ lib_ext = .lib
exe_ext = .exe
ldlibs = -lwsock32 -lnetapi32
- rc = windres
+ rc = rc
+ devnull = nul
+ delete = del /f/s/q
+ type = type
+ copy = copy /y
+ makedir = mkdir
+ move = move /y
+}
+
+dmc_win {
+ versupport =
+ lib_prefix =
+ dll_ext = .dll
+ lib_ext = .lib
+ exe_ext = .exe
+ ldlibs = wsock32+kernel32
+ rc = rc
devnull = nul
delete = del /f/s/q
+ type = type
copy = copy /y
makedir = mkdir
+ move = move /y
}
tandem {
@@ -294,6 +338,7 @@ tandem {
// TARGET_LD The full path to your target ld file.
//
integrity {
+ versupport =
dll_ext =
ldlibs = -lshm_client -lnet -livfssca -lposixsca
extraarflags = -bspname=$(RTOSROOT)/target/$(BSP).bld
diff --git a/templates/vc7.mpd b/templates/vc7.mpd
index c9761d49..54163fbd 100644
--- a/templates/vc7.mpd
+++ b/templates/vc7.mpd
@@ -42,7 +42,7 @@
AdditionalIncludeDirectories="<%foreach(includes)%><%include%><%fornotlast(",")%><%endfor%>"
PreprocessorDefinitions="<%if(unicode)%>UNICODE;_UNICODE;<%endif%><%if(type_is_dynamic)%><%foreach(dynamicflags)%><%dynamicflag%>;<%endfor%><%endif%><%if(need_staticflags)%><%foreach(staticflags)%><%staticflag%>;<%endfor%><%endif%><%if(pch_header)%><%foreach(pch_defines)%><%pch_define%>;<%endfor%><%endif%><%foreach(defines common_defines macros)%><%define%><%fornotlast(";")%><%endfor%>"
MinimalRebuild="<%MinimalRebuild("FALSE")%>"
- ExceptionHandling="TRUE"
+ ExceptionHandling="<%exceptions("TRUE")%>"
<%if(optimize)%>
<%if(BasicRuntimeChecks)%>
BasicRuntimeChecks="<%BasicRuntimeChecks%>"