1
0
mirror of git://projects.qi-hardware.com/antorcha.git synced 2025-04-21 12:27:27 +03:00

tools/: add cross-compilation for the Ben NanoNote

This uses the OpenWRT toolchain. It creates a static executable that will
also run on JLime. Graphical output is disabled so far.
This commit is contained in:
Werner Almesberger
2012-06-29 15:25:35 -03:00
parent 65fbf733c3
commit 28a3689672
2 changed files with 20 additions and 5 deletions

View File

@@ -16,16 +16,22 @@ MAIN = antorcha
CFLAGS = -g -I../fw -I../../ben-wpan/tools/include \
-I../../ben-wpan/atusb/fw/include \
-Wall \
$(shell sdl-config --cflags)
LDLIBS = -L../../ben-wpan/tools/lib -latrf -lusb \
$(shell sdl-config --libs) -lSDL_gfx
$(if $(NOGFX),, -DGFX $(shell sdl-config --cflags)) \
$(if $(BEN), -static)
OBJS = antorcha.o hash.o plot.o
LDLIBS = -L../../ben-wpan/tools/lib -latrf \
$(if $(NOGFX),, $(shell sdl-config --libs) -lSDL_gfx) \
$(if $(BEN),, -usb)
.PHONY: all update ping off
OBJS = antorcha.o hash.o $(if $(NOGFX),, plot.o)
.PHONY: all ben update ping off
all: $(MAIN)
ben:
$(MAKE) NOGFX=y BEN=y CC=mipsel-openwrt-linux-gcc
$(MAIN): $(OBJS)
$(CC) $(CFLAGS) -o $@ $(OBJS) $(LDLIBS)