forked from SrainApp/srain
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile.in
79 lines (63 loc) · 1.84 KB
/
Makefile.in
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
# Makefile
.PHONY: install run bt clean cleanobj todo install-bin install-po install-data \
bt gtk_dbg
# Export all variables
export
# Package meta message
PACKAGE = srain
PACKAGE_NAME = Srain
PACKAGE_BUILD = $(shell [ -d .git ] && \
git rev-parse --git-dir > /dev/null 2>&1 && \
echo -n -git@0.`git rev-list --count HEAD`.`git describe --always`)
PACKAGE_VERSION = 0.05
PACKAGE_AUTHOR = Shengyu Zhang
PACKAGE_EMAIL = silverrainz@outlook.com
PACKAGE_DESC = Modern, beautiful IRC client written in GTK+ 3.
PACKAGE_WEBSITE = https://github.com/SilverRainZ/srain
PACKAGE_COPYRIGHT_DATES = 2016 - 2017
PACKAGE_DATA_DIR = $(PREFIX)
PACKAGE_CONFIG_DIR = $(CONFIG_DIR)
MAKE = make
DEL = rm -rf
INSTALL = install -v
DB = gdb
BUILD_DIR = $(PWD)/build
TARGET = $(BUILD_DIR)/srain.out
default: src/Makefile data/ui/Makefile
mkdir -p $(BUILD_DIR) | true
$(MAKE) -C data/ui
$(MAKE) -C src
install: install-bin install-data install-po
install-bin:
$(INSTALL) -Dm755 "$(TARGET)" "$(DESTDIR)$(PREFIX)/bin/srain"
install-data: data/Makefile
$(MAKE) -C data
install-po: po/Makefile
$(MAKE) -C po
run:
$(MAKE) -C data config
$(MAKE) PREFIX=$(BUILD_DIR)
$(MAKE) install-bin
$(MAKE) install-po
$(INSTALL) -Dm644 srainrc.example $(BUILD_DIR)/srain/srainrc
export XDG_CONFIG_DIRS=$(BUILD_DIR)/xdg:/etc/xdg; \
export XDG_CONFIG_HOME=$(BUILD_DIR); \
export XDG_DATA_DIRS=$(BUILD_DIR)/share:/usr/share; \
$(BUILD_DIR)/bin/srain
bt:
export XDG_CONFIG_DIRS=$(BUILD_DIR)/xdg:/etc/xdg; \
export XDG_CONFIG_HOME=$(BUILD_DIR); \
export XDG_DATA_DIRS=$(BUILD_DIR)/share:/usr/share; \
$(DB) $(BUILD_DIR)/bin/srain -ex 'r' -ex 'bt' -ex 'q'
gtk_dbg:
GTK_DEBUG=interactive \
GOBJECT_DEBUG=instance-countcd \
$(MAKE) run
clean:
$(DEL) $(BUILD_DIR)/*
cleanobj:
$(DEL) $(BUILD_DIR)/*.c
$(DEL) $(BUILD_DIR)/*.o
$(DEL) $(TARGET)
todo:
grep --color=auto -r -E "TODO|FIXME" src/