summaryrefslogtreecommitdiffstats
path: root/rbutil/mkamsboot
diff options
context:
space:
mode:
authorBjörn Stenberg <bjorn@haxx.se>2010-02-19 08:09:41 +0000
committerBjörn Stenberg <bjorn@haxx.se>2010-02-19 08:09:41 +0000
commitb4f6c6ffbab9b808fa582244d2817be4004949a6 (patch)
treeaf4aec9b5cbee12e5b7487766127ff03d6ff2184 /rbutil/mkamsboot
parent320eab69d3cfb692fd5dc30e875fc72e9131e843 (diff)
downloadrockbox-b4f6c6ffbab9b808fa582244d2817be4004949a6.tar.gz
rockbox-b4f6c6ffbab9b808fa582244d2817be4004949a6.tar.bz2
rockbox-b4f6c6ffbab9b808fa582244d2817be4004949a6.zip
Tweaked dependencies a bit
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24770 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'rbutil/mkamsboot')
-rw-r--r--rbutil/mkamsboot/Makefile24
1 files changed, 10 insertions, 14 deletions
diff --git a/rbutil/mkamsboot/Makefile b/rbutil/mkamsboot/Makefile
index eca330a6c0..7d794bde46 100644
--- a/rbutil/mkamsboot/Makefile
+++ b/rbutil/mkamsboot/Makefile
@@ -28,9 +28,9 @@ endif
ifdef RBARCH
CFLAGS += -arch $(RBARCH)
+OBJDIR = $(RBARCH)/
endif
-OUT = $(TARGET_DIR)build$(RBARCH)
all: $(OUTPUT)
@@ -43,12 +43,13 @@ $(LIBUCL):
# inputs
LIBSOURCES := dualboot.c md5.c mkamsboot.c
SOURCES := $(LIBSOURCES) main.c
-OBJS := $(patsubst %.c,%.o,$(addprefix $(OUT)/,$(SOURCES)))
-LIBOBJS := $(patsubst %.c,%.o,$(addprefix $(OUT)/,$(LIBSOURCES)))
+OBJS := $(patsubst %.c,%.o,$(addprefix $(OBJDIR),$(SOURCES)))
+LIBOBJS := $(patsubst %.c,%.o,$(addprefix $(OBJDIR),$(LIBSOURCES)))
EXTRADEPS := $(LIBUCL)
-$(OUT)/%.o: %.c $(OUT)
+$(OBJDIR)%.o: %.c
@echo CC $< $
+ $(SILENT)mkdir -p $(dir $@)
$(SILENT)$(CC) $(CFLAGS) -c -o $@ $<
libmkamsboot$(RBARCH).a: $(LIBOBJS)
@@ -68,22 +69,22 @@ $(TARGET_DIR)libmkamsbooti386.a:
$(TARGET_DIR)libmkamsbootppc.a:
make RBARCH=ppc TARGET_DIR=$(TARGET_DIR) libmkamsbootppc.a
endif
-
+
libmkamsboot-universal: $(TARGET_DIR)libmkamsbooti386.a $(TARGET_DIR)libmkamsbootppc.a
@echo lipo $(TARGET_DIR)libmkamsboot.a
$(SILENT) rm -f $(TARGET_DIR)libmkamsboot.a
$(SILENT)lipo -create $(TARGET_DIR)libmkamsbootppc.a $(TARGET_DIR)libmkamsbooti386.a -output $(TARGET_DIR)libmkamsboot.a
-
+
clean:
- rm -f $(OUTPUT) libmkamsboot.o $(TARGET_DIR)libmkamsboot*.a mkamsboot.dmg
- rm -rf build* mkamsboot-*
+ rm -f $(OBJS) $(OUTPUT) libmkamsboot.o $(TARGET_DIR)libmkamsboot*.a mkamsboot.dmg
+ rm -rf mkamsboot-* i386 ppc $(OBJDIR)
mkamsboot-i386:
$(MAKE) RBARCH=i386
mv mkamsboot mkamsboot-i386
mkamsboot-ppc:
- make RBARCH=ppc
+ $(MAKE) RBARCH=ppc
mv mkamsboot mkamsboot-ppc
mkamsboot-mac: mkamsboot-i386 mkamsboot-ppc
@@ -93,8 +94,3 @@ mkamsboot.dmg: mkamsboot-mac
mkdir -p mkamsboot-dmg
cp -p mkamsboot-mac mkamsboot-dmg
hdiutil create -srcfolder mkamsboot-dmg mkamsboot.dmg
-
-$(OUT):
- @echo MKDIR $(OUT)
- $(SILENT)mkdir $(OUT)
-