forked from screeninvader/ScreenInvader
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
54 lines (42 loc) · 1.17 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
48
49
50
51
52
53
TARGET := $(shell git log -1 --pretty=%H).dd
ARCH := armhf
CACHER_PORT := 3142
OPTS := -x
FS_DIR := armhf-fs
IMAGE_SIZE := 4000
MKIMG_OPTS := -u -z
.PHONY: all image release debug deploy clean test-release test-debug
all: release
screeninvader.dd.tmp:
./makeimage.sh -s ${IMAGE_SIZE} ${MKIMG_OPTS} screeninvader.dd.tmp
makedefaultconf:
cp src/setup/template-firstboot.cnf src/setup/answer.sh
debug: ARCH := amd64
debug: OPTS += -k
debug: FS_DIR := amd64-fs
debug: MKIMG_OPTS := -x -z
debug: TARGET := ${TARGET}-${ARCH}
debug: makedefaultconf ${TARGET}
release: TARGET := ${TARGET}-${ARCH}
release: ${TARGET}
${FS_DIR}:
./bootstrap.sh -a ${ARCH} -p ${CACHER_PORT} ${OPTS} ${FS_DIR}
${TARGET}: screeninvader.dd.tmp ${FS_DIR}
./mountimage.sh screeninvader.dd.tmp tmp
cp -a ${FS_DIR}/boot/* tmp/p1/
cp -a ${FS_DIR}/* tmp/p2/
./umountimage.sh screeninvader.dd.tmp tmp
mv screeninvader.dd.tmp ${TARGET}
tar -cjf ${TARGET}.tar.bz2 ${TARGET}
clean:
rm -f screeninvader.dd.tmp
rm -f *.dd-amd64
rm -f *.dd-armhf
rm -f *.dd-*.tar.bz2
rm -fr amd64-fs
rm -fr armhf-fs
rm -f src/setup/answer.sh
test-debug:
./test.sh amd64 ${TARGET}-amd64
test-release:
./test.sh armhf ${TARGET}-armhf