diff options
Diffstat (limited to 'util/Makefile')
-rw-r--r-- | util/Makefile | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/util/Makefile b/util/Makefile index ca7b0fd0..48fadad8 100644 --- a/util/Makefile +++ b/util/Makefile @@ -10,7 +10,7 @@ BBSBASE= $(SRCROOT)/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 util_file.o \ - util_crypt.o util_calendar.o + util_crypt.o MBBSD_OBJS= \ cache record passwd var \ @@ -27,11 +27,12 @@ CPROG_WITH_UTIL= \ reaper buildAnnounce inndBM mailangel \ outmail chkhbf merge_dir \ transman angel gamblegive wretch_man \ - chesscountry tunepasswd buildir xchatd + chesscountry tunepasswd buildir xchatd \ + uhash_loader # 下面這些程式, 會直接被 compile CPROG_WITHOUT_UTIL= \ - uhash_loader showboard countalldice bbsrf \ + showboard countalldice bbsrf \ initbbs userlist merge_board bbsmail # 下面這些程式會被 install @@ -43,6 +44,10 @@ PROGS= ${CPROG_WITH_UTIL} ${CPROG_WITHOUT_UTIL} \ dailybackup.pl tarqueue.pl waterball.pl filtermail.pl \ getbackup.pl udnnews.pl rebuildaloha.pl +LIBS+= $(SRCROOT)/src/libbbsutil/libbbsutil.a \ + $(SRCROOT)/src/libbbs/libbbs.a + + all: ${CPROG_WITH_UTIL} ${CPROG_WITHOUT_UTIL} ${PROGS} $(SRCROOT)/include/var.h: $(SRCROOT)/mbbsd/var.c @@ -50,7 +55,7 @@ $(SRCROOT)/include/var.h: $(SRCROOT)/mbbsd/var.c .for fn in ${CPROG_WITH_UTIL} ${fn}: ${BBSBASE} ${fn}.c ${UTIL_OBJS} - $(CCACHE) ${CC} ${CFLAGS} ${LDFLAGS} -o ${fn} ${UTIL_OBJS} ${fn}.c + $(CCACHE) ${CC} ${CFLAGS} ${LDFLAGS} -o ${fn} ${UTIL_OBJS} ${fn}.c $(LIBS) .endfor .for fn in ${MBBSD_OBJS} @@ -59,7 +64,7 @@ util_${fn}.o: ${BBSBASE} $(SRCROOT)/mbbsd/${fn}.c .endfor shmctl: ${BBSBASE} shmctl.c ${UTIL_OBJS} - $(CCACHE) ${CXX} ${CFLAGS} ${LDFLAGS} -o shmctl ${UTIL_OBJS} shmctl.c + $(CCACHE) ${CXX} ${CFLAGS} ${LDFLAGS} -o shmctl ${UTIL_OBJS} shmctl.c $(LIBS) #shmctl: ${BBSBASE} shmctl.c ${UTIL_OBJS} # $(CCACHE) gcc -g -DBBSHOME='"/home/bbs"' -I$(SRCROOT)/include -D__OS_MAJOR_VERSION__="2" -D__OS_MINOR_VERSION__="6" -DPTTBBS_UTIL -O1 -o shmctl ${UTIL_OBJS} shmctl.c #shmctl: ${BBSBASE} shmctl.cc ${UTIL_OBJS} @@ -67,7 +72,7 @@ shmctl: ${BBSBASE} shmctl.c ${UTIL_OBJS} bbsmail: ${BBSBASE} bbsmail.c $(SRCROOT)/innbbsd/str_decode.c $(UTIL_OBJS) $(CCACHE) $(CC) $(CFLAGS) $(LDFLAGS) -o bbsmail -DUSE_ICONV \ - bbsmail.c $(SRCROOT)/innbbsd/str_decode.c $(UTIL_OBJS) + bbsmail.c $(SRCROOT)/innbbsd/str_decode.c $(UTIL_OBJS) $(LIBS) install: $(PROGS) install -d $(BBSHOME)/bin/ |