From ef523debc94f5674179282363b5686650f0c860a Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Thu, 31 Jul 2003 21:55:21 +0000 Subject: If you make sure that you have 'uclpack' in your $PATH when you run make with this makefile, we'll produce a nice little UCL file in the build directory. This target does a run-time check for the presence of uclpack. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@3905 a1c6a512-1295-4272-9138-f99709370657 --- apps/Makefile | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/apps/Makefile b/apps/Makefile index b54c31cc4a..6c0efd575a 100644 --- a/apps/Makefile +++ b/apps/Makefile @@ -20,7 +20,9 @@ DOCSDIR := ../docs INCLUDES= -I$(FIRMWARE)/include -I$(FIRMWARE)/export -I. -I$(OBJDIR) -CFLAGS = -O -W -Wall -m1 -nostdlib -ffreestanding -Wstrict-prototypes -fomit-frame-pointer -fschedule-insns $(INCLUDES) $(TARGET) $(DEFINES) -DAPPSVERSION=\"$(VERSION)\" $(EXTRA_DEFINES) -DMEM=${MEM} -DPLUGIN=1 +CFLAGS = -O -W -Wall -m1 -nostdlib -ffreestanding -Wstrict-prototypes \ +-fomit-frame-pointer -fschedule-insns $(INCLUDES) $(TARGET) $(DEFINES) \ +-DAPPSVERSION=\"$(VERSION)\" $(EXTRA_DEFINES) -DMEM=${MEM} -DPLUGIN=1 AFLAGS += -small -relax # Check if this is a kind of Recorder @@ -71,7 +73,7 @@ ifndef TOOLSDIR TOOLSDIR=../tools endif -all : $(OBJDIR)/$(OUTNAME) rocks +all : $(OBJDIR)/$(OUTNAME) $(OBJDIR)/rockbox.ucl rocks rocks: $(MAKE) -C plugins TARGET=$(TARGET) DEBUG=$(DEBUG) OBJDIR=$(OBJDIR) VERSION=$(VERSION) EXTRA_DEFINES="$(EXTRA_DEFINES)" MEM=${MEM} @@ -96,6 +98,15 @@ $(OBJDIR)/rockbox.asm: $(OBJDIR)/rockbox.bin $(OBJDIR)/$(OUTNAME) : $(OBJDIR)/rockbox.bin $(TOOLSDIR)/scramble $(SCRAMBLE_OPT) $(OBJDIR)/rockbox.bin $(OBJDIR)/$(OUTNAME) +$(OBJDIR)/rockbox.ucl: $(OBJDIR)/rockbox.bin + @a=`uclpack -h 2>/dev/null`; \ + if test -n "$$a"; then \ + echo "runs uclpack"; \ + uclpack --best --2e $(OBJDIR)/rockbox.bin $(OBJDIR)/rockbox.ucl >/dev/null 2>&1; \ + else \ + echo "no uclpack command found, not making any UCL file"; \ + fi + $(OBJDIR)/credits.raw: $(DOCSDIR)/CREDITS perl credits.pl < $< > $@ -- cgit v1.2.3