comparison conf/makefiles/mts/mmdf @ 0:bce86c4163a3

Initial revision
author kono
date Mon, 18 Apr 2005 23:46:02 +0900
parents
children 441a2190cfae
comparison
equal deleted inserted replaced
-1:000000000000 0:bce86c4163a3
1 ##############################################################################
2 # Instructions to Make, for compilation of MMDF-MTS library
3 #
4 # @(MHWARNING)
5 # @(#)$Id$
6 ##############################################################################
7
8 # The following entries were inserted during MH configuration
9 OPTIONS = @(MHOPTIONS) -I..
10
11 CC = @(MHCOMPILER)
12 @BEGIN: OPTIM
13 CFLAGS = $(OPTIONS)
14 @END: OPTIM
15 @BEGIN: DEBUG
16 CFLAGS = $(OPTIONS)
17 @END: DEBUG
18 LINT = lint
19 LFLAGS = -bhu $(OPTIONS)
20 LLIBS =
21 CP = @(CP)
22 LN = @(LN)
23
24 LIB = mmdfmts.a
25
26 CFILES = hosts.c
27 OFILES = hosts.o
28
29
30 @BEGIN: OPTIM
31 ##############################################################################
32 # Generation Rules
33 ##############################################################################
34
35 .c.o:; $(CC) $(CFLAGS) -c $*.c
36 @BEGIN: NEWLOAD
37 -ld -x -r $@
38 mv a.out $@
39 @END: NEWLOAD
40 @BEGIN: OLDLOAD
41 ${CC} -s -o $@
42 @END: OLDLOAD
43
44
45 @END: OPTIM
46 ##############################################################################
47 # Here it is...
48 ##############################################################################
49
50 all: $(LIB)
51 depend:;
52 lint: l-mmdf
53
54 @BEGIN: MMDFIMTS
55 $(LIB): $(OFILES) mmdf_lib.a util_lib.a
56 -mv $(LIB) z$(LIB)
57 -rm -fr tmp
58 mkdir tmp mmdf util
59 ln hosts.o mmdf_lib.a util_lib.a tmp
60 cd mmdf; ar x ../mmdf_lib.a; ln *.o ../tmp
61 cd util; ar x ../util_lib.a; ln *.o ../tmp
62 -@rm -f tmp/signal.o #dont want 4.1 signal package
63 @BEGIN: RANLIB
64 cd tmp; ar r ../$@ *.o; ranlib $@
65 @END: RANLIB
66 @BEGIN: LORDER
67 cd tmp; ar r ../$@ `lorder *.o | tsort`
68 @END: LORDER
69 rm -fr tmp mmdf util
70 -rm -f ../libmts.a
71 -cd ..; $(LN) mmdf/$@ libmts.a
72 -rm -f ../llib-lmts
73 -cd .. ; $(LN) mmdf/llib-lmmdf llib-lmts
74 -@ls -l $@
75 -@echo "MMDFI-MTS library built normally"
76 @END: MMDFIMTS
77
78 @BEGIN: MMDFIIMTS
79 $(LIB): $(OFILES) libmmdf.a
80 -mv $(LIB) z$(LIB)
81 @BEGIN: RANLIB
82 cp libmmdf.a $@
83 ar r $@ hosts.o; ranlib $@
84 @END: RANLIB
85 @BEGIN: LORDER
86 mkdir tmp
87 cd tmp; ar x ../libmmdf.a
88 ln hosts.o tmp
89 cd tmp; ar r ../$@ `lorder *.o | tsort`
90 rm -fr tmp
91 @END: LORDER
92 -rm -f ../libmts.a
93 -cd ..; $(LN) mmdf/$@ libmts.a
94 -rm -f ../llib-lmts
95 -cd ..; $(LN) mmdf/llib-lmmdf llib-lmts
96 -@ls -l $@
97 -@echo "MMDFII-MTS library built normally"
98 @END: MMDFIIMTS
99
100 l-mmdf:; $(LINT) $(LFLAGS) $(CFILES) $(LLIBS)
101
102 hosts.o: Makefile
103
104
105 ##############################################################################
106 # Miscellaneous tasks
107 ##############################################################################
108
109 unconfig: distribution
110 -rm -f Makefile
111
112 distribution: clean
113
114 clean: unclean
115 -rm -f *.o $(LIB) z$(LIB)
116
117 unclean:; -rm -f _* :* core *.core