diff options
author | Dominik Riebeling <Dominik.Riebeling@gmail.com> | 2012-01-02 16:59:22 +0000 |
---|---|---|
committer | Dominik Riebeling <Dominik.Riebeling@gmail.com> | 2012-01-02 16:59:22 +0000 |
commit | 8c6c6a6b2077abcee6171890a00dafe8fae722ee (patch) | |
tree | 8da807a623b5b803acfd1b6ff991650e67f83a6e /rbutil | |
parent | de6c203b53c2c2aa0a3e53be81df58ef4c48abdb (diff) | |
download | rockbox-8c6c6a6b2077abcee6171890a00dafe8fae722ee.tar.gz rockbox-8c6c6a6b2077abcee6171890a00dafe8fae722ee.zip |
libtools.make: allow overriding variables via environment.
Simplify a bit while at it as well.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31523 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'rbutil')
-rw-r--r-- | rbutil/libtools.make | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/rbutil/libtools.make b/rbutil/libtools.make index 227d61b7d4..d25a97127c 100644 --- a/rbutil/libtools.make +++ b/rbutil/libtools.make | |||
@@ -23,11 +23,9 @@ endif | |||
23 | TOP := $(dir $(lastword $(MAKEFILE_LIST))) | 23 | TOP := $(dir $(lastword $(MAKEFILE_LIST))) |
24 | 24 | ||
25 | # overwrite for releases | 25 | # overwrite for releases |
26 | ifndef APPVERSION | 26 | APPVERSION ?= $(shell $(TOP)/../tools/version.sh ../) |
27 | APPVERSION=$(shell $(TOP)/../tools/version.sh ../) | ||
28 | endif | ||
29 | CFLAGS += -DVERSION=\"$(APPVERSION)\" | 27 | CFLAGS += -DVERSION=\"$(APPVERSION)\" |
30 | TARGET_DIR = $(shell pwd)/ | 28 | TARGET_DIR ?= $(shell pwd)/ |
31 | 29 | ||
32 | BINARY = $(OUTPUT) | 30 | BINARY = $(OUTPUT) |
33 | # when building a Windows binary add the correct file suffix | 31 | # when building a Windows binary add the correct file suffix |
@@ -45,19 +43,17 @@ endif | |||
45 | endif | 43 | endif |
46 | 44 | ||
47 | NATIVECC = gcc | 45 | NATIVECC = gcc |
48 | CC = gcc | 46 | CC ?= gcc |
49 | ifeq ($(findstring Darwin,$(shell uname)),Darwin) | 47 | ifeq ($(findstring Darwin,$(shell uname)),Darwin) |
50 | # building against SDK 10.4 is not compatible with gcc-4.2 (default on newer Xcode) | 48 | # building against SDK 10.4 is not compatible with gcc-4.2 (default on newer Xcode) |
51 | # might need adjustment for older Xcode. | 49 | # might need adjustment for older Xcode. |
52 | CC = gcc-4.0 | 50 | CC ?= gcc-4.0 |
53 | CFLAGS += -isysroot /Developer/SDKs/MacOSX10.4u.sdk -mmacosx-version-min=10.4 | 51 | CFLAGS += -isysroot /Developer/SDKs/MacOSX10.4u.sdk -mmacosx-version-min=10.4 |
54 | NATIVECC = gcc-4.0 | 52 | NATIVECC ?= gcc-4.0 |
55 | endif | 53 | endif |
56 | WINDRES = windres | 54 | WINDRES = windres |
57 | 55 | ||
58 | ifndef BUILD_DIR | 56 | BUILD_DIR ?= $(TARGET_DIR)build |
59 | BUILD_DIR = $(TARGET_DIR)build | ||
60 | endif | ||
61 | OBJDIR = $(abspath $(BUILD_DIR)/$(RBARCH))/ | 57 | OBJDIR = $(abspath $(BUILD_DIR)/$(RBARCH))/ |
62 | 58 | ||
63 | ifdef RBARCH | 59 | ifdef RBARCH |