diff options
author | wens <wens@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2008-05-25 12:05:26 +0800 |
---|---|---|
committer | wens <wens@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2008-05-25 12:05:26 +0800 |
commit | ff7ae115c5db1fe56f3c6114bf08ed8ecf0c9847 (patch) | |
tree | d80531d82774d0c8d340f760968dba13a3d11d07 /trans/Makefile | |
parent | 983c3a4eefe0366ac29cd0ad90a859774500302c (diff) | |
download | pttbbs-ff7ae115c5db1fe56f3c6114bf08ed8ecf0c9847.tar pttbbs-ff7ae115c5db1fe56f3c6114bf08ed8ecf0c9847.tar.gz pttbbs-ff7ae115c5db1fe56f3c6114bf08ed8ecf0c9847.tar.bz2 pttbbs-ff7ae115c5db1fe56f3c6114bf08ed8ecf0c9847.tar.lz pttbbs-ff7ae115c5db1fe56f3c6114bf08ed8ecf0c9847.tar.xz pttbbs-ff7ae115c5db1fe56f3c6114bf08ed8ecf0c9847.tar.zst pttbbs-ff7ae115c5db1fe56f3c6114bf08ed8ecf0c9847.zip |
Move transform programs to seperate directory.
Add transformation program for SOB
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@4322 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'trans/Makefile')
-rw-r--r-- | trans/Makefile | 62 |
1 files changed, 62 insertions, 0 deletions
diff --git a/trans/Makefile b/trans/Makefile new file mode 100644 index 00000000..6518509a --- /dev/null +++ b/trans/Makefile @@ -0,0 +1,62 @@ +# $Id$ + +SRCROOT= .. +.include "$(SRCROOT)/pttbbs.mk" + +CFLAGS+= -DPTTBBS_UTIL + +BBSBASE= $(SRCROOT)/include/var.h + +UTIL_OBJS= \ + util_cache.o util_record.o util_passwd.o util_var.o + +MBBSD_OBJS= \ + cache record passwd var + +# 下面這些程式, 會被 compile 並且和 $(UTIL_OBJS) 聯結 +CPROG_WITH_UTIL= \ + wretch_man \ + sob_trans \ + transman + +# 下面是 C++ 的程式 +CPP_WITH_UTIL= \ + + +# 下面這些程式, 會直接被 compile +CPROG_WITHOUT_UTIL= \ + +# 下面這些程式會被 install +PROGS= ${CPROG_WITH_UTIL} ${CPROG_WITHOUT_UTIL} ${CPP_WITH_UTIL}\ + +LIBS+= $(SRCROOT)/common/sys/libcmsys.a \ + $(SRCROOT)/common/bbs/libcmbbs.a + + +all: ${CPROG_WITH_UTIL} ${CPROG_WITHOUT_UTIL} ${CPP_WITH_UTIL} ${PROGS} + +$(SRCROOT)/include/var.h: $(SRCROOT)/mbbsd/var.c + cd $(SRCROOT)/mbbsd; $(MAKE) $(SRCROOT)/include/var.h + +.for fn in ${CPROG_WITH_UTIL} +${fn}: ${BBSBASE} ${fn}.c ${UTIL_OBJS} + $(CCACHE) ${CC} ${CFLAGS} ${LDFLAGS} -o ${fn} ${UTIL_OBJS} ${fn}.c $(LIBS) +.endfor + +.for fn in ${CPP_WITH_UTIL} +${fn}: ${BBSBASE} ${fn}.cc ${UTIL_OBJS} + $(CCACHE) ${CXX} ${CFLAGS} ${LDFLAGS} -o ${fn} ${UTIL_OBJS} ${fn}.cc $(LIBS) +.endfor + +.for fn in ${MBBSD_OBJS} +util_${fn}.o: ${BBSBASE} $(SRCROOT)/mbbsd/${fn}.c + $(CCACHE) ${CC} ${CFLAGS} -D_BBS_UTIL_C_ -c -o $@ $(SRCROOT)/mbbsd/${fn}.c +.endfor + +install: $(PROGS) + install -d $(BBSHOME)/bin/ + install -c -m 755 $(PROGS) $(BBSHOME)/bin/ + +clean: + rm -f *.o $(CPROGS) $(CPROG_WITH_UTIL) $(CPROG_WITHOUT_UTIL) $(CPP_WITH_UTIL) + |