From 38003ce02f2492d1f4e24ec03167db0725cd69ce Mon Sep 17 00:00:00 2001 From: root Date: Sun, 2 Nov 2014 10:57:51 +0000 Subject: fish --- Makefile.rules | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) (limited to 'Makefile.rules') diff --git a/Makefile.rules b/Makefile.rules index 5d9d998..685caad 100644 --- a/Makefile.rules +++ b/Makefile.rules @@ -1,4 +1,4 @@ -## +# ## This file is part of the libopencm3 project. ## ## Copyright (C) 2009 Uwe Hermann @@ -49,7 +49,7 @@ STYLECHECKFILES := $(shell find . -name '*.[ch]') LDSCRIPT ?= $(BINARY).ld -OBJS += $(BINARY).o +#OBJS += $(BINARY).o ifeq ($(strip $(OPENCM3_DIR)),) @@ -79,7 +79,7 @@ SCRIPT_DIR = $(OPENCM3_DIR)/scripts # C flags CFLAGS += -Os -g -CFLAGS += -Wextra -Wshadow -Wimplicit-function-declaration +CFLAGS += -Wextra -Wimplicit-function-declaration CFLAGS += -Wredundant-decls -Wmissing-prototypes -Wstrict-prototypes CFLAGS += -fno-common -ffunction-sections -fdata-sections @@ -95,7 +95,11 @@ CXXFLAGS += -fno-common -ffunction-sections -fdata-sections CPPFLAGS += -MD CPPFLAGS += -Wall -Wundef -CPPFLAGS += -I$(INCLUDE_DIR) $(DEFS) + +INCLUDES = -I$(INCLUDE_DIR) +DEFINES = $(DEFS) + +CPPFLAGS += $(INCLUDES) $(DEFINES) ############################################################################### # Linker flags @@ -153,6 +157,10 @@ flash: $(BINARY).flash @#printf " OBJDUMP $(*).list\n" $(Q)$(OBJDUMP) -S $(*).elf > $(*).list +fish: + echo %.elf %.map: $(OBJS) $(LDSCRIPT) $(LIB_DIR)/lib$(LIBNAME).a + echo $(BINARY).elf + %.elf %.map: $(OBJS) $(LDSCRIPT) $(LIB_DIR)/lib$(LIBNAME).a @#printf " LD $(*).elf\n" $(Q)$(LD) $(LDFLAGS) $(ARCH_FLAGS) $(OBJS) $(LDLIBS) -o $(*).elf -- cgit v1.2.3