BSD 4_3_Net_2 release
[unix-history] / usr / src / contrib / isode / others / ntp / Makefile
CommitLineData
9e8e5516
C
1###############################################################################
2# Instructions to Make, for compilation of ISODE NTP over ROS
3###############################################################################
4
5###############################################################################
6#
7# $Header: /f/osi/others/ntp/RCS/Makefile,v 7.2 91/02/22 09:33:33 mrose Interim $
8#
9#
10# $Log: Makefile,v $
11# Revision 7.2 91/02/22 09:33:33 mrose
12# Interim 6.8
13#
14# Revision 7.1 90/12/23 18:44:45 mrose
15# update
16#
17# Revision 7.0 90/12/10 17:21:14 mrose
18# *** empty log message ***
19#
20###############################################################################
21
22###############################################################################
23#
24# NOTICE
25#
26# Acquisition, use, and distribution of this module and related
27# materials are subject to the restrictions of a license agreement.
28# Consult the Preface in the User's Manual for the full terms of
29# this agreement.
30#
31###############################################################################
32
33
34###############################################################################
35# Generation Rules for program modules
36###############################################################################
37
38PEPYPATH= -DPEPYPATH
39
40.c.o:; $(CC) $(CFLAGS) -c $*.c
41
42
43###############################################################################
44# Programs and Libraries
45###############################################################################
46
47LIBES = $(TOPDIR)libisode.a
48LLIBS = $(TOPDIR)llib-lisode
49
50
51###############################################################################
52# Files
53###############################################################################
54
55HFILES = ntp-config.h ntp.h patchlevel.h
56CFILES = ntp.c ntp.c ntp_adjust.c ntp_osi.c ntp_proto.c ntp_sock.c \
57 ntpd.c ntpdc.c ntpsubs.c ntq.c read_local.c read_psti.c test.c
58RYFILES = ntp.ry
59
60
61##################################################################
62# Here it is...
63##################################################################
64
65all: ntpd ntp ntpdc ntq ntest
66inst-all: inst-ntpd inst-ntp inst-ntpdc inst-ntq manuals
67install: inst-all clean
68lint: l-ntpd l-ntp l-ntpdc l-ntq
69
70
71#################################################################
72# ntpd
73#################################################################
74
75NTPDOBJ= ntpd.o ntpsubs.o ntp_proto.o ntp_sock.o ntp_adjust.o read_local.o \
76 read_psti.o ntp_osi.o NTP-ops.o NTP-stubs.o NTP-types.o NTP-print.o
77NTPDSRC= ntpd.o ntpsubs.o ntp_proto.o ntp_sock.o ntp_adjust.o read_local.o \
78 read_psti.o ntp_osi.o NTP-ops.o NTP-stubs.o NTP-types.o NTP-print.o
79
80
81inst-ntpd: $(SBINDIR)ntpd
82
83$(SBINDIR)ntpd: xntpd
84 -cp $@ zntpd
85 -rm -f $@
86 cp xntpd $@
87 -@ls -gls $@
88 -@echo ""
89
90ntpd: xntpd
91
92xntpd: ${NTPDOBJ}
93 $(CC) $(LDFLAGS) -o $@ ${NTPDOBJ} $(LIBES)
94
95l-ntpd: $(NTPDSRC)
96 $(LINT) $(LINTFLAGS) ${DEFINES} ${FEATURES} ${INCPATH} \
97 ${NTPDSRC} ${LLIBS} \
98 | grep -v "warning: possible pointer alignment problem"
99
100
101#################################################################
102# ntp
103#################################################################
104
105NTPOBJ = ntp.o ntpsubs.o
106NTPSRC = ntp.c ntpsubs.c
107
108
109inst-ntp: $(BINDIR)ntp
110
111$(BINDIR)ntp: xntp
112 -cp $@ zntp
113 -rm -f $@
114 cp xntp $@
115 -@ls -gls $@
116 -@echo ""
117
118ntp: xntp
119
120xntp: $(NTPOBJ)
121 $(LDCC) $(LDFLAGS) -o $@ $(NTPOBJ) $(LIBES) $(LSOCKET)
122
123l-ntp: $(NTPSRC)
124 $(LINT) $(LFLAGS) $(NTPSRC) $(LLIBS) \
125 | grep -v "warning: possible pointer alignment problem"
126
127
128#################################################################
129# ntpdc
130#################################################################
131
132NTPDCOBJ = ntpdc.o
133NTPDCSRC = ntpdc.c
134
135
136inst-ntpdc: $(SBINDIR)ntpdc
137
138$(SBINDIR)ntpdc: xntpdc
139 -cp $@ zntpdc
140 -rm -f $@
141 cp xntpdc $@
142 -@ls -gls $@
143 -@echo ""
144
145ntpdc: xntpdc
146
147xntpdc: $(NTPDCOBJ)
148 $(LDCC) $(LDFLAGS) -o $@ $(NTPDCOBJ) $(LIBES) $(LSOCKET)
149
150l-ntpdc: $(NTPDCSRC)
151 $(LINT) $(LFLAGS) $(NTPDCSRC) $(LLIBS) \
152 | grep -v "warning: possible pointer alignment problem"
153
154
155#################################################################
156# ntq
157#################################################################
158
159NTQOBJ = NTP-types.o NTP-stubs.o NTP-ops.o ntq.o
160NTQSRC = NTP-types.c NTP-stubs.c NTP-ops.c ntq.c
161
162
163inst-ntq: $(BINDIR)ntq
164
165$(BINDIR)ntq: xntq
166 -cp $@ zntq
167 -rm -f $@
168 cp xntq $@
169 -@ls -gls $@
170 -@echo ""
171
172ntq: xntq
173
174xntq: $(NTQOBJ)
175 $(LDCC) $(LDFLAGS) -o $@ $(NTQOBJ) $(LIBES) $(LSOCKET)
176
177l-ntq: $(NTPQSRC)
178 $(LINT) $(LFLAGS) $(NTPQSRC) $(LLIBS) \
179 | grep -v "warning: possible pointer alignment problem"
180
181
182#################################################################
183# misc
184#################################################################
185
186ntest: test.o ntpsubs.o
187 $(LDCC) $(LDFLAGS) -o ntest test.o ntpsubs.o $(LIBES)
188
189sock_test: ntp_sock.c
190 $(LDCC) $(LDFLAGS) -DTEST -o sock_test ntp_sock.c $(LIBES)
191
192
193################################################################
194# manual pages
195################################################################
196
197MANUALS = ntp.8 ntpd.8 ntpdc.8
198
199manuals:; @$(UTILDIR)inst-man.sh $(MANOPTS) $(MANUALS)
200 -@echo ""
201
202
203################################################################
204# clean
205################################################################
206
207clean:; rm -f *.o *.a NTP* x* ntest sock_test z* _* core
208
209grind:; iprint READ-ME Makefile
210 tgrind -lc $(HFILES) $(CFILES)
211 tgrind -lpepy -d $(TOPDIR)pepy/grindefs $(RYFILES)
212 @echo $(MANUALS) | \
213 tr " " "\012" | \
214 sed -e "s%.*%itroff -man &%" | \
215 sh -ve
216
217true:;
218
219
220#################################################################
221# dependencies
222#################################################################
223
224ntp.o: ntp.h ntp-config.h ntp.c
225ntp_adjust.o: ntp.h ntp-config.h ntp_adjust.c
226ntp_osi.o: ntp.h ntp-config.h NTP-ops.h NTP-types.h ntp_osi.c
227ntp_proto.o: ntp.h ntp-config.h ntp_proto.c
228ntp_sock.o: ntp.h ntp-config.h ntp_sock.c
229ntpd.o: ntp.h ntp-config.h patchlevel.h ntpd.c
230ntpdc.o: ntp.h ntp-config.h ntpdc.c
231ntpsubs.o: ntp.h ntp-config.h ntpsubs.c
232read_local.o: ntp-config.h read_local.c
233read_psti.o: ntp-config.h read_psti.c
234test.o: ntp.h ntp-config.h test.c
235
236NTP-ops.o: NTP-ops.c NTP-ops.h NTP-types.h
237 $(CC) $(CFLAGS) -c -DPERFORMER -DINVOKER NTP-ops.c
238NTP-print.c: NTP-asn.py
239 $(TOPDIR)pepy/xpepy -S PRINT -o $@ -a PY_advise NTP-asn.py
240NTP-types.py: NTP-asn.py
241 $(TOPDIR)pepy/xposy -f -h -o $@ NTP-asn.py
242
243NTP-types.h: NTP-types.py
244NTP-asn.py: ntp.ry
245 $(TOPDIR)rosy/xrosy -o $@ ntp.ry
246NTP-ops.c: ntp.ry
247NTP-ops.h: ntp.ry
248NTP-stubs.c: ntp.ry
249NTP-types.o: NTP-types.c NTP-types.h
250NTP-types.c: NTP-types.py
251 $(TOPDIR)pepy/xpepy -a PY_advise -A NTP-types.py