aboutsummaryrefslogtreecommitdiffstats
path: root/CAN-binder
diff options
context:
space:
mode:
authorRomain Forlot <romain.forlot@iot.bzh>2017-04-28 18:05:36 +0200
committerRomain Forlot <romain.forlot@iot.bzh>2017-04-29 18:10:53 +0200
commitc50123c95c2a3c8b4c7996256a954e690909ed15 (patch)
tree921f5e6affe1c45142364257d877b75e400adbcd /CAN-binder
parent21416dcb8f65da3fc0323d1bdbf4b86eaef9561f (diff)
Rename as AGLBuild makefile.
Made as generic script. Change-Id: I7e73de7badfaade6fad29476275dd69aa523e6c9
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 658ef325..1adb0e48 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}