diff options
author | Nicholas Marriott <nicholas.marriott@gmail.com> | 2009-04-29 23:07:35 +0000 |
---|---|---|
committer | Nicholas Marriott <nicholas.marriott@gmail.com> | 2009-04-29 23:07:35 +0000 |
commit | 91241f1457d2391f2885761d5df423eb7a4d893e (patch) | |
tree | ae5ed8c06fed1f1809c0a9d26a4a1f18f2287b8c /GNUmakefile | |
parent | ce989a91d1c713300503b4631f29fbf456561701 (diff) |
Apply the make magic wand to pick an osdep-*.c file rather than using ifdefs.
Diffstat (limited to 'GNUmakefile')
-rw-r--r-- | GNUmakefile | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/GNUmakefile b/GNUmakefile index 4eca07e8..3a8a818d 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -1,4 +1,4 @@ -# $Id: GNUmakefile,v 1.88 2009-04-29 22:42:02 nicm Exp $ +# $Id: GNUmakefile,v 1.89 2009-04-29 23:07:35 nicm Exp $ .PHONY: clean @@ -42,9 +42,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 \ - osdep-unknown.c osdep-openbsd.c osdep-freebsd.c osdep-linux.c \ - osdep-darwin.c attributes.c + tty.c tty-term.c tty-keys.c tty-write.c util.c names.c attributes.c CC?= gcc INCDIRS+= -I. -I- @@ -120,6 +118,10 @@ CFLAGS+= $(shell getconf LFS_CFLAGS) -D_GNU_SOURCE \ LIBS+= -lcrypt -lutil endif +LCOS= $(shell uname|tr '[:upper:]' '[:lower:]') +OSDEP= $(shell [ -f osdep-$(LCOS).c ] && echo $(LCOS) || echo unknown) +SRCS+= osdep-$(OSDEP).c + OBJS= $(patsubst %.c,%.o,$(SRCS)) CLEANFILES= ${PROG} *.o .depend *~ ${PROG}.core *.log compat/*.o index.html |