summaryrefslogtreecommitdiffstats
path: root/util/Makefile
diff options
context:
space:
mode:
authorin2 <in2@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2004-02-24 14:59:50 +0800
committerin2 <in2@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2004-02-24 14:59:50 +0800
commit109250007e5b641ad8eb6079565bfeb24b7b339b (patch)
treee0d442434e003f9ed3fe60a0ba185bbb9c86100c /util/Makefile
parent16ad45f155f3569e4582983dd1a17eae8fcedc59 (diff)
downloadpttbbs-109250007e5b641ad8eb6079565bfeb24b7b339b.tar
pttbbs-109250007e5b641ad8eb6079565bfeb24b7b339b.tar.gz
pttbbs-109250007e5b641ad8eb6079565bfeb24b7b339b.tar.bz2
pttbbs-109250007e5b641ad8eb6079565bfeb24b7b339b.tar.lz
pttbbs-109250007e5b641ad8eb6079565bfeb24b7b339b.tar.xz
pttbbs-109250007e5b641ad8eb6079565bfeb24b7b339b.tar.zst
pttbbs-109250007e5b641ad8eb6079565bfeb24b7b339b.zip
use BBSBASE for var.h
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@1562 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'util/Makefile')
-rw-r--r--util/Makefile13
1 files changed, 9 insertions, 4 deletions
diff --git a/util/Makefile b/util/Makefile
index 33594270..ba821188 100644
--- a/util/Makefile
+++ b/util/Makefile
@@ -4,6 +4,8 @@
CFLAGS+= -DPTTBBS_UTIL
+BBSBASE= ../include/var.h
+
UTIL_OBJS= \
util_cache.o util_record.o util_passwd.o util_var.o \
util_stuff.o util_osdep.o util_args.o
@@ -40,20 +42,23 @@ PROGS= ${UTIL_OBJS} ${CPROG_WITH_UTIL} ${CPROG_WITHOUT_UTIL} \
all: ${CPROG_WITH_UTIL} ${CPROG_WITHOUT_UTIL} ${PROGS}
+../include/var.h: ../mbbsd/var.c
+ cd ../mbbsd; make ../include/var.h
+
.for fn in ${CPROG_WITH_UTIL}
-${fn}: ${fn}.c ${UTIL_OBJS}
+${fn}: ${BBSBASE} ${fn}.c ${UTIL_OBJS}
${CC} ${CFLAGS} ${LDFLAGS} -o ${fn} ${UTIL_OBJS} ${fn}.c
.endfor
.for fn in ${MBBSD_OBJS}
-util_${fn}.o: ../mbbsd/${fn}.c
+util_${fn}.o: ${BBSBASE} ../mbbsd/${fn}.c
${CC} ${CFLAGS} -D_BBS_UTIL_C_ -c -o $@ ../mbbsd/${fn}.c
.endfor
-xchatd: xchatd.c $(UTIL_OBJS) descrypt.c
+xchatd: ${BBSBASE} xchatd.c $(UTIL_OBJS) descrypt.c
$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $@.c $(UTIL_OBJS) descrypt.c
-bbsmail: bbsmail.c ../innbbsd/str_decode.c $(UTIL_OBJS)
+bbsmail: ${BBSBASE} bbsmail.c ../innbbsd/str_decode.c $(UTIL_OBJS)
$(CC) $(CFLAGS) $(LDFLAGS) -o bbsmail -DUSE_ICONV \
bbsmail.c ../innbbsd/str_decode.c $(UTIL_OBJS)