summaryrefslogtreecommitdiff
path: root/makefiles/nmake
diff options
context:
space:
mode:
authorAndreas Baumann <abaumann@yahoo.com>2010-05-18 16:30:11 +0200
committerAndreas Baumann <abaumann@yahoo.com>2010-05-18 16:30:11 +0200
commitdacc8d2149f9095d612d95ec8dfcf596681be18b (patch)
tree1220c641c4942c338fe6eef992f1700620a63cfa /makefiles/nmake
parent0f8614c42aacb4f0b47fa843541281be97b8a574 (diff)
downloadwolfbones-dacc8d2149f9095d612d95ec8dfcf596681be18b.tar.gz
wolfbones-dacc8d2149f9095d612d95ec8dfcf596681be18b.tar.bz2
merged makefile system with SMERP
Diffstat (limited to 'makefiles/nmake')
-rw-r--r--makefiles/nmake/clean.mk8
-rw-r--r--makefiles/nmake/compiler.mk22
-rw-r--r--makefiles/nmake/config.mk44
-rw-r--r--makefiles/nmake/platform.mk7
4 files changed, 71 insertions, 10 deletions
diff --git a/makefiles/nmake/clean.mk b/makefiles/nmake/clean.mk
index f7cdb2b..91d941b 100644
--- a/makefiles/nmake/clean.mk
+++ b/makefiles/nmake/clean.mk
@@ -16,8 +16,6 @@ clean_recursive:
@if not "$(SUBDIRS)" == "" @for %%d IN ( $(SUBDIRS) ) do @cd %%d & $(MAKE) /nologo /f Makefile.w32 clean & cd ..
#clean: clean_recursive local_clean
-# -@rm -f *.bak 2>/dev/null
-# -@rm -f *~ 2>/dev/null
# -@rm -f *.d port/*.d 2>/dev/null
# -@rm -f $(BINS) $(CPP_BINS) $(TEST_BINS) $(TEST_CPP_BINS) 2>/dev/null
# -@rm -f $(OBJS) $(CPP_OBJS) $(BIN_OBJS) $(TEST_BIN_OBJS) $(CPP_BIN_OBJS) $(TEST_CPP_BIN_OBJS) 2>/dev/null
@@ -37,6 +35,12 @@ clean: clean_recursive local_clean
-@erase *.rc 2>NUL
-@erase *.res 2>NUL
-@erase MSG*.bin 2>NUL
+ -@erase *.dllobj 2>NUL
+ -@erase $(DLL_OBJS) 2>NUL
+ -@erase *.exp 2>NUL
+ -@erase *.ilk 2>NUL
+ -@erase *.idb 2>NUL
+ -@erase *.manifest 2>NUL
distclean_recursive:
@if not "$(SUBDIRS)" == "" @for %%d IN ( $(SUBDIRS) ) do @cd %%d & $(MAKE) /nologo /f Makefile.w32 distclean & cd ..
diff --git a/makefiles/nmake/compiler.mk b/makefiles/nmake/compiler.mk
index 51c8596..d6988d0 100644
--- a/makefiles/nmake/compiler.mk
+++ b/makefiles/nmake/compiler.mk
@@ -15,9 +15,16 @@
# /nologo: disable MS disclaimer
# /MT: create a multi-thread binary
# /EHsc: enable C++ exception handling
+# /Ox: optimize what you can
+# /Zi: enable debug information
+# /MTD: create multi-threaded debug binary
+# /we<n>: show warnings (level 1 to 4)
+# /Wall: enable all warnings
-# compilation flags and compilers
+# compilation flags and compilers (release)
COMMON_COMPILE_FLAGS = /MT /nologo /c $(INCLUDE_DIRS)
+# compilation flags and compilers (debug)
+#COMMON_COMPILE_FLAGS = /MDd /ZI /nologo /c $(INCLUDE_DIRS) /RTC1
COMPILE_FLAGS = $(COMMON_COMPILE_FLAGS)
@@ -30,7 +37,12 @@ CCPP = cl.exe
MC = "$(PLATFORM_SDK_DIR)\Bin\mc.exe"
RC = "$(PLATFORM_SDK_DIR)\Bin\rc.exe"
+# linking flags (release)
LDFLAGS = /nologo $(INCLUDE_LDFLAGS)
+
+# linking flags (debug)
+#LDFLAGS = /nologo /debug $(INCLUDE_LDFLAGS)
+
LIBS = $(INCLUDE_LIBS)
LINK = link.exe
CCPP_LINK = link.exe
@@ -41,7 +53,13 @@ CCPP_LINK = link.exe
$(CC) $(CFLAGS) /Fo$@ $<
.cpp.obj:
- $(CCPP) $(CCPPFLAGS) $<
+ $(CCPP) $(CCPPFLAGS) /Fo$@ $<
+
+.c.dllobj:
+ $(CC) $(CFLAGS) /D "BUILD_SHARED" /Fo$@ $<
+
+.cpp.dllobj:
+ $(CCPP) $(CCPPFLAGS) /D "BUILD_SHARED" /Fo$@ $<
.obj.exe:
$(CCPP_LINK) $(LDFLAGS) $(LIBS) /out:$@ $< $(OBJS)
diff --git a/makefiles/nmake/config.mk b/makefiles/nmake/config.mk
new file mode 100644
index 0000000..3dcdef4
--- /dev/null
+++ b/makefiles/nmake/config.mk
@@ -0,0 +1,44 @@
+# Configuration supposed to be configured here by the user
+#
+# provides:
+# - PLATFORM_SDK_DIR
+# - BOOST_DIR
+# - OPENSSL_DIR
+
+# please customize
+
+# Windows Platform SDK
+######################
+
+# The location of the Windows Platform SDK
+# newer versions of Visual Studio integrate the header files of the SDK
+# some versions of Visual Studio miss the mc.exe binary
+
+PLATFORM_SDK_DIR = C:\Program Files\Microsoft Platform SDK for Windows Server 2003 R2
+#PLATFORM_SDK_DIR = C:\Programme\Microsoft Platform SDK for Windows Server 2003 R2
+
+# Boost (http://www.boostpro.com/download)
+###########################################
+
+# version of the boost library
+
+BOOST_VERSION=1_42
+
+# base dir where boost is installed
+
+BOOST_DIR=C:\Program Files\boost\boost_$(BOOST_VERSION)
+#BOOST_DIR=C:\Programme\boost\boost_$(BOOST_VERSION)
+
+# visual studio version used for compiling
+
+BOOST_VC_VER=vc90
+#BOOST_VC_VER=vc80
+
+# TODO: probe those
+BOOST_MT=-mt
+
+# OpenSSL (http://www.slproweb.com/products/Win32OpenSSL.html)
+##############################################################
+
+OPENSSL_DIR=C:\Program Files\OpenSSL
+#OPENSSL_DIR=C:\Programme\OpenSSL
diff --git a/makefiles/nmake/platform.mk b/makefiles/nmake/platform.mk
index aca9926..6c0f90d 100644
--- a/makefiles/nmake/platform.mk
+++ b/makefiles/nmake/platform.mk
@@ -1,17 +1,12 @@
# Sets Windows specific variables
#
-# requires:
-# -
-#
# provides:
# - PLATFORM_SDK_DIR: the location of the Windows Platform SDK, used
# for compiling anything from the Win32 API into a binary/library
#
# author: Andreas Baumann, abaumann at yahoo dot com
-# The location of the Windows Platform SDK
-PLATFORM_SDK_DIR = C:\Program Files\Microsoft Platform SDK for Windows Server 2003 R2
-#PLATFORM_SDK_DIR = C:\Programme\Microsoft Platform SDK for Windows Server 2003 R2
+!include $(TOPDIR)\makefiles\nmake\config.mk
# TODO: maybe we have to probe certain things like the version
# of the visual studio or the availability of certain addons