m.linux 780 Bytes
Newer Older
1
2
#!/bin/bash
#####################################
jcaceres's avatar
jcaceres committed
3
APP_NAME=jacktrip
jcaceres's avatar
jcaceres committed
4
APP_NAME_QUOTES=\"$APP_NAME\"
5
6
 
######################################
jcaceres's avatar
jcaceres committed
7
## Created by Juan-Pablo Caceres
8

jcacerec's avatar
jcacerec committed
9
10
QCMD=qmake-qt4

jcaceres's avatar
jcaceres committed
11
#Cleanup
12
13
rm $APP_NAME.pro
rm Makefile
jcaceres's avatar
jcaceres committed
14
echo "cleanup done"
15

jcaceres's avatar
jcaceres committed
16
#Create project (.pro) file
jcacerec's avatar
jcacerec committed
17
$QCMD -project -o $APP_NAME.pro
jcaceres's avatar
jcaceres committed
18
echo "qmake .pro built."
19
20

#Create Makefile
jcacerec's avatar
jcacerec committed
21
$QCMD -makefile -unix -o Makefile \
jcacerec's avatar
jcacerec committed
22
"CONFIG += qt release thread" \
jcaceres's avatar
jcaceres committed
23
"QMAKE_CXXFLAGS+=-g -O2" \
jcaceres's avatar
jcaceres committed
24
"QT -= gui" \
25
"QT += network" \
jcaceres's avatar
jcaceres committed
26
27
"unix:LIBS+=-Xlinker -rpath $QTDIR/lib -ljack -lm" \
"TARGET = $APP_NAME" \
28
"DEFINES += APP_NAME=${APP_NAME_QUOTES} __LINUX__" \
jcaceres's avatar
jcaceres committed
29
30
31
32
33
34
"DESTDIR = ./" \
"QMAKE_CLEAN += ./$APP_NAME" \
"target.path = /usr/bin" \
"INSTALLS += target" \
$APP_NAME.pro

jcaceres's avatar
jcaceres committed
35
echo "Makefile done"
jcaceres's avatar
jcaceres committed
36

jcaceres's avatar
jcaceres committed
37
make clean
38

jcaceres's avatar
jcaceres committed
39
echo "Cleanup done"
40

jcaceres's avatar
jcaceres committed
41
make