summaryrefslogtreecommitdiff
path: root/makefiles
diff options
context:
space:
mode:
authorAndreas Baumann <abaumann@yahoo.com>2009-03-09 18:37:00 +0100
committerAndreas Baumann <abaumann@yahoo.com>2009-03-09 18:37:00 +0100
commit68f89a207f94f9efd7b4bc3ec630917c8f5259f4 (patch)
treef658c041f79ea7e5f295fc8430220eab641f8f0f /makefiles
parent75417ca9d2c58ab5cff0da5c501b02ad6dfeeb8e (diff)
downloadwolfbones-68f89a207f94f9efd7b4bc3ec630917c8f5259f4.tar.gz
wolfbones-68f89a207f94f9efd7b4bc3ec630917c8f5259f4.tar.bz2
fixed the subdir guess_env problem (passing CURDIR and TOPDIR)
Diffstat (limited to 'makefiles')
-rw-r--r--makefiles/gmake/clean.mk1
-rw-r--r--makefiles/gmake/compiler.mk12
-rwxr-xr-xmakefiles/gmake/guess_env6
-rw-r--r--makefiles/gmake/platform.mk8
4 files changed, 15 insertions, 12 deletions
diff --git a/makefiles/gmake/clean.mk b/makefiles/gmake/clean.mk
index d416905..1df9cff 100644
--- a/makefiles/gmake/clean.mk
+++ b/makefiles/gmake/clean.mk
@@ -28,6 +28,7 @@ clean: clean_recursive local_clean
-@rm -f *.core
-@rm -f $(CMODULES) $(CPPMODULES)
-@rm -f $(CMODULES .o=.d) $(CPPMODULES .o=.d)
+ -@rm $(TOPDIR)/makefiles/gmake/platform.mk.vars
.PHONY: distclean_recursive distclean local_distclean
diff --git a/makefiles/gmake/compiler.mk b/makefiles/gmake/compiler.mk
index e88ad79..848e1c8 100644
--- a/makefiles/gmake/compiler.mk
+++ b/makefiles/gmake/compiler.mk
@@ -15,8 +15,8 @@
ifeq "$(COMPILER)" "gcc"
-GCC_MAJOR_VERSION ?= $(shell $(TOPDIR)/makefiles/gmake/guess_env --gcc-major-version $(CC))
-GCC_MINOR_VERSION ?= $(shell $(TOPDIR)/makefiles/gmake/guess_env --gcc-minor-version $(CC))
+GCC_MAJOR_VERSION ?= $(shell $(TOPDIR)/makefiles/gmake/guess_env --gcc-major-version $(CC) $(CURDIR) $(TOPDIR))
+GCC_MINOR_VERSION ?= $(shell $(TOPDIR)/makefiles/gmake/guess_env --gcc-minor-version $(CC) $(CURDIR) $(TOPDIR))
# -Wswitch-default: not good for switches with enums
# -Wsystem-headers: bad idea, as header files are usually happily broken :-)
@@ -151,8 +151,8 @@ endif
# start of tcc section
# currently we don't need this, the tcc flags are fairly consistent
-#TCC_MAJOR_VERSION ?= $(shell $(TOPDIR)/makefiles/gmake/guess_env --tcc-major-version $(CC))
-#TCC_MINOR_VERSION ?= $(shell $(TOPDIR)/makefiles/gmake/guess_env --tcc-minor-version $(CC))
+#TCC_MAJOR_VERSION ?= $(shell $(TOPDIR)/makefiles/gmake/guess_env --tcc-major-version $(CC) $(CURDIR) $(TOPDIR))
+#TCC_MINOR_VERSION ?= $(shell $(TOPDIR)/makefiles/gmake/guess_env --tcc-minor-version $(CC) $(CURDIR) $(TOPDIR))
ifeq "$(COMPILER)" "tcc"
COMPILE_FLAGS = \
@@ -164,8 +164,8 @@ endif
# start of icc section
# currently we don't need this, the icc flags are fairly consistent
-#ICC_MAJOR_VERSION ?= $(shell $(TOPDIR)/makefiles/gmake/guess_env --icc-major-version $(CC))
-#ICC_MINOR_VERSION ?= $(shell $(TOPDIR)/makefiles/gmake/guess_env --icc-minor-version $(CC))
+#ICC_MAJOR_VERSION ?= $(shell $(TOPDIR)/makefiles/gmake/guess_env --icc-major-version $(CC) $(CURDIR) $(TOPDIR))
+#ICC_MINOR_VERSION ?= $(shell $(TOPDIR)/makefiles/gmake/guess_env --icc-minor-version $(CC) $(CURDIR) $(TOPDIR))
# -vec-report0: turn of SSE2 vector usage messages (they are common since P-4 anyway!)
diff --git a/makefiles/gmake/guess_env b/makefiles/gmake/guess_env
index 1cd0f98..410fb3f 100755
--- a/makefiles/gmake/guess_env
+++ b/makefiles/gmake/guess_env
@@ -155,9 +155,11 @@ case "$1" in
;;
esac
+MAKEFILE_DIR="$3/$4"
+
# regenerate the cache file, otherwise building is far too slow!
-if test ! -f makefiles/gmake/platform.mk.vars; then
- cat >makefiles/gmake/platform.mk.vars <<EOF
+if test ! -f ${MAKEFILE_DIR}/makefiles/gmake/platform.mk.vars; then
+ cat >${MAKEFILE_DIR}/makefiles/gmake/platform.mk.vars <<EOF
ARCH=$ARCH
PLATFORM=$PLATFORM
OS_MAJOR_VERSION=$OS_MAJOR_VERSION
diff --git a/makefiles/gmake/platform.mk b/makefiles/gmake/platform.mk
index 8fc3905..ba3e8d0 100644
--- a/makefiles/gmake/platform.mk
+++ b/makefiles/gmake/platform.mk
@@ -18,10 +18,10 @@
-include $(TOPDIR)/makefiles/gmake/platform.mk.vars
-PLATFORM ?= $(shell $(TOPDIR)/makefiles/gmake/guess_env --platform $(CC))
-OS_MAJOR_VERSION ?= $(shell $(TOPDIR)/makefiles/gmake/guess_env --os-major-version $(CC))
-OS_MINOR_VERSION ?= $(shell $(TOPDIR)/makefiles/gmake/guess_env --os-minor-version $(CC))
-COMPILER ?= $(shell $(TOPDIR)/makefiles/gmake/guess_env --compiler $(CC))
+PLATFORM ?= $(shell $(TOPDIR)/makefiles/gmake/guess_env --platform $(CC) $(CURDIR) $(TOPDIR))
+OS_MAJOR_VERSION ?= $(shell $(TOPDIR)/makefiles/gmake/guess_env --os-major-version $(CC) $(CURDIR) $(TOPDIR))
+OS_MINOR_VERSION ?= $(shell $(TOPDIR)/makefiles/gmake/guess_env --os-minor-version $(CC) $(CURDIR) $(TOPDIR))
+COMPILER ?= $(shell $(TOPDIR)/makefiles/gmake/guess_env --compiler $(CC) $(CURDIR) $(TOPDIR))
PLATFORM_COMPILE_FLAGS = \
-D$(PLATFORM) \