diff options
author | Björn Stenberg <bjorn@haxx.se> | 2002-10-02 16:47:38 +0000 |
---|---|---|
committer | Björn Stenberg <bjorn@haxx.se> | 2002-10-02 16:47:38 +0000 |
commit | bde60b66d1e2ee5a5e735257bcf7e95e99e0a746 (patch) | |
tree | 1bba9476ba381522af9b68746d1dfbe53665c4f8 | |
parent | f9d3486246be7f80a012668acd218b7d78fb6aef (diff) |
Bill Napier's more elegant fix to disallow running make in apps and firmware.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@2480 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r-- | apps/Makefile | 17 | ||||
-rw-r--r-- | firmware/Makefile | 18 |
2 files changed, 25 insertions, 10 deletions
diff --git a/apps/Makefile b/apps/Makefile index ecac408a85..d140fd5583 100644 --- a/apps/Makefile +++ b/apps/Makefile @@ -19,10 +19,6 @@ FIRMWARE := ../firmware INCLUDES= -I$(FIRMWARE)/include -I$(FIRMWARE) -I$(FIRMWARE)/common -I$(FIRMWARE)/drivers -I$(FIRMWARE)/malloc -I. -I$(OBJDIR) -ifndef OBJDIR - "Don't run make in the apps dir!" -endif - CFLAGS = -O -W -Wall -m1 -nostdlib -ffreestanding -Wstrict-prototypes -fomit-frame-pointer -fschedule-insns $(INCLUDES) $(TARGET) $(DEFINES) -DAPPSVERSION=\"$(VERSION)\" $(EXTRA_DEFINES) AFLAGS += -small -relax @@ -52,6 +48,15 @@ endif OBJS := $(OBJDIR)/lang.o $(SRC:%.c=$(OBJDIR)/%.o) +ifndef OBJDIR +no_configure: + @echo "Don't run make here. Run the tools/configure script from your own build" + @echo "directory, then run make there." + @echo + @echo "More help on how to build rockbox can be found here:" + @echo "http://rockbox.haxx.se/docs/how_to_compile.html" +endif + all : $(OBJDIR)/$(OUTNAME) $(OBJDIR)/librockbox.a: @@ -109,4 +114,6 @@ $(OBJDIR)/$(DEPS)/%.d: %.c |sed '\''s|\($*\)\.o[ :]*|$(OBJDIR)/\1.o $(<:%.c=%.d) : |g'\'' > $@; \ [ -s $@ ] || rm -f $@' --include $(SRC:%.c=$(OBJDIR)/$(DEPS)/%.d) +ifdef OBJDIR + -include $(SRC:%.c=$(OBJDIR)/$(DEPS)/%.d) +endif diff --git a/firmware/Makefile b/firmware/Makefile index 98507d979c..73bb8e9819 100644 --- a/firmware/Makefile +++ b/firmware/Makefile @@ -15,10 +15,6 @@ OC = sh-elf-objcopy INCLUDES=-Iinclude -I. -Icommon -Idrivers -ifndef OBJDIR - "Don't run make in the firmware dir!" -endif - TOOLSDIR = ../tools CFLAGS = -W -Wall -O -m1 -nostdlib -ffreestanding -Wstrict-prototypes $(INCLUDES) $(TARGET) $(EXTRA_DEFINES) @@ -43,6 +39,15 @@ ifeq (RECORDER,$(findstring RECORDER, $(CFLAGS))) OBJS += $(OBJDIR)/sysfont.o endif +ifndef OBJDIR +no_configure: + @echo "Don't run make here. Run the tools/configure script from your own build" + @echo "directory, then run make there." + @echo + @echo "More help on how to build rockbox can be found here:" + @echo "http://rockbox.haxx.se/docs/how_to_compile.html" +endif + all: $(OUTPUT) $(EXTRA_TARGETS) $(OUTPUT): $(OBJS) @@ -78,4 +83,7 @@ $(OBJDIR)/$(DEPS)/%.d: %.c |sed '\''s|\($*\)\.o[ :]*|$(OBJDIR)/\1.o $(<:%.c=%.d) : |g'\'' > $@; \ [ -s $@ ] || rm -f $@' --include $(SRC:%.c=$(OBJDIR)/$(DEPS)/%.d) +ifdef OBJDIR + -include $(SRC:%.c=$(OBJDIR)/$(DEPS)/%.d) +endif + |