-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
88 lines (74 loc) · 3.72 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
PLATS = linux freebsd
MODE ?= release
SUFFIX ?=
DAOMAKE_DIR = ./Dao/tools/daomake/bootstrap
DAOMAKE = $(DAOMAKE_DIR)/daomake
INSTALL = DaoStudio-0.5-Beta
INSTALL_BIN = $(INSTALL)/bin
WIN_INSTALL = $(INSTALL)
WIN_INSTALL_BIN = $(INSTALL)/bin
OPT_INSTALL = --option-INSTALL-PATH ../$(INSTALL)
OPT_INSTALL_MAC = --option-INSTALL-PATH ../DaoStudio.app/Contents/Frameworks
OPT_INSTALL_WIN = --option-INSTALL-PATH ../$(WIN_INSTALL)
QT_LIB_DIR = /usr/lib/i386-linux-gnu
all:
@echo "Please choose a platform!"
$(PLATS) :
cd $(DAOMAKE_DIR) && $(MAKE) -f Makefile $@ PLAT=$@
$(DAOMAKE) mkdir2 build
cd build && ../$(DAOMAKE) --mode $(MODE) --suffix .daomake --option-CODE-STATE ON --option-HELP-PATH ../Dao/modules/help --option-HELP-FONT "Courier Code" $(OPT_INSTALL) ../Dao
cd build && $(MAKE) -f Makefile.daomake
qmake -o Makefile.qmake DaoStudio.pro
$(MAKE) -f Makefile.qmake
linux-local:
cd $(DAOMAKE_DIR) && $(MAKE) -f Makefile linux PLAT=linux
$(DAOMAKE) mkdir2 build
cd build && ../$(DAOMAKE) --mode $(MODE) --platform linux --suffix .daomake --option-CODE-STATE ON --option-HELP-PATH ../Dao/modules/help --option-HELP-FONT "Courier Code" $(OPT_INSTALL) ../Dao
cd build && $(MAKE) -f Makefile.daomake
qmake -o Makefile.qmake DaoStudio.pro
$(MAKE) -f Makefile.qmake
cd build && $(MAKE) -f Makefile.daomake install
$(DAOMAKE) mkdir2 $(INSTALL)/langs
$(DAOMAKE) copy langs/daostudio_zh_cn.qm $(INSTALL)/langs/
$(DAOMAKE) copy DaoStudio $(INSTALL_BIN)
$(DAOMAKE) copy build/bin/dao $(INSTALL_BIN)
$(DAOMAKE) copy build/lib/libdao.so $(INSTALL_BIN)
$(DAOMAKE) copy build/lib/dao/modules/libdao_serializer.so $(INSTALL_BIN)
$(DAOMAKE) copy build/lib/dao/modules/libdao_debugger.so $(INSTALL_BIN)
$(DAOMAKE) copy build/lib/dao/modules/libdao_profiler.so $(INSTALL_BIN)
$(DAOMAKE) copy $(QT_LIB_DIR)/libQtCore.so $(INSTALL_BIN)
$(DAOMAKE) copy $(QT_LIB_DIR)/libQtGui.so $(INSTALL_BIN)
$(DAOMAKE) copy $(QT_LIB_DIR)/libQtNetwork.so $(INSTALL_BIN)
$(DAOMAKE) echo "LD_LIBRARY_PATH=$(INSTALL_BIN) $(INSTALL_BIN)/DaoStudio" | $(DAOMAKE) cat2 $(INSTALL)/DaoStudio
chmod +x $(INSTALL)/DaoStudio
macosx :
cd $(DAOMAKE_DIR) && $(MAKE) -f Makefile $@ PLAT=$@
$(DAOMAKE) mkdir2 build
cd build && ../$(DAOMAKE) --mode $(MODE) --suffix .daomake --option-CODE-STATE ON --option-HELP-PATH ../Dao/modules/help --option-HELP-FONT "Courier Code" $(OPT_INSTALL_MAC) ../Dao
cd build && $(MAKE) -f Makefile.daomake
qmake -spec macx-g++ -o Makefile.qmake DaoStudio.pro
$(MAKE) -f Makefile.qmake
cd build && $(MAKE) -f Makefile.daomake install
./update_bundle.sh
mingw :
cd $(DAOMAKE_DIR) && $(MAKE) -f Makefile $@ PLAT=$@
$(DAOMAKE) mkdir2 build
cd build && ../$(DAOMAKE) --mode $(MODE) --platform $@ --suffix .daomake --option-CODE-STATE ON --option-HELP-PATH ../Dao/modules/help --option-HELP-FONT "Courier Code" $(OPT_INSTALL_WIN) ../Dao
cd build && $(MAKE) -f Makefile.daomake
$(QT_DIR)/bin/qmake -o Makefile.qmake DaoStudio.pro
$(MAKE) -f Makefile.qmake
cd build && $(MAKE) -f Makefile.daomake install
$(DAOMAKE) mkdir2 $(WIN_INSTALL)/langs
$(DAOMAKE) copy langs/daostudio_zh_cn.qm $(WIN_INSTALL)/langs/
$(DAOMAKE) copy $(MODE)/DaoStudio.exe $(WIN_INSTALL_BIN)
$(DAOMAKE) copy build/bin/dao.exe $(WIN_INSTALL_BIN)
$(DAOMAKE) copy build/bin/dao.dll $(WIN_INSTALL_BIN)
$(DAOMAKE) copy build/lib/dao/modules/dao_serializer.dll $(WIN_INSTALL_BIN)
$(DAOMAKE) copy build/lib/dao/modules/dao_debugger.dll $(WIN_INSTALL_BIN)
$(DAOMAKE) copy build/lib/dao/modules/dao_profiler.dll $(WIN_INSTALL_BIN)
$(DAOMAKE) copy $(QT_DIR)/bin/QtCore4.dll $(WIN_INSTALL_BIN)
$(DAOMAKE) copy $(QT_DIR)/bin/QtGui4.dll $(WIN_INSTALL_BIN)
$(DAOMAKE) copy $(QT_DIR)/bin/QtNetwork4.dll $(WIN_INSTALL_BIN)
clean :
cd build && make -f Makefile.daomake clean
make -f Makefile.qmake clean