Added all of the MH sources, including RCS files, in
[mmh] / docs / historical / mh-6.8.5 / zotnet / tws / Makefile
1 ##############################################################################
2 #    Instructions to Make, for compilation of ZOT UIP/utility processes
3 #
4 #       This file is automatically generated.  Do not edit!
5 # @(#)$Id: tws,v 1.16 1993/02/26 21:50:51 jromine Exp jromine $
6 ##############################################################################
7
8 # The following entries were inserted during MH configuration
9 BINDIR  =       $(DESTDIR)/opt/mh-6.8.5/bin
10 ETCDIR  =       $(DESTDIR)/opt/mh-6.8.5/lib
11 OPTIONS =       -DSYS5 -DSVR4 -DFCNTL -DRENAME -DVSPRINTF -DATTVIBUG -DDBMPWD -DDUMB -DMORE='"/usr/bin/more"' -DMSGPROT='"0600"' -DMSGID -DRPATHS -DSOCKETS -DFOLDPROT='"0711"' -DSHADOW -DSYS5DIR -DMHRC -DMHE -DMIME -DSENDMTS -DSMTP -DSPRINTFTYPE=int -DTYPESIG=void -O -g -I..
12 LDOPTIONS=      -s
13 LDOPTLIB=       -lnsl -lsocket -R/opt/mh-6.8.5/lib
14
15 CC      =       cc
16 LN      =       ln
17 LEX     =       lex -nt
18 CFLAGS  =       $(OPTIONS)
19 LINT    =       lint
20 LFLAGS  =       -bhu $(OPTIONS)
21 LLIBS   =
22 LDFLAGS =       $(LDOPTIONS)
23 LIBES   =
24 LDLIBS  =       $(LIBES) $(LDOPTLIB)
25
26 OFILES  =       dtimep.o lexstring.o dtime.o
27 LFILES  =       l-dtimep l-dtime l-date
28
29 .c:;            echo $@
30
31 ######################################################################
32 #       Here it is...
33 ######################################################################
34
35 all:            $(OFILES) date
36
37 lint:           $(LFILES)
38
39 install:        inst-all clean
40
41 inst-all:;
42
43 tar:;
44
45 uninstall:;
46
47
48 ######################################################################
49 # date
50 ######################################################################
51
52 date:           date.o dtime.o $(LIBES)
53                 $(CC) $(LDFLAGS) -o $@ date.o dtime.o $(LDLIBS)
54
55 l-date:;        $(LINT) $(LFLAGS) date.c dtime.c $(LLIBS)
56
57
58 ######################################################################
59 # dtimep
60 ######################################################################
61
62
63 dtimep:         dtimep.o lexstring.o
64
65 dtimep.o:       dtimep.c
66
67 dtimep.c:       dtimep.lex
68                 $(LEX) dtimep.lex | sed -f lexedit.sed > dtimep.c
69                 -@len=`wc -l dtimep.c | awk ' { print $$1 } '`; \
70                 if [ $$len -gt 10 ]; \
71                 then exit 0; \
72                 else echo "lex failed: using pre-lexed dtimep.c"; \
73                     cp dtimep.c-lexed dtimep.c; \
74                 fi
75
76 lexstring.o:    lexstring.c
77                 $(CC) $(CFLAGS) -c -DONECASE lexstring.c
78
79 l-dtimep:;      $(LINT) $(LFLAGS) dtimep.c -DONECASE lexstring.c $(LLIBS)
80
81
82 ######################################################################
83 # dtime
84 ######################################################################
85
86 dtime:          dtime.o
87
88 l-dtime:;       $(LINT) $(LFLAGS) dtime.c $(LLIBS)
89
90
91 ##############################################################################
92 #       Miscellaneous tasks
93 ##############################################################################
94
95 tws.h:          ../tws.h
96                 rm -f $@
97                 $(LN) ../tws.h $@
98
99 unconfig:       distribution
100                 -rm -f Makefile
101
102 distribution:   clean
103
104 clean:          unclean
105                 -rm -f dtimep.c *.o date
106
107 unclean:;       -rm -f _* :* core eddep makedep
108
109
110 ##############################################################################
111 #       Dependencies
112 ##############################################################################
113
114 MODULES =       date dtime dtimep
115
116 depend:;        for m in $(MODULES); do ( \
117                     i=`basename $$m .c`; \
118                     echo $$i.o: $$i.c >> makedep; \
119                     grep '^#[   ]*include' $$i.c | \
120                         sed -e 's,[^"]*"/\([^"]*\)".*,'$$i'.o: /\1,' \
121                             -e 's,[^"]*"\([^"]*\)".*,'$$i'.o: \1,' \
122                             -e 's,[^<]*<\(.*\)>.*,#'$$i'.o: /usr/include/\1,' \
123                         >> makedep \
124                 ); done
125                 echo '/^# DO NOT DELETE THIS LINE/+2,$$d' > eddep
126                 echo '$$r makedep' >> eddep
127                 echo 'w' >> eddep
128                 cp Makefile _Makefile
129                 ed - Makefile < eddep
130                 rm eddep makedep
131                 echo '# DEPENDENCIES MUST END AT END OF FILE' >> Makefile
132                 echo '# IF YOU PUT STUFF HERE IT WILL GO AWAY' >> Makefile
133
134 # DO NOT DELETE THIS LINE
135 # DEPENDENCIES START HERE
136 date.o: date.c
137 date.o: ../tws.h
138 #date.o: /usr/include/stdio.h
139 dtime.o: dtime.c
140 dtime.o: ../tws.h
141 dtime.o: ../../h/strings.h
142 #dtime.o: /usr/include/stdio.h
143 #dtime.o: /usr/include/sys/types.h
144 #dtime.o: /usr/include/sys/sysmacros.h
145 #dtime.o: /usr/include/sys/timeb.h
146 #dtime.o: /usr/include/time.h
147 dtimep.o: dtimep.c
148 #dtimep.o: /usr/include/stdio.h
149 dtimep.o: ../tws.h
150 dtimep.o: ../../h/strings.h
151 #dtimep.o: /usr/include/ctype.h
152 #dtimep.o: /usr/include/sys/types.h
153 #dtimep.o: /usr/include/sys/sysmacros.h
154 #dtimep.o: /usr/include/sys/timeb.h
155 #dtimep.o: /usr/include/time.h
156 # DEPENDENCIES MUST END AT END OF FILE
157 # IF YOU PUT STUFF HERE IT WILL GO AWAY