aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHans-Christoph Steiner <eighthave@users.sourceforge.net>2005-11-17 01:05:23 +0000
committerHans-Christoph Steiner <eighthave@users.sourceforge.net>2005-11-17 01:05:23 +0000
commitde9a95849154960de0992de70e371b3dfb82ecbb (patch)
tree951307abfdb4b6676db73ee103fbc1695fc47a0f
parent44ec3d0160d854fe1ed6f0c955135009efbba917 (diff)
got the basic framework working for compiling on each platform. Now its time to standardize the externals/build/*/makefile's
svn path=/trunk/; revision=3953
-rw-r--r--packages/Makefile43
1 files changed, 38 insertions, 5 deletions
diff --git a/packages/Makefile b/packages/Makefile
index 4b7db638..11966156 100644
--- a/packages/Makefile
+++ b/packages/Makefile
@@ -12,12 +12,10 @@ SRC_ROOT_DIR = $(CWD)/..
INSTALL_PREFIX = $(SRC_ROOT_DIR)/packages/build
BUILDLAYOUT_DIR = $(CWD)
-# get the platform
-UNAME := $(shell uname)
# default target
all: abstractions doc externals gem pd
- echo "Complete build succeeded!"
+ @echo "Complete build succeeded!"
include $(BUILDLAYOUT_DIR)/Makefile.buildlayout
@@ -32,6 +30,24 @@ DEST_PATHS = BUILDLAYOUT_DIR=$(BUILDLAYOUT_DIR) \
# MANUALS_DEST=$(MANUALS_DEST) \
# OBJECTS_DEST=$(OBJECTS_DEST)
+#------------------------------------------------------------------------------
+# which OS to compile for
+UNAME := $(shell uname -s)
+ifeq ($(UNAME),Linux)
+ OS_NAME = linux
+else
+ ifeq ($(UNAME),Darwin)
+ OS_NAME = darwin
+ else
+ ifeq (MINGW,$(findstring MINGW,$(UNAME)))
+ OS_NAME = win
+ else
+ OS_NAME = unknown
+ $(warning WARNING: unknown environment "$(UNAME)".)
+ endif
+ endif
+endif
+
#==============================================================================#
#
# BUILD TARGETS
@@ -50,10 +66,21 @@ doc:
#------------------------------------------------------------------------------
# externals
-externals:
+externals: externals_$(OS_NAME)
# doc
make -f $(EXTERNALS_SRC)/build/doc/makefile $(DEST_PATHS) install
+ @echo "Making externals for $(OS_NAME) aka $(UNAME)"
+ make -f $(EXTERNALS_SRC)/build/$(OS_NAME)/makefile $(DEST_PATHS) install
+
+# these targets are for platform-specific needs
+externals_darwin:
+
+externals_linux:
+
+externals_win:
+externals_unknown:
+# this target is for "everything else"
#------------------------------------------------------------------------------
# Gem
@@ -71,7 +98,13 @@ pd:
abstractions_clean:
make -f $(ABSTRACTIONS_SRC)/Makefile $(DEST_PATHS) clean
-clean: abstractions_clean
+
+externals_clean:
+ make -f $(EXTERNALS_SRC)/build/$(OS_NAME)/makefile $(DEST_PATHS) clean
+
+
+
+clean: abstractions_clean
-rm -f *~
rm -rf $(MANUALS_DEST) $(HELP_DEST)
rmdir $(DOCS_DEST) $(INSTALL_PREFIX)