-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
47 lines (41 loc) · 1.06 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
BINARY := bookpi
VERSION ?= vlatest
all: help
.PHONY: help
help:
@echo
@echo "List of commands:"
@echo
@echo " make help - display this message"
@echo " make dist - create a tarball of all necessary files"
@echo " make build - build all projects"
@echo " make clean - remove all generated files"
@echo " make clean-dist - remove files for distribution"
.PHONY: dist
dist: build
mkdir -p bookpi
cp releases/* bookpi/
cp services/* bookpi/
cp install.sh bookpi/
cp bookpi.sh bookpi/
chmod +x bookpi/bookpi.sh bookpi/install.sh
tar caf bookpi.tar.gz bookpi/*
.PHONY: build
build:
mkdir -p releases
$(MAKE) -C display build
/bin/cp -f display/dist/main releases/$(BINARY)-$(VERSION)-display
$(MAKE) -C frontend build
/bin/cp -rf frontend/build server/build
$(MAKE) -C server build
mv server/server releases/$(BINARY)-$(VERSION)-server
.PHONY: clean
clean: clean-dist
$(MAKE) -C server clean
$(MAKE) -C frontend clean
$(MAKE) -C display clean
.PHONY: clean-dist
clean-dist:
rm -rf releases
rm -rf bookpi
rm -rf bookpi.tar.gz