Commit | Line | Data |
---|---|---|
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 | ||
38 | PEPYPATH= -DPEPYPATH | |
39 | ||
40 | .c.o:; $(CC) $(CFLAGS) -c $*.c | |
41 | ||
42 | ||
43 | ############################################################################### | |
44 | # Programs and Libraries | |
45 | ############################################################################### | |
46 | ||
47 | LIBES = $(TOPDIR)libisode.a | |
48 | LLIBS = $(TOPDIR)llib-lisode | |
49 | ||
50 | ||
51 | ############################################################################### | |
52 | # Files | |
53 | ############################################################################### | |
54 | ||
55 | HFILES = ntp-config.h ntp.h patchlevel.h | |
56 | CFILES = 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 | |
58 | RYFILES = ntp.ry | |
59 | ||
60 | ||
61 | ################################################################## | |
62 | # Here it is... | |
63 | ################################################################## | |
64 | ||
65 | all: ntpd ntp ntpdc ntq ntest | |
66 | inst-all: inst-ntpd inst-ntp inst-ntpdc inst-ntq manuals | |
67 | install: inst-all clean | |
68 | lint: l-ntpd l-ntp l-ntpdc l-ntq | |
69 | ||
70 | ||
71 | ################################################################# | |
72 | # ntpd | |
73 | ################################################################# | |
74 | ||
75 | NTPDOBJ= 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 | |
77 | NTPDSRC= 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 | ||
81 | inst-ntpd: $(SBINDIR)ntpd | |
82 | ||
83 | $(SBINDIR)ntpd: xntpd | |
84 | -cp $@ zntpd | |
85 | -rm -f $@ | |
86 | cp xntpd $@ | |
87 | -@ls -gls $@ | |
88 | -@echo "" | |
89 | ||
90 | ntpd: xntpd | |
91 | ||
92 | xntpd: ${NTPDOBJ} | |
93 | $(CC) $(LDFLAGS) -o $@ ${NTPDOBJ} $(LIBES) | |
94 | ||
95 | l-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 | ||
105 | NTPOBJ = ntp.o ntpsubs.o | |
106 | NTPSRC = ntp.c ntpsubs.c | |
107 | ||
108 | ||
109 | inst-ntp: $(BINDIR)ntp | |
110 | ||
111 | $(BINDIR)ntp: xntp | |
112 | -cp $@ zntp | |
113 | -rm -f $@ | |
114 | cp xntp $@ | |
115 | -@ls -gls $@ | |
116 | -@echo "" | |
117 | ||
118 | ntp: xntp | |
119 | ||
120 | xntp: $(NTPOBJ) | |
121 | $(LDCC) $(LDFLAGS) -o $@ $(NTPOBJ) $(LIBES) $(LSOCKET) | |
122 | ||
123 | l-ntp: $(NTPSRC) | |
124 | $(LINT) $(LFLAGS) $(NTPSRC) $(LLIBS) \ | |
125 | | grep -v "warning: possible pointer alignment problem" | |
126 | ||
127 | ||
128 | ################################################################# | |
129 | # ntpdc | |
130 | ################################################################# | |
131 | ||
132 | NTPDCOBJ = ntpdc.o | |
133 | NTPDCSRC = ntpdc.c | |
134 | ||
135 | ||
136 | inst-ntpdc: $(SBINDIR)ntpdc | |
137 | ||
138 | $(SBINDIR)ntpdc: xntpdc | |
139 | -cp $@ zntpdc | |
140 | -rm -f $@ | |
141 | cp xntpdc $@ | |
142 | -@ls -gls $@ | |
143 | -@echo "" | |
144 | ||
145 | ntpdc: xntpdc | |
146 | ||
147 | xntpdc: $(NTPDCOBJ) | |
148 | $(LDCC) $(LDFLAGS) -o $@ $(NTPDCOBJ) $(LIBES) $(LSOCKET) | |
149 | ||
150 | l-ntpdc: $(NTPDCSRC) | |
151 | $(LINT) $(LFLAGS) $(NTPDCSRC) $(LLIBS) \ | |
152 | | grep -v "warning: possible pointer alignment problem" | |
153 | ||
154 | ||
155 | ################################################################# | |
156 | # ntq | |
157 | ################################################################# | |
158 | ||
159 | NTQOBJ = NTP-types.o NTP-stubs.o NTP-ops.o ntq.o | |
160 | NTQSRC = NTP-types.c NTP-stubs.c NTP-ops.c ntq.c | |
161 | ||
162 | ||
163 | inst-ntq: $(BINDIR)ntq | |
164 | ||
165 | $(BINDIR)ntq: xntq | |
166 | -cp $@ zntq | |
167 | -rm -f $@ | |
168 | cp xntq $@ | |
169 | -@ls -gls $@ | |
170 | -@echo "" | |
171 | ||
172 | ntq: xntq | |
173 | ||
174 | xntq: $(NTQOBJ) | |
175 | $(LDCC) $(LDFLAGS) -o $@ $(NTQOBJ) $(LIBES) $(LSOCKET) | |
176 | ||
177 | l-ntq: $(NTPQSRC) | |
178 | $(LINT) $(LFLAGS) $(NTPQSRC) $(LLIBS) \ | |
179 | | grep -v "warning: possible pointer alignment problem" | |
180 | ||
181 | ||
182 | ################################################################# | |
183 | # misc | |
184 | ################################################################# | |
185 | ||
186 | ntest: test.o ntpsubs.o | |
187 | $(LDCC) $(LDFLAGS) -o ntest test.o ntpsubs.o $(LIBES) | |
188 | ||
189 | sock_test: ntp_sock.c | |
190 | $(LDCC) $(LDFLAGS) -DTEST -o sock_test ntp_sock.c $(LIBES) | |
191 | ||
192 | ||
193 | ################################################################ | |
194 | # manual pages | |
195 | ################################################################ | |
196 | ||
197 | MANUALS = ntp.8 ntpd.8 ntpdc.8 | |
198 | ||
199 | manuals:; @$(UTILDIR)inst-man.sh $(MANOPTS) $(MANUALS) | |
200 | -@echo "" | |
201 | ||
202 | ||
203 | ################################################################ | |
204 | # clean | |
205 | ################################################################ | |
206 | ||
207 | clean:; rm -f *.o *.a NTP* x* ntest sock_test z* _* core | |
208 | ||
209 | grind:; 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 | ||
217 | true:; | |
218 | ||
219 | ||
220 | ################################################################# | |
221 | # dependencies | |
222 | ################################################################# | |
223 | ||
224 | ntp.o: ntp.h ntp-config.h ntp.c | |
225 | ntp_adjust.o: ntp.h ntp-config.h ntp_adjust.c | |
226 | ntp_osi.o: ntp.h ntp-config.h NTP-ops.h NTP-types.h ntp_osi.c | |
227 | ntp_proto.o: ntp.h ntp-config.h ntp_proto.c | |
228 | ntp_sock.o: ntp.h ntp-config.h ntp_sock.c | |
229 | ntpd.o: ntp.h ntp-config.h patchlevel.h ntpd.c | |
230 | ntpdc.o: ntp.h ntp-config.h ntpdc.c | |
231 | ntpsubs.o: ntp.h ntp-config.h ntpsubs.c | |
232 | read_local.o: ntp-config.h read_local.c | |
233 | read_psti.o: ntp-config.h read_psti.c | |
234 | test.o: ntp.h ntp-config.h test.c | |
235 | ||
236 | NTP-ops.o: NTP-ops.c NTP-ops.h NTP-types.h | |
237 | $(CC) $(CFLAGS) -c -DPERFORMER -DINVOKER NTP-ops.c | |
238 | NTP-print.c: NTP-asn.py | |
239 | $(TOPDIR)pepy/xpepy -S PRINT -o $@ -a PY_advise NTP-asn.py | |
240 | NTP-types.py: NTP-asn.py | |
241 | $(TOPDIR)pepy/xposy -f -h -o $@ NTP-asn.py | |
242 | ||
243 | NTP-types.h: NTP-types.py | |
244 | NTP-asn.py: ntp.ry | |
245 | $(TOPDIR)rosy/xrosy -o $@ ntp.ry | |
246 | NTP-ops.c: ntp.ry | |
247 | NTP-ops.h: ntp.ry | |
248 | NTP-stubs.c: ntp.ry | |
249 | NTP-types.o: NTP-types.c NTP-types.h | |
250 | NTP-types.c: NTP-types.py | |
251 | $(TOPDIR)pepy/xpepy -a PY_advise -A NTP-types.py |