summaryrefslogtreecommitdiff
path: root/rbutil/mkamsboot/Makefile
diff options
context:
space:
mode:
authorDominik Wenger <domonoky@googlemail.com>2009-09-04 21:31:17 +0000
committerDominik Wenger <domonoky@googlemail.com>2009-09-04 21:31:17 +0000
commit4d86861ce5e736503de058e221d13d600807efb4 (patch)
tree3945fa408a239ce751b1ce53a58d6b255e364da1 /rbutil/mkamsboot/Makefile
parent4dd44bffb0f985366587e788a1e34a25c2733919 (diff)
rbutil: modify buildsystem so you can build outside of the rbutilqt directoy. (similar to the normal buildsystem). Attention: Spaces in the path will cause errors.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22624 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'rbutil/mkamsboot/Makefile')
-rw-r--r--rbutil/mkamsboot/Makefile25
1 files changed, 12 insertions, 13 deletions
diff --git a/rbutil/mkamsboot/Makefile b/rbutil/mkamsboot/Makefile
index 3b4cc11404..8f4953a9e3 100644
--- a/rbutil/mkamsboot/Makefile
+++ b/rbutil/mkamsboot/Makefile
@@ -25,18 +25,17 @@ endif
endif
endif
-CC?= gcc
ifdef RBARCH
CFLAGS += -arch $(RBARCH)
endif
-OUT = build$(RBARCH)
+OUT = $(TARGET_DIR)build$(RBARCH)
all: $(OUTPUT)
$(LIBUCL):
- make -C ../../tools/ucl/src libucl.a
+ make -C ../../tools/ucl/src $(TARGET_DIR)libucl.a
# This file can be generated in the dualboot/ directory
$(OUT)/dualboot.o: dualboot.c
@@ -55,27 +54,27 @@ $(OUT)/libmkamsboot.o: mkamsboot.c dualboot.h md5.h
$(CC) $(CFLAGS) -DLIB -c -o $(OUT)/libmkamsboot.o -W -Wall mkamsboot.c
libmkamsboot$(RBARCH).a: $(OUT) $(OUT)/libmkamsboot.o $(OUT)/md5.o $(OUT)/dualboot.o
- $(AR) ru libmkamsboot$(RBARCH).a $(OUT)/libmkamsboot.o $(OUT)/md5.o $(OUT)/dualboot.o
+ $(AR) ru $(TARGET_DIR)libmkamsboot$(RBARCH).a $(OUT)/libmkamsboot.o $(OUT)/md5.o $(OUT)/dualboot.o
# some trickery to build ppc and i386 from a single call
ifeq ($(RBARCH),)
libmkamsbooti386.a:
- make RBARCH=i386 libmkamsbooti386.a
+ make RBARCH=i386 TARGET_DIR=$(TARGET_DIR) libmkamsbooti386.a
libmkamsbootppc.a:
- make RBARCH=ppc libmkamsbootppc.a
+ make RBARCH=ppc TARGET_DIR=$(TARGET_DIR) libmkamsbootppc.a
endif
libmkamsboot-universal: libmkamsbooti386.a libmkamsbootppc.a
- @echo lipo libmkamsboot.a
- $(SILENT) rm -f libmkamsboot.a
- lipo -create libmkamsbootppc.a libmkamsbooti386.a -output libmkamsboot.a
+ @echo lipo $(TARGET_DIR)libmkamsboot.a
+ $(SILENT) rm -f $(TARGET_DIR)libmkamsboot.a
+ lipo -create $(TARGET_DIR)libmkamsbootppc.a $(TARGET_DIR)libmkamsbooti386.a -output $(TARGET_DIR)libmkamsboot.a
clean:
- rm -f $(OUTPUT) libmkamsboot.o libmkamsboot*.a
+ rm -f $(OUTPUT) libmkamsboot.o $(TARGET_DIR)libmkamsboot*.a
rm -rf build*
-build$(RBARCH):
- @echo MKDIR build$(RBARCH)
- $(SILENT)mkdir build$(RBARCH)
+$(OUT):
+ @echo MKDIR $(OUT)
+ $(SILENT)mkdir $(OUT)