/
makefile
111 lines (98 loc) · 2.08 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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
.ONESHELL:
ROOT ?=
SYSTEM_CICADADIR ?= $(ROOT)/etc/cicada
PREFIX ?= /usr
BINDIR ?= $(PREFIX)/bin
CICADADIR ?= $(HOME)/.cicada
help:
@
echo -e "\e[33;1m"
echo "* dependencies"
echo " * fasm"
echo " to compile source code"
echo "* makefile operations"
echo " * build"
echo " * build-linux64"
echo " * build-linux32"
echo " * tangle"
echo " * tangle-cicada-nymph.org"
echo " * tangle-core.org"
echo " * install"
echo " * uninstall"
echo " * test"
echo " * test32"
echo " * run"
echo " * run32"
echo " * clean"
echo "* I wish you happy making ^-^"
echo " please read the makefile for more informations"
echo -e "\e[0m"
build: build-linux64 build-linux32
build-linux64:
@
echo -e "\e[33;1m"
echo "* build-linux64"
echo -e "\e[0m"
echo "define platform linux" > platform-configuration.inc &&\
echo "define machine 64bit" >> platform-configuration.inc &&\
fasm -m 256000 cicada-nymph.fasm cn
build-linux32:
@
echo -e "\e[33;1m"
echo "* build-linux32"
echo -e "\e[0m"
echo "define platform linux" > platform-configuration.inc &&\
echo "define machine 32bit" >> platform-configuration.inc &&\
fasm -m 256000 cicada-nymph.fasm cn32
tangle: tangle-cicada-nymph.org tangle-core.org
tangle-cicada-nymph.org:
@
echo -e "\e[33;1m"
echo "* tangle-cicada-nymph.org"
echo -e "\e[0m"
./tangle.el
tangle-core.org:
@
cd core &&\
echo -e "\e[33;1m" &&\
echo "* tangle-core.org" &&\
echo -e "\e[0m" &&\
./tangle.el
install:
@
echo -e "\e[33;1m"
echo "* install"
echo -e "\e[0m"
install -D --mode=775 cn -t "$(BINDIR)"
install -D --mode=775 cn32 -t "$(BINDIR)"
uninstall:
@
echo -e "\e[33;1m"
echo "* uninstall"
echo -e "\e[0m"
rm $(BINDIR)/cn
rm $(BINDIR)/cn32
test:
@
./cn moi add core-test core/core-test.cn
./cn moi list
time ./cn load-with-test core-test
test32:
@
./cn32 moi add core-test core/core-test.cn
./cn32 moi list
time ./cn32 load-with-test core-test
run:
@
rlwrap ./cn
run32:
@
rlwrap ./cn32
clean:
@
echo -e "\e[33;1m"
echo "* clean"
echo -e "\e[0m"
rm -f *~ */*~ */*/*~ */*/*/*~ */*/*/*/*~ */*/*/*/*/*~
rm cn
rm cn32