-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathMakefile
51 lines (40 loc) · 1.1 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
TARGET := $(shell git log -1 --pretty=%H).dd
ARCH := armhf
CACHER_PORT := 3142
OPTS := -x
FS_DIR := armhf-fs
IMAGE_SIZE := 6000
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
debug: ARCH := amd64
debug: OPTS += -k
debug: FS_DIR := amd64-fs
debug: MKIMG_OPTS := -x -z
debug: TARGET := ${TARGET}-${ARCH}
debug: ${TARGET}
release: TARGET := ${TARGET}-${ARCH}
release: OPTS += -k
release: ${TARGET}
${FS_DIR}:
./bootstrap.sh -c src/setup/template-firstboot.cnf -a ${ARCH} ${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 -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