diff options
Diffstat (limited to 'CAN-binder')
-rwxr-xr-x[-rw-r--r--] | CAN-binder/AGLBuild.mk (renamed from CAN-binder/Makefile) | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/CAN-binder/Makefile b/CAN-binder/AGLBuild.mk index 658ef32..1adb0e4 100644..100755 --- a/CAN-binder/Makefile +++ b/CAN-binder/AGLBuild.mk @@ -1,3 +1,4 @@ +#!/usr/bin/make -f # Copyright (C) 2015, 2016 "IoT.bzh" # Author "Romain Forlot" <romain.forlot@iot.bzh> # @@ -14,10 +15,15 @@ # limitations under the License. BUILD_DIR := build +PACKAGING_DIR := packaging/wgt +PACKAGING_FILE := $(PACKAGING_DIR)/package.in +PKG_FILELIST := $(shell cat $(PACKAGING_FILE)) -.PHONY: all clean mrproper ${BUILD_DIR}/Makefile +VPATH = etc:$(PACKAGING_DIR):$(PACKAGING_DIR)/etc:$(BUILD_DIR) -all: build package +.PHONY: all clean mrproper package + +all: build clean: @([ -d ${BUILD_DIR} ] && make -C ${BUILD_DIR} clean) || echo Nothing to clean @@ -28,9 +34,10 @@ mrproper: build: ${BUILD_DIR}/Makefile cmake --build ${BUILD_DIR} --clean-first - -package: - cmake --build ${BUILD_DIR} --target widget +package: config.xml icon.png | $(PKG_FILELIST) + mkdir -p ${BUILD_DIR}/$@/{bin,etc,lib,htdocs,data} + cp -r $(filter %.so, $|) ${BUILD_DIR}/$@/lib + cp -r $(filter %.cfg %.conf %.cnf %.ini, $|) ${BUILD_DIR}/$@/etc ${BUILD_DIR}/Makefile: @[ -d ${BUILD_DIR} ] || mkdir -p ${BUILD_DIR} |