X-Git-Url: http://mj.ucw.cz/gitweb/?a=blobdiff_plain;f=bsb%2Fdaemon%2FMakefile;h=b602b510a56eabb740e48371564f41c6bafc66d8;hb=429ff41d8aa2f4836ca9ea269e5e633dceb23484;hp=1e97498cae88e04cb74d2ee99c62cf317c2c11eb;hpb=9f654a4e81306616ee318ebfcdd2082fa6eab27b;p=home-hw.git diff --git a/bsb/daemon/Makefile b/bsb/daemon/Makefile index 1e97498..b602b51 100644 --- a/bsb/daemon/Makefile +++ b/bsb/daemon/Makefile @@ -1,4 +1,24 @@ +BUILD_FOR_TURRIS=1 + +ifdef BUILD_FOR_TURRIS + +TOPDIR=/root/turris + +include $(TOPDIR)/rules.mk +include $(TOPDIR)/include/package.mk + +PC := PATH=$(STAGING_DIR_HOST)/bin:$(PATH) PKG_CONFIG_PATH=$(PKG_CONFIG_PATH) PKG_CONFIG_LIBDIR=$(PKG_CONFIG_PATH) STAGING_PREFIX=$(STAGING_DIR)/usr $(PKG_CONFIG) + +export PATH=$(TARGET_PATH_PKG) +CC=$(TARGET_CC_NOCACHE) +LD=$(TARGET_LD_NOCACHE) + +else + PC := PKG_CONFIG_PATH=/home/mj/tmp/bsb/root/lib/pkgconfig pkg-config + +endif + USB_CFLAGS := $(shell $(PC) --cflags libusb-1.0) USB_LDFLAGS := $(shell $(PC) --libs libusb-1.0) UCW_CFLAGS := $(shell $(PC) --cflags libucw) @@ -7,9 +27,10 @@ UCW_LDFLAGS := $(shell $(PC) --libs libucw) CFLAGS=$(USB_CFLAGS) $(UCW_CFLAGS) -std=gnu1x -O2 -Wall -Wextra -Wno-parentheses LDFLAGS=$(USB_LDFLAGS) $(UCW_LDFLAGS) -lmosquitto -all: burrow-bsb +all: burrow-bsbd bsb-monitor -burrow-usb: burrow-usb.c ../firmware/interface.h +# burrow-bsbd: burrow-bsbd.c ../firmware/interface.h +# bsb-monitor: bsb-monitor.c ../firmware/interface.h -clean: - rm -f burrow-bsb +upload: + rsync -av burrow-bsbd bsb-monitor micac:/root/burrow/