diff --git a/apps/Makefile b/apps/Makefile index 88fd32bafd..ecac408a85 100644 --- a/apps/Makefile +++ b/apps/Makefile @@ -19,8 +19,9 @@ FIRMWARE := ../firmware INCLUDES= -I$(FIRMWARE)/include -I$(FIRMWARE) -I$(FIRMWARE)/common -I$(FIRMWARE)/drivers -I$(FIRMWARE)/malloc -I. -I$(OBJDIR) -# store output files in this directory: -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 diff --git a/firmware/Makefile b/firmware/Makefile index 6a9aca303d..98507d979c 100644 --- a/firmware/Makefile +++ b/firmware/Makefile @@ -15,8 +15,10 @@ OC = sh-elf-objcopy INCLUDES=-Iinclude -I. -Icommon -Idrivers -# store output files in this directory: -OBJDIR = . +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)