Added all of the MH sources, including RCS files, in
[mmh] / docs / historical / mh-6.8.5 / zotnet / tws / phoon / Makefile
1 # Makefile for phoon, deltime, parsetime, and libtws (stolen from mh).
2
3
4 # Valid options:
5 #   BSD42      Set this if your system is BSD 4.2 or later.
6 #   SYS5       Set this if your system is System V.
7 #   EUROPE     Makes nn/nn/nn mean dd/mm/yy instead of mm/dd/yy.
8 #   ATZ        This has something to do with alpha-numeric time zones.
9 #   DSTXXX     This has something to do with daylight savings time.
10 #   HUJI       I don't
11 #   INETONLY           know what
12 #   LEXDEBUG                     the rest of these
13 #   ONECASE                                        do.
14 OPTIONS =       -DBSD42 -DATZ -DDSTXXX
15
16
17 CC      =       cc
18 CFLAGS  =       -O $(OPTIONS)
19 LDFLAGS =       -ns
20
21 .SUFFIXES:      .man .cat
22 .man.cat:
23                 nroff -h -man $< > $@
24
25
26 all:            phoon phoon.cat deltime deltime.cat parsetime libtws.cat
27
28
29 phoon:          phoon.o libtws.a
30                 $(CC) $(LDFLAGS) -o phoon phoon.o -lm libtws.a
31
32 phoon.o:        phoon.c tws.h
33
34
35 deltime:        deltime.o libtws.a
36                 $(CC) $(LDFLAGS) -o deltime deltime.o libtws.a
37
38 deltime.o:      deltime.c tws.h
39
40
41 parsetime:      parsetime.o libtws.a
42                 $(CC) $(LDFLAGS) -o parsetime parsetime.o libtws.a
43
44 parsetime.o:    parsetime.c tws.h
45
46
47 libtws.a:       dtime.o dtimep.o lexstring.o
48                 ar r libtws.a dtime.o dtimep.o lexstring.o
49                 ranlib libtws.a
50
51
52 dtime.o:        dtime.c tws.h
53
54
55 dtimep.o:       dtimep.c tws.h
56
57 dtimep.c:       dtimep.lex
58                 lex -nt dtimep.lex | sed -f lexedit.sed > dtimep.c
59
60
61 lexstring.o:    lexstring.c
62                 $(CC) $(CFLAGS) -c -DONECASE lexstring.c
63
64
65 clean:
66                 -rm -f dtimep.c *.o libtws.a phoon deltime parsetime *.cat phoon.shar core
67
68 phoon.shar:     phoon.shar1 phoon.shar2
69
70 phoon.shar1:    README Makefile deltime.c deltime.man dtime.c dtimep.lex
71                 shar -v -c -p X README Makefile deltime.c deltime.man dtime.c dtimep.lex > phoon.shar1
72
73 phoon.shar2:    lexedit.sed lexstring.c libtws.man parsetime.c phoon.c phoon.man tws.h
74                 shar -v -c -p X lexedit.sed lexstring.c libtws.man parsetime.c phoon.c phoon.man tws.h > phoon.shar2