use proper linked ld and clean definitions

This commit is contained in:
King Kévin 2016-08-28 14:35:12 +02:00
parent 412095a244
commit c7905b43a2
1 changed files with 9 additions and 3 deletions

View File

@ -102,9 +102,15 @@ CFLAGS += -I $(OPENCM3_INC)
CFLAGS += $(DEFS)
# linker flags
LDFLAGS += -static -nostartfiles -nostdlib -nostdinc
LDFLAGS += -L$(OPENCM3_LIB)
LDFLAGS += -L. $(patsubst %,-L%,$(LIB))
# build static binary (no shared libraries on the micro-controller)
LDFLAGS += -static
# don's include the system start files
LDFLAGS += -nostartfiles
# don't use system libraries
LDFLAGS += -nostdlib -nostdinc
# opencm3 libraries
LDFLAGS += --library-path=$(OPENCM3_LIB)
#LDFLAGS += -L. $(patsubst %,-L%,$(LIB))
# add c,m,nosys system libraries
LDFLAGS += -L/usr/arm-none-eabi/lib/armv7-m/
# add gcc system library