add option to build in a separate directory, for e.g. case where source files

are on ro filesystem.
This commit is contained in:
Eric House 2012-09-17 06:48:53 -07:00
parent 168b69112e
commit 4fa5c61e14
2 changed files with 6 additions and 4 deletions

View file

@ -16,11 +16,11 @@
# along with this program; if not, write to the Free Software # along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
COMMON_INCS = -I ./$(PLATFORM) -I../common -I../relay COMMON_INCS = -I ../common -I../relay
INCLUDES += $(COMMON_INCS) -I./ INCLUDES += $(COMMON_INCS) -I./
COMMONDIR ?= ../common COMMONDIR ?= ../common
COMMONOBJDIR = ../common/$(PLATFORM) COMMONOBJDIR = $(PLATFORM)/common
COMMONSRC = \ COMMONSRC = \
$(COMMONDIR)/board.c \ $(COMMONDIR)/board.c \

View file

@ -16,15 +16,17 @@
# along with this program; if not, write to the Free Software # along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
BUILD_DIR ?= .
ifeq ($(MEMDEBUG),TRUE) ifeq ($(MEMDEBUG),TRUE)
DEFINES = -DMEM_DEBUG -DDEBUG -DENABLE_LOGGING -DNUMBER_KEY_AS_INDEX DEFINES = -DMEM_DEBUG -DDEBUG -DENABLE_LOGGING -DNUMBER_KEY_AS_INDEX
DEFINES += -DCOMMS_CHECKSUM DEFINES += -DCOMMS_CHECKSUM
CFLAGS += -g $(GPROFFLAG) -Wall -Wunused-parameter -Wcast-align -Werror -O0 CFLAGS += -g $(GPROFFLAG) -Wall -Wunused-parameter -Wcast-align -Werror -O0
CFLAGS += -DDEBUG_TS -rdynamic CFLAGS += -DDEBUG_TS -rdynamic
PLATFORM = obj_linux_memdbg PLATFORM = $(BUILD_DIR)/obj_linux_memdbg
else else
DEFINES = DEFINES =
PLATFORM = obj_linux_rel PLATFORM = $(BUILD_DIR)/obj_linux_rel
# Not shipping this! Always build with symbols etc # Not shipping this! Always build with symbols etc
CFLAGS += -g $(GPROFFLAG) -Wall -Wunused-parameter -Wcast-align -Werror -O0 CFLAGS += -g $(GPROFFLAG) -Wall -Wunused-parameter -Wcast-align -Werror -O0
#CFLAGS += -Os -Werror -Wunused #CFLAGS += -Os -Werror -Wunused