forked from auxten/gingko
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
49 lines (42 loc) · 1.57 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
.PHONY: all makelib compile rm_config clean move check
all: check_configure makelib compile #move rm_config
check_configure:
if [ ! -x ./src/configure ]; then ( cd ./src && ./autogen.sh ); fi
makelib:
cd lib && bash -x patch_build.sh && cd ..
compile:
#cd src && ./configure CXXFLAGS='-ggdb -D_GKO_VERSION=\"$(subst VERSION:,,$(VERSION_SCMPF))\"' --enable-debug -enable-unittest && make clean &&
cd src && ./configure CXXFLAGS='-ggdb ' --enable-debug && make clean && \
cd hash && make && cd .. && make -j 4 && cd ..
rm_config:
rm ./src/config.h
rm ./src/hash/config.h
rm -rf ./lib/libev/include
clean:
pwd
rm -rf output test
cd src && if [ -f Makefile ];then make clean; fi
#find ./../../../../../../.. -type f -name "event.h"
move:
if [ ! -d output ];then mkdir output;fi
cd output && if [ ! -d bin ];then mkdir bin; fi && \
if [ ! -d testbin ];then mkdir testbin; fi && \
if [ ! -d conf ];then mkdir conf; fi
cp ./src/gingko_serv ./output/bin/gkod
cp ./src/gingko_clnt ./output/bin/gkocp
cp ./src/serv_unittest ./output/testbin/
cp ./src/clnt_unittest ./output/testbin/
cp -r ./output/testbin ./test
cp ./bin/* ./output/bin/
cp ./conf/* ./output/conf/
#cp ./src/erase_job.py ./output/bin/
#cp ./src/run2.sh ./output/bin/gkod_ctl
cp deploy ./output/ && chmod +x ./output/deploy
cd output && md5sum deploy bin/* conf/* > md5sum
#cd output/bin && cp gkocp{,.new}
#cd output/bin && cp gkod{,.new}
#cd output/bin && cp gkod_ctl{,.new}
chmod +x ./output/bin/*
cd output && tar czvf gingko.tgz bin conf md5sum deploy
check:
cd test && ./clnt_unittest && ./serv_unittest