-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathMakefile
47 lines (34 loc) · 1.18 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
.PHONY: clean AppDir
VERSION=0.3.3
BUILD=1
ARCH=$(shell uname -m)
AIA=./appimagetool-$(ARCH).AppImage
NATIVE_EXT=build/iris-lib/node_modules/serialport/build/Release/serialport.node
OUT=EaselDriver-$(VERSION)-$(BUILD)-$(ARCH).AppImage
$(OUT): build/AppRun build/easel.svg build/easel-driver.desktop build/node $(NATIVE_EXT)
-rm $@
$(AIA) build $@
AppDir: $(NATIVE_EXT) build/AppRun build/easel.svg build/easel-driver.desktop
build/AppRun: AppRun build
cp AppRun build/
chmod +x build/AppRun
build/easel.svg: easel.svg build
cp easel.svg build/
build/easel-driver.desktop: easel-driver.desktop build
cp easel-driver.desktop build/
$(NATIVE_EXT): build/iris-lib/iris.js build
(cd build/iris-lib && rm -rf node_modules && npm install && rm -rf node_modules/.bin node_modules/serialport/node_modules/.bin)
touch $(NATIVE_EXT)
build/node: build
cp $(shell which node) build/
build/iris-lib/iris.js: EaselDriver-$(VERSION).pkg build
rm -rf tempdir
mkdir tempdir
7z x -otempdir EaselDriver-$(VERSION).pkg
mkdir -p build/iris-lib
(cd build/iris-lib && gunzip <../../tempdir/IrisLib-$(VERSION).pkg/Payload | cpio -i)
rm -rf tempdir
build:
mkdir -p build
clean:
rm -rf tempdir build $(OUT)