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/libtools.make | |
parent | de6c203b53c2c2aa0a3e53be81df58ef4c48abdb (diff) |
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/libtools.make')
-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 TOP := $(dir $(lastword $(MAKEFILE_LIST))) # overwrite for releases -ifndef APPVERSION -APPVERSION=$(shell $(TOP)/../tools/version.sh ../) -endif +APPVERSION ?= $(shell $(TOP)/../tools/version.sh ../) CFLAGS += -DVERSION=\"$(APPVERSION)\" -TARGET_DIR = $(shell pwd)/ +TARGET_DIR ?= $(shell pwd)/ BINARY = $(OUTPUT) # when building a Windows binary add the correct file suffix @@ -45,19 +43,17 @@ endif endif NATIVECC = gcc -CC = gcc +CC ?= gcc ifeq ($(findstring Darwin,$(shell uname)),Darwin) # building against SDK 10.4 is not compatible with gcc-4.2 (default on newer Xcode) # might need adjustment for older Xcode. -CC = gcc-4.0 +CC ?= gcc-4.0 CFLAGS += -isysroot /Developer/SDKs/MacOSX10.4u.sdk -mmacosx-version-min=10.4 -NATIVECC = gcc-4.0 +NATIVECC ?= gcc-4.0 endif WINDRES = windres -ifndef BUILD_DIR -BUILD_DIR = $(TARGET_DIR)build -endif +BUILD_DIR ?= $(TARGET_DIR)build OBJDIR = $(abspath $(BUILD_DIR)/$(RBARCH))/ ifdef RBARCH |