diff --git a/libs/core/Makefile b/libs/core/Makefile new file mode 100644 index 00000000..624c70a2 --- /dev/null +++ b/libs/core/Makefile @@ -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 $@ diff --git a/libs/core/pxt.json b/libs/core/pxt.json index 7cd2c55d..b6dca717 100644 --- a/libs/core/pxt.json +++ b/libs/core/pxt.json @@ -3,6 +3,7 @@ "description": "The core library", "files": [ "README.md", + "Makefile", "pxt.h", "pxtcore.h", "ns.ts" diff --git a/pxtarget.json b/pxtarget.json index 02de03b7..d6b465bf 100644 --- a/pxtarget.json +++ b/pxtarget.json @@ -51,6 +51,7 @@ }, "compileService": { "buildEngine": "dockermake", + "dockerImage": "pext/ev3", "serviceId": "ev3" }, "appTheme": { @@ -133,4 +134,4 @@ "arrays": "#8A1C7C" } } -} \ No newline at end of file +}