Setting up build

This commit is contained in:
Michal Moskal 2017-06-29 16:35:57 +01:00
parent 207e7a026c
commit 35eb61d5e5
3 changed files with 35 additions and 1 deletions

32
libs/core/Makefile Normal file
View File

@ -0,0 +1,32 @@
include Makefile.inc
COMMON_FLAGS = -W -Wall -Ipxtapp -fwrapv -fno-threadsafe-statics
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 $@

View File

@ -3,6 +3,7 @@
"description": "The core library", "description": "The core library",
"files": [ "files": [
"README.md", "README.md",
"Makefile",
"pxt.h", "pxt.h",
"pxtcore.h", "pxtcore.h",
"ns.ts" "ns.ts"

View File

@ -51,6 +51,7 @@
}, },
"compileService": { "compileService": {
"buildEngine": "dockermake", "buildEngine": "dockermake",
"dockerImage": "pext/ev3",
"serviceId": "ev3" "serviceId": "ev3"
}, },
"appTheme": { "appTheme": {
@ -133,4 +134,4 @@
"arrays": "#8A1C7C" "arrays": "#8A1C7C"
} }
} }
} }