From d1c17d75306c19a5a5b4c566b3e9f7e1c4e59b42 Mon Sep 17 00:00:00 2001 From: in2 Date: Sat, 5 Apr 2003 13:09:03 +0000 Subject: use make.conf's CFLAG git-svn-id: http://opensvn.csie.org/pttbbs/pttbbs/trunk/pttbbs@770 63ad8ddf-47c3-0310-b6dd-a9e9d9715204 --- util/Makefile | 47 ++++++++++++++++++++++++----------------------- 1 file changed, 24 insertions(+), 23 deletions(-) (limited to 'util/Makefile') diff --git a/util/Makefile b/util/Makefile index 5dfe6c19..d94eb736 100644 --- a/util/Makefile +++ b/util/Makefile @@ -1,27 +1,28 @@ -# $Id: Makefile,v 1.27 2003/03/29 09:53:34 in2 Exp $ - -BBSHOME?=$(HOME) -OSTYPE!=uname - -# FreeBSD -CC_FreeBSD= gcc -CFLAGS_FreeBSD= -DFreeBSD -pipe -Wall -g -O -DHAVE_SETPROCTITLE -DBBSHOME='"$(BBSHOME)"' -I../include -LIBS_FreeBSD= -LIBMAIL_FreeBSD=-lutil -LIBCHAT_FreeBSD= - -# Linux -CC_linux= gcc -CFLAGS_linux= -DLinux -pipe -Wall -g -O -DHAVE_DES_CRYPT -DBBSHOME='"$(BBSHOME)"' -I../include +# $Id: Makefile,v 1.28 2003/04/05 13:09:03 in2 Exp $ + +# 訂義基本初值 +BBSHOME?= $(HOME) +BBSHOME?= /home/bbs +OSTYPE?= FreeBSD +CC?= gcc +CFLAGS+= -Wall -pipe -DBBSHOME='"$(BBSHOME)"' -I../include +LDFLAGS+= -pipe -Wall +LIBS+= -lcrypt + +# FreeBSD特有的環境 +CFLAGS_FreeBSD= -DHAVE_SETPROCTITLE -DFreeBSD +LDFLAGS_FreeBSD= +LIBS_FreeBSD= -lkvm + +# Linux特有的環境 +CFLAGS_linux= -DHAVE_DES_CRYPT -DLinux +LDFLAGS_linux= -pipe -Wall LIBS_linux= -lresolv -LIBMAIL_linux= -LIBCHAT_linux= -lcrypt - -CC= $(CC_$(OSTYPE)) -CFLAGS= $(CFLAGS_$(OSTYPE)) -LDFLAGS=$(LDFLAGS_$(OSTYPE)) -LIBMAIL=$(LIBMAIL_$(OSTYPE)) -LIBCHAT=$(LIBCHAT_$(OSTYPE)) + +# CFLAGS, LDFLAGS, LIBS 加入 OS 相關參數 +CFLAGS+= $(CFLAGS_$(OSTYPE)) +LDFLAGS+= $(LDFLAGS_$(OSTYPE)) +LIBS+= $(LIBS_$(OSTYPE)) OBJS= util_cache.o util_record.o util_passwd.o -- cgit v1.2.3