finished cleaning up BINARY/TARGET mess

This commit is contained in:
Michael Ossmann
2012-06-07 19:40:31 -06:00
parent 65b02cf6c9
commit 31db86b5d5

View File

@ -49,10 +49,10 @@ CFLAGS += -O2 -g3 -Wall -Wextra -I$(LIBOPENCM3)/include -I../common \
-fno-common -mcpu=cortex-m4 -mthumb -MD \
-mfloat-abi=hard -mfpu=fpv4-sp-d16 \
$(HACKRF_OPTS)
LDSCRIPT ?= $(TARGET).ld
#LDSCRIPT ?= $(BINARY).ld
LDFLAGS += -L$(TOOLCHAIN_DIR)/lib/armv7e-m/fpu \
-L$(LIBOPENCM3)/lib/lpc43xx -T$(LDSCRIPT) -nostartfiles \
-Wl,--gc-sections -Xlinker -Map=$(TARGET).map
-Wl,--gc-sections -Xlinker -Map=$(BINARY).map
OBJ = $(SRC:.c=.o)
# Be silent per default, but 'make V=1' will show all compiler calls.
@ -69,8 +69,8 @@ endif
all: images
images: $(TARGET).images
flash: $(TARGET).flash
images: $(BINARY).images
flash: $(BINARY).flash
%.images: %.bin %.hex %.srec %.list
@#echo "*** $* images generated ***"
@ -91,7 +91,7 @@ flash: $(TARGET).flash
@#printf " OBJDUMP $(*).list\n"
$(Q)$(OBJDUMP) -S $(*).elf > $(*).list
%.elf: $(OBJ) $(LDSCRIPT) #$(LIBOPENCM3)/lib/lpc43xx/libopencm3_lpc43xx.a
%.elf: $(OBJ) $(LDSCRIPT)
@#printf " LD $(subst $(shell pwd)/,,$(@))\n"
$(Q)$(LD) $(LDFLAGS) -o $(*).elf $(OBJ) -lopencm3_lpc43xx