1 ##############################################################################
2 # Instructions to Make, for compilation of ZOT UIP/utility processes
5 # @(#)$Id: tws,v 1.16 1993/02/26 21:50:51 jromine Exp jromine $
6 ##############################################################################
8 # The following entries were inserted during MH configuration
9 BINDIR = $(DESTDIR)@(MHBINPATH)
10 ETCDIR = $(DESTDIR)@(MHETCPATH)
11 OPTIONS = @(MHOPTIONS) -I..
12 LDOPTIONS= @(LDOPTIONS)
25 LFLAGS = -bhu $(OPTIONS)
27 LDFLAGS = $(LDOPTIONS)
29 LDLIBS = $(LIBES) $(LDOPTLIB)
31 OFILES = dtimep.o lexstring.o dtime.o
32 LFILES = l-dtimep l-dtime l-date
36 ######################################################################
38 ######################################################################
44 install: inst-all clean
53 ######################################################################
55 ######################################################################
57 date: date.o dtime.o $(LIBES)
58 $(CC) $(LDFLAGS) -o $@ date.o dtime.o $(LDLIBS)
60 l-date:; $(LINT) $(LFLAGS) date.c dtime.c $(LLIBS)
63 ######################################################################
65 ######################################################################
68 dtimep: dtimep.o lexstring.o
73 $(LEX) dtimep.lex | sed -f lexedit.sed > dtimep.c
74 -@len=`wc -l dtimep.c | awk ' { print $$1 } '`; \
75 if [ $$len -gt 10 ]; \
77 else echo "lex failed: using pre-lexed dtimep.c"; \
78 cp dtimep.c-lexed dtimep.c; \
81 lexstring.o: lexstring.c
82 $(CC) $(CFLAGS) -c -DONECASE lexstring.c
84 l-dtimep:; $(LINT) $(LFLAGS) dtimep.c -DONECASE lexstring.c $(LLIBS)
87 ######################################################################
89 ######################################################################
93 l-dtime:; $(LINT) $(LFLAGS) dtime.c $(LLIBS)
96 ##############################################################################
98 ##############################################################################
104 unconfig: distribution
110 -rm -f dtimep.c *.o date
112 unclean:; -rm -f _* :* core eddep makedep
115 ##############################################################################
117 ##############################################################################
119 MODULES = date dtime dtimep
121 depend:; for m in $(MODULES); do ( \
122 i=`basename $$m .c`; \
123 echo $$i.o: $$i.c >> makedep; \
124 grep '^#[ ]*include' $$i.c | \
125 sed -e 's,[^"]*"/\([^"]*\)".*,'$$i'.o: /\1,' \
126 -e 's,[^"]*"\([^"]*\)".*,'$$i'.o: \1,' \
127 -e 's,[^<]*<\(.*\)>.*,#'$$i'.o: /usr/include/\1,' \
130 echo '/^# DO NOT DELETE THIS LINE/+2,$$d' > eddep
131 echo '$$r makedep' >> eddep
133 cp Makefile _Makefile
134 ed - Makefile < eddep
136 echo '# DEPENDENCIES MUST END AT END OF FILE' >> Makefile
137 echo '# IF YOU PUT STUFF HERE IT WILL GO AWAY' >> Makefile
139 # DO NOT DELETE THIS LINE
140 # DEPENDENCIES START HERE
143 #date.o: /usr/include/stdio.h
146 dtime.o: ../../h/strings.h
147 #dtime.o: /usr/include/stdio.h
148 #dtime.o: /usr/include/sys/types.h
149 #dtime.o: /usr/include/sys/sysmacros.h
150 #dtime.o: /usr/include/sys/timeb.h
151 #dtime.o: /usr/include/time.h
153 #dtimep.o: /usr/include/stdio.h
155 dtimep.o: ../../h/strings.h
156 #dtimep.o: /usr/include/ctype.h
157 #dtimep.o: /usr/include/sys/types.h
158 #dtimep.o: /usr/include/sys/sysmacros.h
159 #dtimep.o: /usr/include/sys/timeb.h
160 #dtimep.o: /usr/include/time.h
161 # DEPENDENCIES MUST END AT END OF FILE
162 # IF YOU PUT STUFF HERE IT WILL GO AWAY