1 # Obvious program stuff.
3 CLEANFILES = tmux.1.mdoc tmux.1.man cmd-parse.c
5 # Distribution tarball options.
7 CHANGES README README.ja COPYING example_tmux.conf \
8 osdep-*.c mdoc2man.awk tmux.1
9 dist_EXTRA_tmux_SOURCES = compat/*.[ch]
12 AM_CPPFLAGS += @XOPEN_DEFINES@ \
13 -DTMUX_VERSION='"@VERSION@"' \
14 -DTMUX_CONF='"$(sysconfdir)/tmux.conf:~/.tmux.conf:$$XDG_CONFIG_HOME/tmux/tmux.conf:~/.config/tmux/tmux.conf"' \
15 -DTMUX_LOCK_CMD='"@DEFAULT_LOCK_CMD@"' \
16 -DTMUX_TERM='"@DEFAULT_TERM@"'
18 # Additional object files.
23 AM_CFLAGS += -std=gnu99 -O2
26 AM_CFLAGS += -Wno-long-long -Wall -W -Wformat=2
27 AM_CFLAGS += -Wmissing-prototypes -Wstrict-prototypes -Wmissing-declarations
28 AM_CFLAGS += -Wwrite-strings -Wshadow -Wpointer-arith -Wsign-compare
29 AM_CFLAGS += -Wundef -Wbad-function-cast -Winline -Wcast-align
30 AM_CFLAGS += -Wdeclaration-after-statement -Wno-pointer-sign -Wno-attributes
31 AM_CFLAGS += -Wno-unused-result -Wno-format-y2k
33 AM_CFLAGS += -Wno-deprecated-declarations -Wno-cast-align
35 AM_CPPFLAGS += -DDEBUG
37 AM_CPPFLAGS += -iquote.
40 # Set flags for Solaris.
43 AM_CPPFLAGS += -D_XPG6
45 AM_CPPFLAGS += -D_XPG4_2
49 # Set flags for Sun CC.
51 AM_CFLAGS += -erroff=E_EMPTY_DECLARATION
54 # Set _LINUX_SOURCE_COMPAT for AIX for malloc(0).
56 AM_CPPFLAGS += -D_LINUX_SOURCE_COMPAT=1
59 # Set flags for NetBSD.
61 AM_CPPFLAGS += -D_OPENBSD_SOURCE
64 # Set flags for Haiku.
66 AM_CPPFLAGS += -D_BSD_SOURCE
76 cmd-attach-session.c \
81 cmd-command-prompt.c \
82 cmd-confirm-before.c \
86 cmd-display-message.c \
100 cmd-list-sessions.c \
111 cmd-refresh-client.c \
112 cmd-rename-session.c \
113 cmd-rename-window.c \
115 cmd-resize-window.c \
117 cmd-respawn-window.c \
118 cmd-rotate-window.c \
121 cmd-select-layout.c \
123 cmd-select-window.c \
125 cmd-server-access.c \
127 cmd-set-environment.c \
129 cmd-show-environment.c \
130 cmd-show-messages.c \
132 cmd-show-prompt-history.c \
137 cmd-switch-client.c \
203 nodist_tmux_SOURCES = osdep-@PLATFORM@.c
205 # Add compat file for forkpty.
207 nodist_tmux_SOURCES += compat/forkpty-@PLATFORM@.c
210 # Add compat file for systemd.
212 nodist_tmux_SOURCES += compat/systemd.c
215 # Add compat file for utf8proc.
217 nodist_tmux_SOURCES += compat/utf8proc.c
220 # Enable sixel support.
222 dist_tmux_SOURCES += image.c image-sixel.c
226 check_PROGRAMS = fuzz/input-fuzzer
227 fuzz_input_fuzzer_LDFLAGS = $(FUZZING_LIBS)
228 fuzz_input_fuzzer_LDADD = $(LDADD) $(tmux_OBJECTS)
231 # Install tmux.1 in the right format.
233 if test x@MANFORMAT@ = xmdoc; then \
234 sed -e "s|@SYSCONFDIR@|$(sysconfdir)|g" $(srcdir)/tmux.1 \
235 >$(srcdir)/tmux.1.mdoc; \
237 sed -e "s|@SYSCONFDIR@|$(sysconfdir)|g" $(srcdir)/tmux.1| \
238 $(AWK) -f $(srcdir)/mdoc2man.awk >$(srcdir)/tmux.1.man; \
240 $(mkdir_p) $(DESTDIR)$(mandir)/man1
241 $(INSTALL_DATA) $(srcdir)/tmux.1.@MANFORMAT@ \
242 $(DESTDIR)$(mandir)/man1/tmux.1