pxt-ev3/libs/core/Makefile

33 lines
751 B
Makefile
Raw Normal View History

2017-06-29 17:35:57 +02:00
include Makefile.inc
2017-06-29 19:41:38 +02:00
COMMON_FLAGS = -W -Wall -Wno-unused-parameter -Ipxtapp -fwrapv -fno-threadsafe-statics
2017-06-29 17:35:57 +02:00
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++
EXE = bld/pxt-app.elf
DEPS = $(PXT_HEADERS) package.json Makefile Makefile.inc
all: $(EXE)
$(EXE): $(PXT_OBJS)
$(LD) -o $(EXE) $(LDFLAGS) $(PXT_OBJS)
clean:
rm -rf bld
bld/%.o: %.cpp $(DEPS)
@mkdir -p $(dir $@)
$(CC) $(CXXFLAGS) -c $< -o $@
bld/%.o: %.s $(DEPS)
@mkdir -p $(dir $@)
$(CC) $(CFLAGS) -c $< -o $@
bld/%.o: %.c $(DEPS)
@mkdir -p $(dir $@)
$(CC) $(CFLAGS) -c $< -o $@