diff options
| author | Dominik Wenger <domonoky@googlemail.com> | 2009-09-04 21:31:17 +0000 |
|---|---|---|
| committer | Dominik Wenger <domonoky@googlemail.com> | 2009-09-04 21:31:17 +0000 |
| commit | 4d86861ce5e736503de058e221d13d600807efb4 (patch) | |
| tree | 3945fa408a239ce751b1ce53a58d6b255e364da1 /tools | |
| parent | 4dd44bffb0f985366587e788a1e34a25c2733919 (diff) | |
| download | rockbox-4d86861ce5e736503de058e221d13d600807efb4.zip rockbox-4d86861ce5e736503de058e221d13d600807efb4.tar.gz rockbox-4d86861ce5e736503de058e221d13d600807efb4.tar.bz2 rockbox-4d86861ce5e736503de058e221d13d600807efb4.tar.xz | |
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 'tools')
| -rw-r--r-- | tools/rbspeex/Makefile | 24 | ||||
| -rw-r--r-- | tools/ucl/src/Makefile | 25 |
2 files changed, 25 insertions, 24 deletions
diff --git a/tools/rbspeex/Makefile b/tools/rbspeex/Makefile index a82e80e..41bf775 100644 --- a/tools/rbspeex/Makefile +++ b/tools/rbspeex/Makefile @@ -35,7 +35,7 @@ endif # This sets up 'SRC' based on the files mentioned in SOURCES SRC := $(shell cat $(SPEEXSRC)/SOURCES | $(CC) $(CFLAGS) -E -P - | grep -v "^\#" | grep -v "^$$") -OUT = build$(RBARCH) +OUT = $(TARGET_DIR)build$(RBARCH) SOURCES = $(SRC:%.c=$(SPEEXSRC)/%.c) rbspeex.c rbspeexenc.c rbspeexdec.c OBJS = $(addprefix $(OUT)/,$(SRC:%.c=%.o)) DEPFILE = $(OUT)/dep-speex @@ -46,8 +46,8 @@ DIRS = all: ../rbspeexenc ../rbspeexdec $(DEPFILE): $(SOURCES) - @echo MKDIR build$(RBARCH) - $(SILENT)mkdir -p build$(RBARCH) + @echo MKDIR $(OUT) + $(SILENT)mkdir -p $(OUT) @echo Creating dependencies $(SILENT)rm -f $(DEPFILE) $(SILENT)(for each in $(SOURCES) x; do \ @@ -69,7 +69,7 @@ $(OUT)/librbspeex.a: $(OBJS) $(DEPFILE) $(OUT)/rbspeex.o $(SILENT)$(AR) ruv $@ $+ > /dev/null 2>&1 librbspeex$(RBARCH).a: $(OUT)/librbspeex.a - $(SILENT)cp $(OUT)/librbspeex.a librbspeex$(RBARCH).a + $(SILENT)cp $(OUT)/librbspeex.a $(TARGET_DIR)librbspeex$(RBARCH).a ../rbspeexenc: $(OBJS) $(OUT)/rbspeexenc.o librbspeex$(RBARCH).a @echo Linking ../rbspeexenc @@ -86,22 +86,22 @@ librbspeex$(RBARCH).a: $(OUT)/librbspeex.a # some trickery to build ppc and i386 from a single call ifeq ($(RBARCH),) librbspeexi386.a: - make RBARCH=i386 librbspeexi386.a + make RBARCH=i386 TARGET_DIR=$(TARGET_DIR) librbspeexi386.a librbspeexppc.a: - make RBARCH=ppc librbspeexppc.a + make RBARCH=ppc TARGET_DIR=$(TARGET_DIR) librbspeexppc.a endif librbspeex-universal: librbspeexi386.a librbspeexppc.a @echo lipo librbspeex.a - $(SILENT) rm -f librbspeex.a - lipo -create librbspeexppc.a librbspeexi386.a -output librbspeex.a + $(SILENT) rm -f $(TARGET_DIR)librbspeex.a + lipo -create $(TARGET_DIR)librbspeexppc.a $(TARGET_DIR)librbspeexi386.a -output $(TARGET_DIR)librbspeex.a clean: - rm -f $(OBJS) librbspeex* ../rbspeexenc ../rbspeexdec dep-speex + rm -f $(OBJS) $(TARGET_DIR)librbspeex* ../rbspeexenc ../rbspeexdec $(TARGET_DIR)dep-speex rm -rf build* -build$(RBARCH): - @echo MKDIR build$(RBARCH) - $(SILENT)mkdir build$(RBARCH) +$(OUT): + @echo MKDIR $(OUT) + $(SILENT)mkdir $(OUT) diff --git a/tools/ucl/src/Makefile b/tools/ucl/src/Makefile index b4b841a..147959a 100644 --- a/tools/ucl/src/Makefile +++ b/tools/ucl/src/Makefile @@ -17,7 +17,8 @@ ifdef RBARCH CFLAGS += -arch $(RBARCH) endif -OUT = build$(RBARCH) + +OUT = $(TARGET_DIR)build$(RBARCH) SOURCES = alloc.c io.c n2b_99.c n2b_d.c n2b_ds.c n2b_to.c n2d_99.c \ n2d_d.c n2d_ds.c n2d_to.c n2e_99.c n2e_d.c n2e_ds.c n2e_to.c ucl_crc.c \ @@ -30,8 +31,8 @@ OBJS = $(OUT)/alloc.o $(OUT)/io.o $(OUT)/n2b_99.o $(OUT)/n2b_d.o $(OUT)/n2b_ds.o # we don't use $(AR) and $(RANLIB) below since we want the _native_ tools # not the cross-compiler tools libucl$(RBARCH).a: $(OUT) $(OBJS) - $(SILENT)ar ruv $@ $(OBJS) >/dev/null 2>&1 - $(SILENT)ranlib $@ + $(SILENT)ar ruv $(TARGET_DIR)$@ $(OBJS) >/dev/null 2>&1 + $(SILENT)ranlib $(TARGET_DIR)$@ $(OUT)/%.o: %.c @echo CC $< @@ -40,22 +41,22 @@ $(OUT)/%.o: %.c # some trickery to build ppc and i386 from a single call ifeq ($(RBARCH),) libucli386.a: - make RBARCH=i386 libucli386.a + make RBARCH=i386 TARGET_DIR=$(TARGET_DIR) libucli386.a libuclppc.a: - make RBARCH=ppc libuclppc.a + make RBARCH=ppc TARGET_DIR=$(TARGET_DIR) libuclppc.a endif libucl-universal: libucli386.a libuclppc.a - @echo lipo libucl.a - $(SILENT) rm -f libucl.a - lipo -create libuclppc.a libucli386.a -output libucl.a + @echo lipo $(TARGET_DIR)libucl.a + $(SILENT) rm -f $(TARGET_DIR)libucl.a + lipo -create $(TARGET_DIR)libuclppc.a $(TARGET_DIR)libucli386.a -output $(TARGET_DIR)libucl.a clean: - rm -f libucl*.a + rm -f $(TARGET_DIR)libucl*.a rm -rf build* -build$(RBARCH): - @echo MKDIR build$(RBARCH) - $(SILENT)mkdir build$(RBARCH) +$(OUT): + @echo MKDIR $(OUT) + $(SILENT)mkdir $(OUT) |