-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy pathMakefile
66 lines (55 loc) · 2.04 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
# Borrowed from:
# https://github.com/silven/go-example/blob/master/Makefile
# https://vic.demuzere.be/articles/golang-makefile-crosscompile/
BINARY = got-qt
# Symlink into GOPATH
GITHUB_USERNAME=amlwwalker
GOT_QT_PROJECTS=got-qt-projects
CONSOLE_DIR=cuiinterface
GUI_DIR=qt
DEV_SOURCE=${GOPATH}/src/github.com
# BUILD_DIR=${DEV_SOURCE}/${GOT_QT_PROJECTS}/${BINARY}
CURRENT_DIR=$(shell pwd)
#install parameters
[email protected]:amlwwalker/got-qt.git
# Build the project
all: clean console darwin #linux windows
hardinstall: setup install
setup:
#install everything including qt
brew install qt5
#configure the setup for this
install:
#first go to build dir
cd ${DEV_SOURCE}; \ #now make a directory to store the got-qt
mkdir ${GITHUB_USERNAME}; \ #now clone got-qt into there
git clone ${GOT_QT_REPO} ${GITHUB_USERNAME}/ \
mkdir 0xAX; \ #you will need notifier for notifications
git clone [email protected]:0xAX/notificator.git 0xAX; \
go get -u github.com/gobuffalo/packr/...; \ #you will need packr for configuration files
go get github.com/radovskyb/watcher; \ #you will need watcher by radovskyb for hotloading
go get -u -v github.com/therecipe/qt/cmd/...; \ #now make sure the user has therecipe/qt installed
$GOPATH/bin/qtsetup;
#var topLevel = filepath.Join(os.Getenv("GOPATH"), "src", "github.com", "amlwwalker", "got-qt", "qt", "qml")
createproject: #pass this PROJECTNAME, e.g: make createproject PROJECTNAME=testproject
#create the directory in github.com
cd ${DEV_SOURCE}; \
mkdir -p ${GOT_QT_PROJECTS}/${PROJECTNAME}; \
cd ${GOT_QT_PROJECTS}/${PROJECTNAME}; \
rsync -av --exclude=".git" ${DEV_SOURCE}/${GITHUB_USERNAME}/got-qt/* . ; \
sed -i.bak s/"got-qt"/"${PROJECTNAME}"/g qt/main.go; \
sed -i.bak s/"amlwwalker"/"${GOT_QT_PROJECTS}"/g qt/main.go;
console:
cd ${CONSOLE_DIR}; \
go build -o consoleApp; \
cd - >/dev/null
build:
cd ${GUI_DIR}; \
qtdeploy build desktop; \
cd - >/dev/null
darwinhotload:
cd ${GUI_DIR}; \
deploy/darwin/${GUI_DIR}.app/Contents/MacOS/${GUI_DIR}
lxhotload:
cd ${GUI_DIR}; \
deploy/linux/${GUI_DIR}.sh