summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorin2 <in2@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2002-04-29 03:36:04 +0800
committerin2 <in2@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2002-04-29 03:36:04 +0800
commitda81316536e0af773dc46e9779d384fcb23e890b (patch)
tree51e9eecf3983989b8367c47a3e347850946ccd88
parent747db9b7bed623d2d957aa14dbc6a505cf763be8 (diff)
downloadpttbbs-da81316536e0af773dc46e9779d384fcb23e890b.tar
pttbbs-da81316536e0af773dc46e9779d384fcb23e890b.tar.gz
pttbbs-da81316536e0af773dc46e9779d384fcb23e890b.tar.bz2
pttbbs-da81316536e0af773dc46e9779d384fcb23e890b.tar.lz
pttbbs-da81316536e0af773dc46e9779d384fcb23e890b.tar.xz
pttbbs-da81316536e0af773dc46e9779d384fcb23e890b.tar.zst
pttbbs-da81316536e0af773dc46e9779d384fcb23e890b.zip
add DEBUG flag
git-svn-id: http://opensvn.csie.org/pttbbs/pttbbs/trunk/pttbbs@132 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
-rw-r--r--mbbsd.icc/Makefile27
1 files changed, 23 insertions, 4 deletions
diff --git a/mbbsd.icc/Makefile b/mbbsd.icc/Makefile
index a87135cc..9247b770 100644
--- a/mbbsd.icc/Makefile
+++ b/mbbsd.icc/Makefile
@@ -11,13 +11,26 @@ OBJS= admin.o announce.o args.o bbcall.o bbs.o board.o cache.o cal.o card.o\
voteboard.o syspost.o var.o descrypt.o toolkit.o passwd.o\
calendar.o
-CFLAGS= -O -DHAVE_SETPROCTITLE -DBBSHOME='"$(BBSHOME)"' -DFreeBSD -I../include -D__FreeBSD__
-LDFLAGS=-O -lutil -lkvm
-GCCUSE=gcc -pipe -Wall -O -DHAVE_SETPROCTITLE -DBBSHOME='"/home/bbs"' -DFreeBSD -I../include -c
+CFLAGS=-DHAVE_SETPROCTITLE -DBBSHOME='"$(BBSHOME)"' -DFreeBSD -I../include
+LDFLAGS=-lutil -lkvm
+
+.if defined(DEBUG)
+CFLAGS+= -g -DDEBUG
+LDFLAGS+= -g -DDEBUG
+.else
+CFLAGS+= -O
+LDFLAGS+= -O
+.endif
+
+.if defined(NO_FORK)
+CFLAGS+= -DNO_FORK
+.endif
+
+GCCUSE=gcc -pipe -Wall $(CFLAGS) -c
.SUFFIXES: .c .o
.c.o:
- iccbin $(CFLAGS) -c ../mbbsd/$*.c
+ iccbin -D__FreeBSD__ -D__FreeBSD $(CFLAGS) -c ../mbbsd/$*.c
all: $(PROG)
@@ -47,5 +60,11 @@ topsong.o: topsong.c
xyz.o: xyz.c
$(GCCUSE) ../mbbsd/$*.c
+test: $(PROG)
+ killall -9 testmbbsd || true
+ cp $(PROG) testmbbsd
+ ./testmbbsd 9000
+ rm -f testmbbsd
+
clean:
rm -f $(OBJS) $(PROG)