summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorNicholas Marriott <nicholas.marriott@gmail.com>2009-04-29 23:07:35 +0000
committerNicholas Marriott <nicholas.marriott@gmail.com>2009-04-29 23:07:35 +0000
commit91241f1457d2391f2885761d5df423eb7a4d893e (patch)
treeae5ed8c06fed1f1809c0a9d26a4a1f18f2287b8c /Makefile
parentce989a91d1c713300503b4631f29fbf456561701 (diff)
Apply the make magic wand to pick an osdep-*.c file rather than using ifdefs.
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile9
1 files changed, 5 insertions, 4 deletions
diff --git a/Makefile b/Makefile
index 651c9d84..6449652e 100644
--- a/Makefile
+++ b/Makefile
@@ -1,4 +1,4 @@
-# $Id: Makefile,v 1.126 2009-04-29 22:25:20 nicm Exp $
+# $Id: Makefile,v 1.127 2009-04-29 23:07:35 nicm Exp $
.SUFFIXES: .c .o .y .h
.PHONY: clean update-index.html upload-index.html
@@ -45,9 +45,7 @@ SRCS= tmux.c server.c server-msg.c server-fn.c buffer.c buffer-poll.c status.c \
window-clock.c window-scroll.c window-more.c window-copy.c \
window-choose.c \
options.c options-cmd.c paste.c colour.c utf8.c clock.c \
- tty.c tty-term.c tty-keys.c tty-write.c util.c names.c attributes.c \
- osdep-unknown.c osdep-openbsd.c osdep-freebsd.c osdep-linux.c \
- osdep-darwin.c osdep-netbsd.c
+ tty.c tty-term.c tty-keys.c tty-write.c util.c names.c attributes.c
CC?= c
INCDIRS+= -I. -I- -I/usr/local/include
@@ -96,6 +94,9 @@ LIBS+= -lcrypt
CFLAGS+=-DNO_STRTONUM -DNO_QUEUE_H
.endif
+OSDEP!= [ -f osdep-${OS:L}.c ] && echo ${OS:L} || echo unknown
+SRCS+= osdep-${OSDEP}.c
+
OBJS= ${SRCS:S/.c/.o/:S/.y/.o/}
DISTDIR= ${PROG}-${VERSION}