File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 3030 OFF=
3131fi
3232
33+ check_cmd ()
34+ {
35+ if which $1 > /dev/null 2>&1
36+ then
37+ return
38+ fi
39+ echo -e " ${RED} error${OFF} : building E9Tool/E9Patch requires \" ${YELLOW} $1 ${OFF} \" " >&2
40+ echo -e " (hint: try installing \" ${YELLOW} $1 ${OFF} \" with \" ${YELLOW} sudo apt install $2 ${OFF} \" )" >&2
41+ exit 1
42+ }
43+
44+ check_hdr ()
45+ {
46+ if echo " #include <$1 >" | gcc -E - > /dev/null 2>&1
47+ then
48+ return
49+ fi
50+ echo -e " ${RED} error${OFF} : building E9Tool/E9Patch requires \" ${YELLOW} $1 ${OFF} \" " >&2
51+ echo -e " (hint: try installing \" ${YELLOW} $1 ${OFF} \" with \" ${YELLOW} sudo apt install $2 ${OFF} \" " >&2
52+ exit 1
53+ }
54+
55+ check_cmd gcc build-essential
56+ check_cmd g++ build-essential
57+ check_cmd make build-essential
58+ check_cmd ar build-essential
59+ check_cmd ld build-essential
60+ check_cmd strip build-essential
61+ check_cmd xxd xxd
62+ check_hdr zlib.h zlib1g-dev
63+
3364echo -e " ${GREEN} $0 ${OFF} : building e9patch and e9tool..."
3465make clean
3566make -j$( nproc) release
You can’t perform that action at this time.
0 commit comments