-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile.am
121 lines (98 loc) · 3.86 KB
/
Makefile.am
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
# -*- Makefile -*-
GITVERSION = $(shell "$(top_srcdir)/version.sh" "$(top_srcdir)")
relnotes = doc/RELEASE_NOTES_3_0_1
bumblebeedconfdir=$(sysconfdir)/bumblebee
AM_CPPFLAGS = ${regular_CPPFLAGS} \
-DCONFIG_FILE='"$(bumblebeedconfdir)/bumblebee.conf"' \
-DCONF_XORG='"$(bumblebeedconfdir)/xorg.conf.DRIVER"'
AM_CFLAGS = ${regular_CFLAGS} \
${x11_CFLAGS} ${libbsd_CFLAGS} ${glib_CFLAGS} \
-Wextra -funsigned-char -DGITVERSION='"${GITVERSION}"'
noinst_SCRIPTS = scripts/systemd/bumblebeed.service \
scripts/upstart/bumblebeed.conf
if WITH_PIDFILE
noinst_SCRIPTS += scripts/sysvinit/bumblebeed
endif
bin_SCRIPTS = scripts/bumblebee-bugreport
CLEANFILES = $(noinst_SCRIPTS) conf/bumblebee.conf $(bin_SCRIPTS)
EXTRA_DIST = scripts/systemd/bumblebeed.service.in \
scripts/upstart/bumblebeed.conf.in \
conf/bumblebee.conf.in \
conf/xorg.conf.nvidia \
conf/xorg.conf.nouveau \
README.markdown \
scripts/bash_completion/bumblebee \
scripts/bumblebee-bugreport.in \
$(relnotes) \
version.sh
# for laziness include all headers found
EXTRA_DIST += src/*.h src/*/switching.h
if WITH_PIDFILE
EXTRA_DIST += scripts/sysvinit/bumblebeed.in
endif
sbin_PROGRAMS = bin/bumblebeed
bin_PROGRAMS = bin/optirun
bin_optirun_SOURCES = src/module.c src/bbconfig.c src/bblogger.c src/bbrun.c \
src/bbsocket.c src/driver.c src/optirun.c src/bbsocketclient.c
bin_optirun_LDADD = ${glib_LIBS} -lrt
bin_bumblebeed_SOURCES = src/bbconfig.c src/bblogger.c src/bbrun.c \
src/bbsocket.c src/module.c src/bbsecondary.c src/switch/switching.c \
src/switch/sw_bbswitch.c src/switch/sw_switcheroo.c \
src/driver.c src/bumblebeed.c
bin_bumblebeed_LDADD = ${x11_LIBS} ${libbsd_LIBS} ${glib_LIBS} -lrt
if FREEBSD
bin_bumblebeed_LDADD += -lutil
bin_bumblebeed_SOURCES += src/fbsd-pci.c
else
bin_bumblebeed_SOURCES += src/pci.c
endif
dist_doc_DATA = $(relnotes) README.markdown
bumblebeedconf_DATA = conf/bumblebee.conf conf/xorg.conf.nouveau conf/xorg.conf.nvidia
completiondir = $(sysconfdir)/bash_completion.d
completion_DATA = scripts/bash_completion/bumblebee
do_subst = sed -e 's|[@]GITVERSION[@]|$(GITVERSION)|g' \
-e 's|[@]CONF_XDISP[@]|$(CONF_XDISP)|g' \
-e 's|[@]CONF_SOCKPATH[@]|$(CONF_SOCKPATH)|g' \
-e 's|[@]CONF_GID[@]|$(CONF_GID)|g' \
-e 's|[@]CONF_PM_METHOD[@]|$(CONF_PM_METHOD)|g' \
-e 's|[@]CONF_KEEPONEXIT[@]|$(CONF_KEEPONEXIT)|g' \
-e 's|[@]CONF_FALLBACKSTART[@]|$(CONF_FALLBACKSTART)|g' \
-e 's|[@]CONF_VGLCOMPRESS[@]|$(CONF_VGLCOMPRESS)|g' \
-e 's|[@]CONF_DRIVER[@]|$(CONF_DRIVER)|g' \
-e 's|[@]CONF_TURNOFFATEXIT[@]|$(CONF_TURNOFFATEXIT)|g' \
-e 's|[@]BINDIR[@]|$(bindir)|g' \
-e 's|[@]SBINDIR[@]|$(sbindir)|g' \
-e 's|[@]BBCONFDIR[@]|$(bumblebeedconfdir)|g' \
-e 's|[@]CONF_XORG[@]|$(bumblebeedconfdir)/xorg.conf.DRIVER|g' \
-e 's|[@]CONF_DRIVER_MODULE_NVIDIA[@]|$(CONF_DRIVER_MODULE_NVIDIA)|g' \
-e 's|[@]CONF_LDPATH_NVIDIA[@]|$(CONF_LDPATH_NVIDIA)|g' \
-e 's|[@]CONF_MODPATH_NVIDIA[@]|$(CONF_MODPATH_NVIDIA)|g' \
-e 's|[@]CONF_PIDFILE[@]|$(CONF_PIDFILE)|g'
conf/bumblebee.conf: conf/bumblebee.conf.in
$(do_subst) < [email protected] > $@
scripts/systemd/bumblebeed.service: scripts/systemd/bumblebeed.service.in
$(do_subst) < [email protected] > $@
scripts/bumblebee-bugreport: scripts/bumblebee-bugreport.in
$(do_subst) < [email protected] > $@
if WITH_PIDFILE
scripts/sysvinit/bumblebeed: scripts/sysvinit/bumblebeed.in
$(do_subst) < [email protected] > $@
endif
scripts/upstart/bumblebeed.conf: scripts/upstart/bumblebeed.conf.in
$(do_subst) < [email protected] > $@
if HAVE_HELP2MAN
man_MANS = bumblebeed.1 optirun.1
CLEANFILES += $(man_MANS)
optirun.1: bin/optirun $(bin_optirun_SOURCES)
$(HELP2MAN) --output=$@ --no-info \
--name='run programs on the discrete video card' \
bin/optirun
bumblebeed.1: bin/bumblebeed $(bin_bumblebeed_SOURCES)
$(HELP2MAN) --output=$@ --no-info \
--name='bumblebee daemon' \
bin/bumblebeed
else
@echo "Warning: help2man not available, no man page is created."
endif
dist-hook:
echo $(PACKAGE_VERSION) > $(distdir)/VERSION