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 -Wno-macro-redefined
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
69 # Set flags for Cygwin.
71 AM_CPPFLAGS += -DTMUX_SOCK_PERM=0
81 cmd-attach-session.c \
86 cmd-command-prompt.c \
87 cmd-confirm-before.c \
91 cmd-display-message.c \
105 cmd-list-sessions.c \
116 cmd-refresh-client.c \
117 cmd-rename-session.c \
118 cmd-rename-window.c \
120 cmd-resize-window.c \
122 cmd-respawn-window.c \
123 cmd-rotate-window.c \
126 cmd-select-layout.c \
128 cmd-select-window.c \
130 cmd-server-access.c \
132 cmd-set-environment.c \
134 cmd-show-environment.c \
135 cmd-show-messages.c \
137 cmd-show-prompt-history.c \
142 cmd-switch-client.c \
208 nodist_tmux_SOURCES = osdep-@PLATFORM@.c
210 # Add compat file for forkpty.
212 nodist_tmux_SOURCES += compat/forkpty-@PLATFORM@.c
215 # Add compat file for systemd.
217 nodist_tmux_SOURCES += compat/systemd.c
220 # Add compat file for utf8proc.
222 nodist_tmux_SOURCES += compat/utf8proc.c
225 # Enable sixel support.
227 dist_tmux_SOURCES += image.c image-sixel.c
231 check_PROGRAMS = fuzz/input-fuzzer
232 fuzz_input_fuzzer_LDFLAGS = $(FUZZING_LIBS)
233 fuzz_input_fuzzer_LDADD = $(LDADD) $(tmux_OBJECTS)
236 # Install tmux.1 in the right format.
238 if test x@MANFORMAT@ = xmdoc; then \
239 sed -e "s|@SYSCONFDIR@|$(sysconfdir)|g" $(srcdir)/tmux.1 \
240 >$(srcdir)/tmux.1.mdoc; \
242 sed -e "s|@SYSCONFDIR@|$(sysconfdir)|g" $(srcdir)/tmux.1| \
243 $(AWK) -f $(srcdir)/mdoc2man.awk >$(srcdir)/tmux.1.man; \
245 $(mkdir_p) $(DESTDIR)$(mandir)/man1
246 $(INSTALL_DATA) $(srcdir)/tmux.1.@MANFORMAT@ \
247 $(DESTDIR)$(mandir)/man1/tmux.1