Mercurial > hg > Applications > mh
diff conf/makefiles/mts/mmdf @ 0:bce86c4163a3
Initial revision
author | kono |
---|---|
date | Mon, 18 Apr 2005 23:46:02 +0900 |
parents | |
children | 441a2190cfae |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/conf/makefiles/mts/mmdf Mon Apr 18 23:46:02 2005 +0900 @@ -0,0 +1,117 @@ +############################################################################## +# Instructions to Make, for compilation of MMDF-MTS library +# +# @(MHWARNING) +# @(#)$Id$ +############################################################################## + +# The following entries were inserted during MH configuration +OPTIONS = @(MHOPTIONS) -I.. + +CC = @(MHCOMPILER) +@BEGIN: OPTIM +CFLAGS = $(OPTIONS) +@END: OPTIM +@BEGIN: DEBUG +CFLAGS = $(OPTIONS) +@END: DEBUG +LINT = lint +LFLAGS = -bhu $(OPTIONS) +LLIBS = +CP = @(CP) +LN = @(LN) + +LIB = mmdfmts.a + +CFILES = hosts.c +OFILES = hosts.o + + +@BEGIN: OPTIM +############################################################################## +# Generation Rules +############################################################################## + +.c.o:; $(CC) $(CFLAGS) -c $*.c +@BEGIN: NEWLOAD + -ld -x -r $@ + mv a.out $@ +@END: NEWLOAD +@BEGIN: OLDLOAD + ${CC} -s -o $@ +@END: OLDLOAD + + +@END: OPTIM +############################################################################## +# Here it is... +############################################################################## + +all: $(LIB) +depend:; +lint: l-mmdf + +@BEGIN: MMDFIMTS +$(LIB): $(OFILES) mmdf_lib.a util_lib.a + -mv $(LIB) z$(LIB) + -rm -fr tmp + mkdir tmp mmdf util + ln hosts.o mmdf_lib.a util_lib.a tmp + cd mmdf; ar x ../mmdf_lib.a; ln *.o ../tmp + cd util; ar x ../util_lib.a; ln *.o ../tmp + -@rm -f tmp/signal.o #dont want 4.1 signal package +@BEGIN: RANLIB + cd tmp; ar r ../$@ *.o; ranlib $@ +@END: RANLIB +@BEGIN: LORDER + cd tmp; ar r ../$@ `lorder *.o | tsort` +@END: LORDER + rm -fr tmp mmdf util + -rm -f ../libmts.a + -cd ..; $(LN) mmdf/$@ libmts.a + -rm -f ../llib-lmts + -cd .. ; $(LN) mmdf/llib-lmmdf llib-lmts + -@ls -l $@ + -@echo "MMDFI-MTS library built normally" +@END: MMDFIMTS + +@BEGIN: MMDFIIMTS +$(LIB): $(OFILES) libmmdf.a + -mv $(LIB) z$(LIB) +@BEGIN: RANLIB + cp libmmdf.a $@ + ar r $@ hosts.o; ranlib $@ +@END: RANLIB +@BEGIN: LORDER + mkdir tmp + cd tmp; ar x ../libmmdf.a + ln hosts.o tmp + cd tmp; ar r ../$@ `lorder *.o | tsort` + rm -fr tmp +@END: LORDER + -rm -f ../libmts.a + -cd ..; $(LN) mmdf/$@ libmts.a + -rm -f ../llib-lmts + -cd ..; $(LN) mmdf/llib-lmmdf llib-lmts + -@ls -l $@ + -@echo "MMDFII-MTS library built normally" +@END: MMDFIIMTS + +l-mmdf:; $(LINT) $(LFLAGS) $(CFILES) $(LLIBS) + +hosts.o: Makefile + + +############################################################################## +# Miscellaneous tasks +############################################################################## + +unconfig: distribution + -rm -f Makefile + +distribution: clean + +clean: unclean + -rm -f *.o $(LIB) z$(LIB) + +unclean:; -rm -f _* :* core *.core