This repository has been archived by the owner on Nov 13, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 248
/
Makefile
114 lines (99 loc) · 3.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
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
112
113
114
$(eval version=$(shell grep "define VE_VERSION" include/config/confver.hpp | sed 's|.*VERSION "\(.*\)"|\1|g'))
REL=Rapidvms-$(version)-$(VE_OS)-$(VE_VER)-$(VE_ARCH)bit
ifeq ($(strip $(VE_CROSS_COMPILER)), )
subdirs=3rdparty xcmnlib velib veuilib vecvr client
appsubdirs=xcmnlib velib veuilib vecvr client
else
#embeded device only has the server
subdirs=3rdparty xcmnlib velib veuilib vecvr
appsubdirs=xcmnlib velib veuilib vecvr
endif
all: prepare
for d in $(subdirs); do (cd $$d; (if test -e "Makefile"; then $(MAKE) $(MFLAGS); fi;) ); done
app: prepare
for d in $(appsubdirs); do (cd $$d; (if test -e "Makefile"; then $(MAKE) $(MFLAGS); fi;) ); done
prepare:
mkdir -p ./output/$(VE_INSTALL_DIR)/lib
ifneq ($(strip $(VE_OS)), macos)
chmod +x ./output/linux/*.sh
cp -r ./output/linux/*.sh ./output/$(VE_INSTALL_DIR)/
cp -r ./output/linux/service/ ./output/$(VE_INSTALL_DIR)/
cp -r ./output/linux/fonts/ ./output/$(VE_INSTALL_DIR)/lib/
else
chmod +x ./output/macos/*.sh
cp -r ./output/macos/* ./output/$(VE_INSTALL_DIR)/
endif
linkprocess:
ifneq ($(strip $(VE_OS)), macos)
else
chmod +x ./maclink.sh
./maclink.sh
endif
cleanapp:
for d in $(appsubdirs); do (cd $$d; (if test -e "Makefile"; then $(MAKE) clean; fi;) ); done
clean:
for d in $(subdirs); do (cd $$d; (if test -e "Makefile"; then $(MAKE) clean; fi;) ); done
#rm -rf ./linux/*.so ./linux/bin ./linux/lib/ ./linux/share ./linux/ssl ./linux/include
rm -rf ./output/host/
install:
for d in $(subdirs); do (cd $$d; (if test -e "Makefile"; then $(MAKE) install; fi;) ); done
distclean: clean
for d in $(subdirs); do (cd $$d; (if test -e "Makefile"; then $(MAKE) distclean; fi;) ); done
disttest:
cp ./output/$(VE_INSTALL_DIR)/lib/libve*.so .;
cp ./output/$(VE_INSTALL_DIR)/lib/libcmnlib.so .;
cp ./output/$(VE_INSTALL_DIR)/lib/libcover.so .;
rm -rf ./output/$(VE_INSTALL_DIR)/;
mkdir -p ./output/$(VE_INSTALL_DIR)/lib/;
mv ./libve* libcmnlib.so libcover.so ./output/$(VE_INSTALL_DIR)/lib/
strip ./output/$(VE_INSTALL_DIR)/lib/*.so
rel: linkprocess
echo $(REL)
rm -rf ./$(REL)
mkdir -p ./output/$(VE_INSTALL_DIR)/translations;
cp -rf client/src/main/translations/*.qm ./output/$(VE_INSTALL_DIR)/translations;
cp -rf veuilib/src/translations/*.qm ./output/$(VE_INSTALL_DIR)/translations;
ifneq ($(strip $(VE_OS)), macos)
cp -r ./output/linux/*.sh ./output/$(VE_INSTALL_DIR)/
cp -r ./output/linux/service/ ./output/$(VE_INSTALL_DIR)/
else
cp -r ./output/macos/* ./output/$(VE_INSTALL_DIR)/
endif
cp -rf ./output/$(VE_INSTALL_DIR) $(REL)
rm -rf ./$(REL)/lib/x86_64-linux-gnu
rm -rf ./$(REL)/examples
rm -rf ./$(REL)/doc
rm -rf ./$(REL)/lib64
rm -rf ./$(REL)/mkspecs
mv ./$(REL)/bin/openssl .
rm -rf ./$(REL)/bin/*
ifeq ($(strip $(VE_CROSS_COMPILER)), )
rm -rf ./RapidS*
else
rm -rf ./$(REL)/lib/libcover.so
rm -rf ./$(REL)/*Client*
endif
mv ./openssl ./$(REL)/bin/
rm -rf ./$(REL)/include
rm -rf ./$(REL)/share
rm -rf ./$(REL)/ssl
rm -rf ./$(REL)/.svn
rm -rf ./$(REL)/lib/*.a
rm -rf ./$(REL)/lib/pkgconfig
rm -rf ./$(REL)/lib/*.dbg
rm -rf ./$(REL)/lib/libSDL*
ifeq ($(strip $(VE_OS)), macos)
$(VE_CROSS_COMPILER)strip ./$(REL)/RapidClient.app/Contents/MacOS/Rapid*
$(VE_CROSS_COMPILER)strip ./$(REL)/RapidStor.app/Contents/MacOS/Rapid*
cp -r ./output/$(VE_INSTALL_DIR)/plugins/* ./$(REL)/RapidClient.app/Contents/MacOS/
cp -r ./output/$(VE_INSTALL_DIR)/plugins/* ./$(REL)/RapidStor.app/Contents/MacOS/
#$(VE_CROSS_COMPILER)strip ./$(REL)/lib/libveuilib.dylib
#$(VE_CROSS_COMPILER)strip ./$(REL)/lib/*ve*.so
#$(VE_CROSS_COMPILER)strip ./$(REL)/lib/*cmn*.so
else
$(VE_CROSS_COMPILER)strip ./$(REL)/Rapid*
$(VE_CROSS_COMPILER)strip ./$(REL)/lib/*.so*
endif
echo "Create zip file"
#zip -r $(REL).zip $(REL)
tar zcvf $(REL).tar.gz $(REL)