-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathMakefile
79 lines (58 loc) · 1.69 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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
#
# Root Makefile
#
ifeq ($(shell tput colors), 8)
BUILD=scripts/build andromeda.build -t cores $(BUILD_FLAGS) --colours
else
BUILD=scripts/build andromeda.build -t cores $(BUILD_FLAGS)
endif
VERSION:=\"$(shell git describe --tags)\"
ifeq ($(COMPILER_FLAGS),)
CFLAGS:=--cflags "-D VERSION=$(VERSION)"
else
CFLAGS:=--cflags "-D VERSION=$(VERSION) $(COMPILER_FLAGS)"
endif
MAKE=make
.PHONY: all clean preconfigure configure distclean test doxygen
.PHONY: bin/andromeda.img allyes-config allno-config random-config
.PHONY: bin/andromeda.iso test_iso bin test_gdb test_iso_gdb scripts/build
all: bin/doxygen.tar.bz2 bin/andromeda.iso
bin: bin/andromeda.img
bin/andromeda.img: scripts/build
$(BUILD) $(CFLAGS) $(FLAGS)
clean: scripts/build
$(BUILD) -c $(FLAGS)
configure: scripts/build
$(BUILD) --configure --colours
allyes-config: scripts/build
$(BUILD) --configure --allyes-config
allno-config: scripts/build
$(BUILD) --configure --allno-config
random-config: scripts/build
$(BUILD) --configure --random-config
preconfigure: scripts/build
$(BUILD) --update-depfile
scripts/build:
scripts/get_build.sh
distclean: clean
rm -fv scripts/build*
rm -fv .config
rm -rfv bin/
rm -rfv doc/doxygen
test: bin/andromeda.img
scripts/qemu.sh $(DEBUG)
test_serial: bin/andromeda.img
scripts/qemu.sh -serial $(DEBUG)
test_gdb: bin/andromeda.img
scripts/qemu.sh -dbg $(DEBUG)
test_iso: bin/andromeda.iso
scripts/qemu.sh -cdrom $(DEBUG)
test_iso_gbd: bin/andromeda.iso
scripts/qemu.sh -dbg -cdrom $(DEBUG)
doxygen:
doxygen scripts/Doxyfile
bin/doxygen.tar.bz2: doxygen
if [ ! -d bin ] ; then mkdir bin; fi
tar -jcvf bin/doxygen.tar.bz2 doc/doxygen/*
bin/andromeda.iso: bin/andromeda.img
scripts/create_iso.sh