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:
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user