-
Notifications
You must be signed in to change notification settings - Fork 2
/
Makefile.am
128 lines (111 loc) · 4.02 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
122
123
124
125
126
127
128
AUTOMAKE_OPTIONS = gnu
protocols_h = xdg-shell-protocol.h wlr-layer-shell-unstable-v1-protocol.h idle-protocol.h
protocols= $(top_builddir)/protocols/wlr-layer-shell-unstable-v1.xml \
$(top_builddir)/protocols/idle.xml
lib_LTLIBRARIES= libgwwm.la
# bin_PROGRAMS= gwwm
libgwwm_la_SOURCES= %D%/gwwm.c \
%D%/gwwm.h \
%D%/client.h \
%D%/client.c \
%D%/buffer.c \
%D%/util.h \
%D%/util.c \
%D%/config.h
nodist_libgwwm_la_SOURCES = $(protocols_h)
libgwwm_la_CFLAGS= $(WAYLAND_SERVER_CFLAGS) $(WLROOTS_CFLAGS) $(GUILE_CFLAGS) \
$(XCB_CFLAGS) $(XKBCOMMON_CFLAGS) $(LIBINPUT_CFLAGS) \
-I. -DWLR_USE_UNSTABLE -DXWAYLAND -Og -Wall -Wextra
libgwwm_la_LIBADD= $(WLROOTS_LIBS) $(WAYLAND_SERVER_LIBS) $(XKBCOMMON_LIBS) \
$(GUILE_LIBS) $(LIBINPUT_LIBS) $(XCB_LIBS)
snarfcppopts = $(INCLUDES) $(CPPFLAGS) $(libgwwm_la_CFLAGS)
SUFFIXES= .c .scm .go .x .xml -protocol.h
$(protocols_h): $(protocols)
$(libgwwm_la_SOURCES): $(protocols_h)
$(SOURCES): $(lib_LTLIBRARIES)
.c.x:
guile-snarf -o $@ $< $(snarfcppopts)
CLEANFILES = %D%/*.x $(protocols_h)
BUILT_SOURCES = %D%/gwwm.x %D%/client.x %D%/buffer.x $(protocols_h) \
$(c_sources)
xdg-shell-protocol.h:
$(AM_V_GEN) $(WAYLAND_SCANNER) server-header \
$(WAYLAND_PROTOCOLS)/stable/xdg-shell/xdg-shell.xml $@
wlr-layer-shell-unstable-v1-protocol.h:
$(AM_V_GEN) $(WAYLAND_SCANNER) server-header \
$(top_builddir)/protocols/wlr-layer-shell-unstable-v1.xml $@
idle-protocol.h:
$(AM_V_GEN) $(WAYLAND_SCANNER) server-header \
$(top_builddir)/protocols/idle.xml $@
SUBDIRS=po
do_subst = $(SED) \
-e 's,[@]GUILE[@],$(GUILE),g' \
-e 's,[@]guilemoduledir[@],$(guilemoduledir),g' \
-e 's,[@]guileobjectdir[@],$(guileobjectdir),g' \
-e 's,[@]localedir[@],$(localedir),g'
EXTRA_DIST = $(SOURCES) $(protocols)
#
GOBJECTS = $(SOURCES:%.scm=%.go) $(NODIST_SOURCES:%.scm=%.go)
moddir=$(guilemoduledir)/gwwm
godir=$(guileobjectdir)/gwwm
nobase_guilemodule_DATA = gwwm.scm \
gwwm/color.scm \
gwwm/monitor.scm \
gwwm/layout.scm \
gwwm/layout/tile.scm \
gwwm/layout/monocle.scm \
gwwm/client.scm \
gwwm/keymap.scm \
gwwm/keybind.scm \
gwwm/keyboard.scm \
gwwm/pointer.scm \
gwwm/popup.scm \
gwwm/touch.scm \
gwwm/user.scm \
gwwm/buffer.scm \
gwwm/i18n.scm \
gwwm/hooks.scm \
gwwm/utils.scm \
gwwm/utils/srfi-215.scm \
gwwm/utils/ref.scm \
gwwm/keys.scm \
gwwm/listener.scm \
gwwm/commands.scm \
gwwm/packages/fullscreen-bg.scm \
gwwm/configuration.scm \
gwwm/config.scm
dist_bin_SCRIPTS=bin/gwwm
bin/gwwm: bin/gwwm.in Makefile
$(AM_V_at)rm -f $@ $@-t
$(AM_V_at)$(MKDIR_P) "$(@D)"
$(AM_V_GEN)$(do_subst) < "$(srcdir)/$@.in" > "$@-t"
$(AM_V_at)chmod a+x,a-w "$@-t" && mv -f "$@-t" "$@"
# nobase_go_DATA = $(GOBJECTS)
nobase_guileobject_DATA=$(nobase_guilemodule_DATA:%.scm=%.go)
SOURCES=$(nobase_guilemodule_DATA)
guile_install_go_files = install-nobase_guileobject_DATA
$(guile_install_go_files): install-nobase_guilemodule_DATA
CLEANFILES += $(GOBJECTS)
GUILE_WARNINGS = \
-Wunbound-variable -Warity-mismatch -Wshadowed-toplevel \
-Wmacro-use-before-definition \
-Wunused-variable \
-Wduplicate-case-datum -Wbad-case-datum \
-Wformat
.scm.go:
$(AM_V_GEN)$(top_builddir)/pre-inst-env $(GUILE_TOOLS) compile $(GUILE_TARGET) $(GUILE_WARNINGS) -o "$@" "$<"
.PHONY: run
run: all
exec $(top_builddir)/pre-inst-env $(top_srcdir)/bin/gwwm
TESTS = tests/config.scm tests/keymap.scm tests/utils.scm tests/utils/ref.scm
TEST_EXTENSIONS = .scm
SCM_LOG_DRIVER = \
$(top_builddir)/pre-inst-env \
$(GUILE) --no-auto-compile -e main \
$(top_srcdir)/build-aux/test-driver.scm
AM_SCM_LOG_DRIVER_FLAGS = --brief=no
AM_SCM_LOG_FLAGS = --no-auto-compile -L "$(top_srcdir)"
AM_TESTS_ENVIRONMENT = abs_top_srcdir="$(abs_top_srcdir)"
CLEANFILES += $(TESTS:tests/%.scm=%.log)
gdb: all
exec $(top_builddir)/pre-inst-env gdb guile -ex "run $(top_builddir)/bin/gwwm"