mirror of
https://github.com/tmate-io/tmate.git
synced 2024-11-27 10:33:09 +01:00
Use CPPFLAGS.
This commit is contained in:
parent
6d8ff85167
commit
03b76dbf35
16
GNUmakefile
16
GNUmakefile
@ -1,4 +1,4 @@
|
|||||||
# $Id: GNUmakefile,v 1.71 2009-02-08 14:11:37 nicm Exp $
|
# $Id: GNUmakefile,v 1.72 2009-02-18 08:41:22 nicm Exp $
|
||||||
|
|
||||||
.PHONY: clean
|
.PHONY: clean
|
||||||
|
|
||||||
@ -46,7 +46,7 @@ SRCS= tmux.c server.c server-msg.c server-fn.c buffer.c buffer-poll.c status.c \
|
|||||||
osdep-darwin.c attributes.c
|
osdep-darwin.c attributes.c
|
||||||
|
|
||||||
CC?= gcc
|
CC?= gcc
|
||||||
INCDIRS+= -I. -I-
|
CPPFLAGS+= -I. -I-
|
||||||
CFLAGS+= -DBUILD="\"$(VERSION) ($(DATE))\"" -DMETA="'${META}'"
|
CFLAGS+= -DBUILD="\"$(VERSION) ($(DATE))\"" -DMETA="'${META}'"
|
||||||
ifdef FDEBUG
|
ifdef FDEBUG
|
||||||
CFLAGS+= -g -ggdb -DDEBUG
|
CFLAGS+= -g -ggdb -DDEBUG
|
||||||
@ -68,7 +68,7 @@ INSTALLBIN= install -g bin -o root -m 555
|
|||||||
INSTALLMAN= install -g bin -o root -m 444
|
INSTALLMAN= install -g bin -o root -m 444
|
||||||
|
|
||||||
ifeq ($(shell uname),IRIX64)
|
ifeq ($(shell uname),IRIX64)
|
||||||
INCDIRS+= -Icompat -I/usr/local/include/ncurses
|
CPPFLAGS+= -Icompat -I/usr/local/include/ncurses
|
||||||
SRCS+= compat/strlcpy.c compat/strtonum.c compat/daemon.c \
|
SRCS+= compat/strlcpy.c compat/strtonum.c compat/daemon.c \
|
||||||
compat/asprintf.c compat/fgetln.c compat/forkpty-irix.c
|
compat/asprintf.c compat/fgetln.c compat/forkpty-irix.c
|
||||||
CFLAGS+= -DNO_STRLCPY -DNO_STRTONUM -DNO_TREE_H -DNO_SETPROCTITLE \
|
CFLAGS+= -DNO_STRLCPY -DNO_STRTONUM -DNO_TREE_H -DNO_SETPROCTITLE \
|
||||||
@ -79,7 +79,7 @@ LIBS+= -lgen
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(shell uname),SunOS)
|
ifeq ($(shell uname),SunOS)
|
||||||
INCDIRS+= -Icompat -I/usr/local/include/ncurses
|
CPPFLAGS+= -Icompat -I/usr/local/include/ncurses
|
||||||
SRCS+= compat/strtonum.c compat/daemon.c compat/forkpty-sunos.c \
|
SRCS+= compat/strtonum.c compat/daemon.c compat/forkpty-sunos.c \
|
||||||
compat/asprintf.c compat/fgetln.c compat/vis.c
|
compat/asprintf.c compat/fgetln.c compat/vis.c
|
||||||
CFLAGS+= -DNO_STRTONUM -DNO_TREE_H -DNO_PATHS_H -DNO_SETPROCTITLE \
|
CFLAGS+= -DNO_STRTONUM -DNO_TREE_H -DNO_PATHS_H -DNO_SETPROCTITLE \
|
||||||
@ -89,14 +89,14 @@ LIBS+= -lsocket -lnsl
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(shell uname),Darwin)
|
ifeq ($(shell uname),Darwin)
|
||||||
INCDIRS+= -Icompat
|
CPPFLAGS+= -Icompat
|
||||||
SRCS+= compat/strtonum.c compat/bsd-poll.c compat/vis.c
|
SRCS+= compat/strtonum.c compat/bsd-poll.c compat/vis.c
|
||||||
CFLAGS+= -DNO_STRTONUM -DNO_SETRESUID -DNO_SETRESGID -DNO_SETPROCTITLE \
|
CFLAGS+= -DNO_STRTONUM -DNO_SETRESUID -DNO_SETRESGID -DNO_SETPROCTITLE \
|
||||||
-DNO_QUEUE_H -DNO_TREE_H -DBROKEN_POLL
|
-DNO_QUEUE_H -DNO_TREE_H -DBROKEN_POLL
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(shell uname),Linux)
|
ifeq ($(shell uname),Linux)
|
||||||
INCDIRS+= -Icompat
|
CPPFLAGS+= -Icompat
|
||||||
SRCS+= compat/strlcpy.c compat/strlcat.c compat/strtonum.c \
|
SRCS+= compat/strlcpy.c compat/strlcat.c compat/strtonum.c \
|
||||||
compat/fgetln.c compat/getopt_long.c compat/vis.c
|
compat/fgetln.c compat/getopt_long.c compat/vis.c
|
||||||
CFLAGS+= $(shell getconf LFS_CFLAGS) -D_GNU_SOURCE \
|
CFLAGS+= $(shell getconf LFS_CFLAGS) -D_GNU_SOURCE \
|
||||||
@ -110,15 +110,13 @@ OBJS= $(patsubst %.c,%.o,$(SRCS))
|
|||||||
|
|
||||||
CLEANFILES= ${PROG} *.o .depend *~ ${PROG}.core *.log compat/*.o index.html
|
CLEANFILES= ${PROG} *.o .depend *~ ${PROG}.core *.log compat/*.o index.html
|
||||||
|
|
||||||
CPPFLAGS+= $(INCDIRS)
|
|
||||||
|
|
||||||
all: $(PROG)
|
all: $(PROG)
|
||||||
|
|
||||||
$(PROG): $(OBJS)
|
$(PROG): $(OBJS)
|
||||||
$(CC) $(LDFLAGS) -o $@ $+ $(LIBS)
|
$(CC) $(LDFLAGS) -o $@ $+ $(LIBS)
|
||||||
|
|
||||||
depend: $(SRCS)
|
depend: $(SRCS)
|
||||||
$(CC) $(CFLAGS) $(INCDIRS) -MM $(SRCS) > .depend
|
$(CC) $(CPPFLAGS) $(CFLAGS) -MM $(SRCS) > .depend
|
||||||
|
|
||||||
install:
|
install:
|
||||||
$(INSTALLDIR) $(DESTDIR)$(PREFIX)/bin
|
$(INSTALLDIR) $(DESTDIR)$(PREFIX)/bin
|
||||||
|
18
Makefile
18
Makefile
@ -1,4 +1,4 @@
|
|||||||
# $Id: Makefile,v 1.112 2009-02-17 08:08:42 nicm Exp $
|
# $Id: Makefile,v 1.113 2009-02-18 08:41:22 nicm Exp $
|
||||||
|
|
||||||
.SUFFIXES: .c .o .y .h
|
.SUFFIXES: .c .o .y .h
|
||||||
.PHONY: clean update-index.html upload-index.html
|
.PHONY: clean update-index.html upload-index.html
|
||||||
@ -44,12 +44,12 @@ 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-clock.c window-scroll.c window-more.c window-copy.c \
|
||||||
window-choose.c \
|
window-choose.c \
|
||||||
options.c options-cmd.c paste.c colour.c utf8.c clock.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 \
|
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-unknown.c osdep-openbsd.c osdep-freebsd.c osdep-linux.c \
|
||||||
osdep-darwin.c attributes.c
|
osdep-darwin.c osdep-netbsd.c
|
||||||
|
|
||||||
CC?= cc
|
CC?= cc
|
||||||
INCDIRS+= -I. -I- -I/usr/local/include
|
CPPFLAGS+= -I. -I- -I/usr/local/include
|
||||||
CFLAGS+= -DMETA="'${META}'"
|
CFLAGS+= -DMETA="'${META}'"
|
||||||
.ifdef PROFILE
|
.ifdef PROFILE
|
||||||
# Don't use ccache
|
# Don't use ccache
|
||||||
@ -82,7 +82,7 @@ LIBS+= -lutil -lncurses
|
|||||||
|
|
||||||
# FreeBSD and DragonFly
|
# FreeBSD and DragonFly
|
||||||
.if ${OS} == "FreeBSD" || ${OS} == "DragonFly"
|
.if ${OS} == "FreeBSD" || ${OS} == "DragonFly"
|
||||||
INCDIRS+= -Icompat
|
CPPFLAGS+= -Icompat
|
||||||
SRCS+= compat/vis.c
|
SRCS+= compat/vis.c
|
||||||
CFLAGS+= -DUSE_LIBUTIL_H -DNO_QUEUE_H -DNO_TREE_H
|
CFLAGS+= -DUSE_LIBUTIL_H -DNO_QUEUE_H -DNO_TREE_H
|
||||||
LIBS+= -lcrypt
|
LIBS+= -lcrypt
|
||||||
@ -90,7 +90,7 @@ LIBS+= -lcrypt
|
|||||||
|
|
||||||
# NetBSD
|
# NetBSD
|
||||||
.if ${OS} == "NetBSD"
|
.if ${OS} == "NetBSD"
|
||||||
INCDIRS+= -Icompat
|
CPPFLAGS= -Icompat
|
||||||
SRCS+= compat/strtonum.c compat/vis.c
|
SRCS+= compat/strtonum.c compat/vis.c
|
||||||
LIBS+= -lcrypt
|
LIBS+= -lcrypt
|
||||||
CFLAGS+=-DNO_STRTONUM
|
CFLAGS+=-DNO_STRTONUM
|
||||||
@ -105,11 +105,11 @@ DISTFILES= *.[chyl] Makefile GNUmakefile *.[1-9] NOTES TODO CHANGES FAQ \
|
|||||||
CLEANFILES= ${PROG} *.o .depend *~ ${PROG}.core *.log compat/*.o index.html
|
CLEANFILES= ${PROG} *.o .depend *~ ${PROG}.core *.log compat/*.o index.html
|
||||||
|
|
||||||
.c.o:
|
.c.o:
|
||||||
${CC} ${CFLAGS} ${INCDIRS} -c ${.IMPSRC} -o ${.TARGET}
|
${CC} ${CPPFLAGS} ${CFLAGS} -c ${.IMPSRC} -o ${.TARGET}
|
||||||
|
|
||||||
.y.o:
|
.y.o:
|
||||||
${YACC} ${.IMPSRC}
|
${YACC} ${.IMPSRC}
|
||||||
${CC} ${CFLAGS} ${INCDIRS} -c y.tab.c -o ${.TARGET}
|
${CC} ${CPPFLAGS} ${CFLAGS} -c y.tab.c -o ${.TARGET}
|
||||||
|
|
||||||
all: ${PROG}
|
all: ${PROG}
|
||||||
|
|
||||||
@ -117,7 +117,7 @@ ${PROG}: ${OBJS}
|
|||||||
${CC} ${LDFLAGS} -o ${PROG} ${OBJS} ${LIBS}
|
${CC} ${LDFLAGS} -o ${PROG} ${OBJS} ${LIBS}
|
||||||
|
|
||||||
depend:
|
depend:
|
||||||
mkdep ${CFLAGS} ${INCDIRS} ${SRCS:M*.c}
|
mkdep ${CPPFLAGS} ${CFLAGS} ${SRCS:M*.c}
|
||||||
|
|
||||||
dist: clean
|
dist: clean
|
||||||
grep '^#FDEBUG=' Makefile
|
grep '^#FDEBUG=' Makefile
|
||||||
|
Loading…
Reference in New Issue
Block a user