Build fixes
This commit is contained in:
parent
73ec883696
commit
33b9bba2a9
@ -1,11 +1,13 @@
|
||||
include Makefile.inc
|
||||
|
||||
COMMON_FLAGS = -W -Wall -Wno-unused-parameter -Ipxtapp -fwrapv -fno-threadsafe-statics
|
||||
COMMON_FLAGS = -W -Wall -Wno-unused-parameter -Ipxtapp -fwrapv -fno-threadsafe-statics -Os
|
||||
CFLAGS = $(COMMON_FLAGS) -std=c99
|
||||
CXXFLAGS = $(COMMON_FLAGS) -std=c++11 -fno-rtti -fno-exceptions -fno-unwind-tables
|
||||
LDFLAGS = -Wl,--gc-sections -Wl,--sort-common -Wl,--sort-section=alignment
|
||||
CC = arm-linux-gnueabi-gcc
|
||||
LD = arm-linux-gnueabi-g++
|
||||
PREF = arm-linux-gnueabi-
|
||||
CC = $(PREF)gcc
|
||||
LD = $(PREF)gcc
|
||||
LIBSTDCPP = /usr/lib/gcc/arm-linux-gnueabi/4.9/libstdc++.a
|
||||
|
||||
EXE = bld/pxt-app.elf
|
||||
|
||||
@ -14,7 +16,10 @@ DEPS = $(PXT_HEADERS) package.json Makefile Makefile.inc
|
||||
all: $(EXE)
|
||||
|
||||
$(EXE): $(PXT_OBJS)
|
||||
$(LD) -o $(EXE) $(LDFLAGS) $(PXT_OBJS)
|
||||
$(LD) -o $(EXE) $(LDFLAGS) -Wl,-Map,$(EXE:.elf=.map) $(PXT_OBJS) $(LIBSTDCPP) -lm
|
||||
cp $(EXE) $(EXE:.elf=.full)
|
||||
$(PREF)strip $(EXE)
|
||||
@ls -l $(EXE)
|
||||
|
||||
clean:
|
||||
rm -rf bld
|
||||
|
Loading…
Reference in New Issue
Block a user