summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorin2 <in2@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2003-04-05 21:09:03 +0800
committerin2 <in2@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2003-04-05 21:09:03 +0800
commitd1c17d75306c19a5a5b4c566b3e9f7e1c4e59b42 (patch)
treeeef054b095a55ad324819dee9a498e919f564a2b
parent6e1fb350e6c86a6c6baa91934d851d0cfe2a970a (diff)
downloadpttbbs-d1c17d75306c19a5a5b4c566b3e9f7e1c4e59b42.tar
pttbbs-d1c17d75306c19a5a5b4c566b3e9f7e1c4e59b42.tar.gz
pttbbs-d1c17d75306c19a5a5b4c566b3e9f7e1c4e59b42.tar.bz2
pttbbs-d1c17d75306c19a5a5b4c566b3e9f7e1c4e59b42.tar.lz
pttbbs-d1c17d75306c19a5a5b4c566b3e9f7e1c4e59b42.tar.xz
pttbbs-d1c17d75306c19a5a5b4c566b3e9f7e1c4e59b42.tar.zst
pttbbs-d1c17d75306c19a5a5b4c566b3e9f7e1c4e59b42.zip
use make.conf's CFLAG
git-svn-id: http://opensvn.csie.org/pttbbs/pttbbs/trunk/pttbbs@770 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
-rw-r--r--innbbsd/Makefile4
-rw-r--r--util/Makefile47
2 files changed, 26 insertions, 25 deletions
diff --git a/innbbsd/Makefile b/innbbsd/Makefile
index 95bcc415..38e9a2db 100644
--- a/innbbsd/Makefile
+++ b/innbbsd/Makefile
@@ -19,7 +19,7 @@ TARGET = $(INNBBSD) $(BBSNNRP) $(BBSLINK)
CC=gcc
INSTALL=cp
#
-OPT= -O -s -pipe -fomit-frame-pointer -g
+OPT= -O -s -pipe -fomit-frame-pointer
BBS_DEP = MapleBBS
BBS_UTIL = $(BBS_SRC)/util
@@ -29,7 +29,7 @@ BBS_REC = $(BBS_UTIL)/util_record.o $(BBS_UTIL)/util_cache.o $(BBS_UTIL)/util_pa
#
###############
DEBUGOBJ = /usr/lib/debug/mallocmap.o
-CFLAGS= -c -I. -I$(BBS_SRC)/include -I$(BBS_SRC)/mbbsd -D$(BBS_DEP) \
+CFLAGS+= -c -I. -I$(BBS_SRC)/include -I$(BBS_SRC)/mbbsd -D$(BBS_DEP) \
$(EXTRAFLAGS) -DDBZDEBUG -DBBSHOME='"$(BBSHOME)"' \
-D_PATH_BBSHOME=\"$(BBSHOME)\" \
-DVERSION=\"$(VERSION)\" -DADMINUSER=\"$(ADMINUSER)\"
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