1
0
mirror of git://projects.qi-hardware.com/antorcha.git synced 2024-11-01 07:24:58 +02:00
antorcha/tools/Makefile
Werner Almesberger 28a3689672 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.
2012-06-29 15:30:08 -03:00

46 lines
1012 B
Makefile

#
# tools/Makefile - Build the Antorcha tool
#
# Written 2012 by Werner Almesberger
# Copyright 2012 Werner Almesberger
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
MAIN = antorcha
CFLAGS = -g -I../fw -I../../ben-wpan/tools/include \
-I../../ben-wpan/atusb/fw/include \
-Wall \
$(if $(NOGFX),, -DGFX $(shell sdl-config --cflags)) \
$(if $(BEN), -static)
LDLIBS = -L../../ben-wpan/tools/lib -latrf \
$(if $(NOGFX),, $(shell sdl-config --libs) -lSDL_gfx) \
$(if $(BEN),, -usb)
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)
update:
./antorcha -F ../fw/antorcha.bin
ping:
./antorcha -P
off:
./antorcha /dev/null