-
-
Notifications
You must be signed in to change notification settings - Fork 14
/
Makefile
81 lines (70 loc) · 1.71 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
SYSTEM =
ifeq (Cygwin,$(shell uname -o))
SYSTEM = Windows
else
ifeq (GNU/Linux,$(shell uname -o))
SYSTEM = Linux
QMAKE = qmake-qt5
ifeq (, $(shell which qmake-qt5 2>/dev/null))
QMAKE = qmake6
ifeq (, $(shell which qmake6 2>/dev/null))
ifeq (, $(shell which qmake 2>/dev/null))
$(error "No qmake in $(PATH)")
endif
QMAKE = qmake
endif
endif
else
$(error "Unknown system")
endif
endif
#OPTIONS = "DEFINES += NO_KDE_INTEGRATION"
.PHONY: clean \
systray-x-xpi \
systray-x-app
DATE := `date --utc +'%a %b %_d %H:%M:%S UTC %Y'`
BUILD_NUMBER := $(shell git rev-list --count HEAD)
GIT_HASH := $(shell git rev-parse HEAD)
GIT_BRANCH := $(shell git rev-parse --abbrev-ref HEAD)
GIT_VERSION_LONG := $(shell git describe --long)
GIT_VERSION := $(shell git describe --long | sed "s/-.*//")
all: systray-x-xpi systray-x-app
clean:
@echo "Deleting all XPI and app objects" ;\
rm -f *.xpi ;\
rm -f SysTray-X ;\
rm -rf app/build ;\
rm -rf app/build32 ;\
rm -rf app/build64 ;\
rm -rf app/build-* ;\
rm -rf app/dist* ;\
systray-x-xpi:
@echo "Creating systray-x@Ximi1970.xpi" ;\
rm -f systray-x@Ximi1970.xpi ;\
cd webext ;\
zip ../systray-x@Ximi1970.xpi -qr * ;\
cd ..
ifeq (Linux,$(SYSTEM))
systray-x-app:
@echo "Creating systray-x app" ;\
rm -f SysTray-X ;\
mkdir -p app/build ;\
cd app/build ;\
$(QMAKE) $(EXT_VERSION) $(OPTIONS) ../SysTray-X/SysTray-X.pro ;\
make ;\
cd ../.. ;\
cp app/build/SysTray-X-app/SysTray-X .
else
systray-x-app:
@echo "Creating systray-x app" ;\
rm -f SysTray-X ;\
mkdir -p app/build32 ;\
mkdir -p app/dist/win32 ;\
cd app/build32 ;\
../build.bat x86 5.15.2 ;\
cd ../.. ;\
mkdir -p app/build64 ;\
cd app/build64 ;\
../build.bat x86_64 5.15.2 ;\
cd ../..
endif