summaryrefslogtreecommitdiffstatshomepage
path: root/makefile
diff options
context:
space:
mode:
author Miodrag Milanovic <mmicko@gmail.com>2015-03-27 15:11:41 +0100
committer Miodrag Milanovic <mmicko@gmail.com>2015-03-27 15:11:41 +0100
commitfdd61e7569c453cdbb4f243d9c5c4ca0a37b4eb8 (patch)
tree17580fb469a5da028e4e9e42b16d2cd2b1ae7343 /makefile
parentf3ad510321a53084612144cc30a1f381fe4620d7 (diff)
renamed CC to OVERRIDE_CC and same for CXX and LD since otherwise values sent to GENie are makefile defaults and they always overwrite values in built scripts (nw)
Diffstat (limited to 'makefile')
-rw-r--r--makefile35
1 files changed, 26 insertions, 9 deletions
diff --git a/makefile b/makefile
index e87b005b0b9..95a2ede466a 100644
--- a/makefile
+++ b/makefile
@@ -18,15 +18,6 @@
ifdef TOOLS
PARAMS+= --with-tools
endif
-ifdef CC
-PARAMS+= --CC='$(CC)'
-endif
-ifdef CXX
-PARAMS+= --CXX='$(CXX)'
-endif
-ifdef LD
-PARAMS+= --LD='$(LD)'
-endif
#-------------------------------------------------
# specify core target: mame, mess, etc.
@@ -154,6 +145,8 @@ endif
PYTHON = @python
+CC = @gcc
+LD = @g++
#-------------------------------------------------
# distribution may change things
@@ -165,14 +158,25 @@ else
ifeq ($(DISTRO),debian-stable)
else
ifeq ($(DISTRO),ubuntu-intrepid)
+# Force gcc-4.2 on ubuntu-intrepid
+CC = @gcc -V 4.2
+LD = @g++-4.2
else
ifeq ($(DISTRO),gcc44-generic)
+CC = @gcc-4.4
+LD = @g++-4.4
else
ifeq ($(DISTRO),gcc45-generic)
+CC = @gcc-4.5
+LD = @g++-4.5
else
ifeq ($(DISTRO),gcc46-generic)
+CC = @gcc-4.6
+LD = @g++-4.6
else
ifeq ($(DISTRO),gcc47-generic)
+CC = @gcc-4.7
+LD = @g++-4.7
else
$(error DISTRO $(DISTRO) unknown)
endif
@@ -185,6 +189,19 @@ endif
PARAMS+= --distro=$(DISTRO)
+ifdef OVERRIDE_CC
+PARAMS+= --CC='$(OVERRIDE_CC)'
+CC = $(OVERRIDE_CC)
+endif
+ifdef OVERRIDE_CXX
+PARAMS+= --CXX='$(OVERRIDE_CXX)'
+CXX = $(OVERRIDE_CXX)
+endif
+ifdef OVERRIDE_LD
+PARAMS+= --LD='$(OVERRIDE_LD)'
+LD = $(OVERRIDE_LD)
+endif
+
#-------------------------------------------------
# sanity check the configuration
#-------------------------------------------------