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
This commit is contained in:
parent
f9d3486246
commit
bde60b66d1
2 changed files with 25 additions and 10 deletions
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in a new issue