-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmakefile
98 lines (83 loc) · 2.6 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
.ONESHELL:
ROOT ?=
SYSTEM_CICADADIR ?= $(ROOT)/etc/cicada
PREFIX ?= /usr
BINDIR ?= $(PREFIX)/bin
CICADADIR ?= $(HOME)/.cicada
help:
@
echo -e " \e[33;1m \e[0m "
echo -e " \e[33;1m dependencies \e[0m "
echo -e " \e[33;1m fasm to compile \e[0m "
echo -e " \e[33;1m \e[0m "
echo -e " \e[33;1m \e[0m "
echo -e " \e[33;1m makefile functions \e[0m "
echo -e " \e[33;1m all \e[0m "
echo -e " \e[33;1m linux64 \e[0m "
echo -e " \e[33;1m windows64 \e[0m "
echo -e " \e[33;1m linux32 \e[0m "
echo -e " \e[33;1m windows32 \e[0m "
echo -e " \e[33;1m clean \e[0m "
echo -e " \e[33;1m \e[0m "
echo -e " \e[33;1m \e[0m "
echo -e " \e[33;1m please read the makefile for more informations \e[0m "
echo -e " \e[33;1m \e[0m "
echo -e " \e[33;1m I wish you happy making ^-^ \e[0m "
echo -e " \e[33;1m \e[0m "
all:
@
echo -e " " &&\
echo -e "\e[33;1m [linux64] \e[0m " &&\
make linux64 &&\
echo -e " " &&\
echo -e "\e[33;1m [windows64] \e[0m " &&\
make windows64 &&\
echo -e " " &&\
echo -e "\e[33;1m [linux32] \e[0m " &&\
make linux32 &&\
echo -e " " &&\
echo -e "\e[33;1m [windows32] \e[0m " &&\
make windows32 &&\
echo -e " "
copy-core-file--user:
install -D --mode=664 core.cn -t "$(CICADADIR)"
copy-core-file--system:
install -D --mode=664 core.cn -t "$(SYSTEM_CICADADIR)"
install:
install -D --mode=775 cn -t "$(BINDIR)"
install -D --mode=775 cn32 -t "$(BINDIR)"
linux64:
@
echo "define platform linux" > platform-configuration.inc
echo "define machine 64bit" >> platform-configuration.inc
fasm -m 256000 cicada-nymph.fasm cn
windows64:
@
echo "define platform windows" > platform-configuration.inc
echo "define machine 64bit" >> platform-configuration.inc
fasm -m 256000 cicada-nymph.fasm cn.exe
linux32:
@
echo "define platform linux" > platform-configuration.inc
echo "define machine 32bit" >> platform-configuration.inc
fasm -m 256000 cicada-nymph.fasm cn32
windows32:
@
echo "define platform windows" > platform-configuration.inc
echo "define machine 32bit" >> platform-configuration.inc
fasm -m 256000 cicada-nymph.fasm cn32.exe
clean*~:
@
rm -f *~ */*~ */*/*~ */*/*/*~ */*/*/*/*~ */*/*/*/*/*~
clean*.bin:
@
rm -f *.bin */*.bin */*/*.bin */*/*/*.bin */*/*/*/*.bin */*/*/*/*/*.bin
clean:
@
make clean*~
make clean*.bin
rm cn
rm cn32
rm cn.exe
rm cn32.exe
echo -e "\e[33;1m [ok] clean directory \e[0m"