Debian Codegraph @

protolib/src/sim/ns/ns229/ns229-Makefile.in

raw
1 # Copyright (c) 1994, 1995, 1996
2 # The Regents of the University of California. All rights reserved.
3 #
4 # Redistribution and use in source and binary forms, with or without
5 # modification, are permitted provided that: (1) source code distributions
6 # retain the above copyright notice and this paragraph in its entirety, (2)
7 # distributions including binary code include the above copyright notice and
8 # this paragraph in its entirety in the documentation or other materials
9 # provided with the distribution, and (3) all advertising materials mentioning
10 # features or use of this software display the following acknowledgement:
11 # ``This product includes software developed by the University of California,
12 # Lawrence Berkeley Laboratory and its contributors.'' Neither the name of
13 # the University nor the names of its contributors may be used to endorse
14 # or promote products derived from this software without specific prior
15 # written permission.
16 # THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
17 # WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
18 # MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
19 #
20 # @(#) $Header: 2002/10/09 15:34:11
21
22 #
23 # Various configurable paths (remember to edit Makefile.in, not Makefile)
24 #
25
26 # Top level hierarchy
27 prefix = @prefix@
28 # Pathname of directory to install the binary
29 BINDEST = @prefix@/bin
30 # Pathname of directory to install the man page
31 MANDEST = @prefix@/man
32
33 BLANK = # make a blank space. DO NOT add anything to this line
34
35 # The following will be redefined under Windows (see WIN32 lable below)
36 CC = @CC@
37 CPP = @CXX@
38 LINK = $(CPP)
39 MKDEP = ./conf/mkdep
40 TCLSH = @V_TCLSH@
41 TCL2C = @V_TCL2CPP@
42 AR = ar rc $(BLANK)
43
44 RANLIB = @V_RANLIB@
45 INSTALL = @INSTALL@
46 LN = ln
47 TEST = test
48 RM = rm -f
49 MV = mv
50 PERL = @PERL@
51
52 # for diffusion
53 #DIFF_INCLUDES = "./diffusion3/main ./diffusion3/lib ./diffusion3/nr ./diffusion3/ns"
54
55 CCOPT = @V_CCOPT@
56 STATIC = @V_STATIC@
57 #LDFLAGS = $(STATIC)
58 LDFLAGS = @LDFLAGS@
59 LDOUT = -o $(BLANK)
60
61 DEFINE = -DTCP_DELAY_BIND_ALL -DNO_TK @V_DEFINE@ @V_DEFINES@ @DEFS@ -DNS_DIFFUSION -DSMAC_NO_SYNC -DCPP_NAMESPACE=@CPP_NAMESPACE@ -DUSE_SINGLE_ADDRESS_SPACE -Drng_test
62
63 # NRL additions for Protolib, MDP, and NORM extensions
64 PROTOLIB = ./protolib
65 PROTOLIB_INCLUDES = -I$(PROTOLIB)/common -I$(PROTOLIB)/ns
66 MDP_INCLUDES = -Imdp/common -Imdp/ns -Imdp/unix
67 NORM_INCLUDES = -Inorm/common -Inorm/ns
68 MGEN_INCLUDES = -Imgen/common -Imgen/ns
69 NRL_INCLUDES = $(PROTOLIB_INCLUDES) $(MDP_INCLUDES) $(NORM_INCLUDES) $(MGEN_INCLUDES)
70
71 INCLUDES = \
72 -I. \
73 @V_INCLUDES@ \
74 -I./tcp -I./sctp -I./common -I./link -I./queue \
75 -I./adc -I./apps -I./mac -I./mobile -I./trace \
76 -I./routing -I./tools -I./classifier -I./mcast \
77 -I./diffusion3/lib/main -I./diffusion3/lib \
78 -I./diffusion3/lib/nr -I./diffusion3/ns \
79 -I./diffusion3/filter_core -I./asim/ -I./qs \
80 -I./diffserv -I./satellite \
81 -I./wpan \
82 $(NRL_INCLUDES)
83
84
85 LIB = \
86 @V_LIBS@ \
87 @V_LIB@ \
88 -lm @LIBS@
89 # -L@libdir@ \
90
91 # Additional flags for NRL Protolib/MDP/NORM extensions
92 # These flags have been tested on Linux
93 NRL_CFLAGS = -g -DNS2 -DSIMULATE -DUNIX -DPROTO_DEBUG -DHAVE_ASSERT -DHAVE_DIRFD \
94 -D_FILE_OFFSET_BITS=64
95
96 #NRL adds "$(NRL_CFLAGS)"
97 CFLAGS += $(CCOPT) $(DEFINE) $(NRL_CFLAGS)
98
99 # Explicitly define compilation rules since SunOS 4's make doesn't like gcc.
100 # Also, gcc does not remove the .o before forking 'as', which can be a
101 # problem if you don't own the file but can write to the directory.
102 # NRL Protolib/MDP/NORM code uses .cpp files so we added a suffix and rule
103 .SUFFIXES: .cc .cpp # $(.SUFFIXES)
104
105 .cc.o:
106 @rm -f $@
107 $(CPP) -c $(CFLAGS) $(INCLUDES) -o $@ $*.cc
108
109 .c.o:
110 @rm -f $@
111 $(CC) -c $(CFLAGS) $(INCLUDES) -o $@ $*.c
112
113 .cpp.o:
114 @rm -f $@
115 $(CPP) -c $(CFLAGS) $(INCLUDES) -o $@ $*.cpp
116
117
118 GEN_DIR = gen/
119 LIB_DIR = lib/
120 NS = ns
121 NSX = nsx
122 NSE = nse
123
124 # To allow conf/makefile.win overwrite this macro
125 # We will set these two macros to empty in conf/makefile.win since VC6.0
126 # does not seem to support the STL in gcc 2.8 and up.
127 OBJ_STL = diffusion3/lib/nr/nr.o diffusion3/lib/dr.o \
128 diffusion3/filters/diffusion/one_phase_pull.o \
129 diffusion3/filters/diffusion/two_phase_pull.o \
130 diffusion3/lib/diffapp.o \
131 diffusion3/ns/diffagent.o diffusion3/ns/diffrtg.o \
132 diffusion3/ns/difftimer.o \
133 diffusion3/filter_core/filter_core.o \
134 diffusion3/filter_core/iolog.o \
135 diffusion3/filter_core/iostats.o \
136 diffusion3/lib/main/attrs.o \
137 diffusion3/lib/main/events.o \
138 diffusion3/lib/main/iodev.o \
139 diffusion3/lib/main/iohook.o \
140 diffusion3/lib/main/timers.o \
141 diffusion3/lib/main/message.o \
142 diffusion3/lib/main/tools.o \
143 diffusion3/apps/gear_examples/gear_common.o \
144 diffusion3/apps/gear_examples/gear_receiver.o \
145 diffusion3/apps/gear_examples/gear_sender.o \
146 diffusion3/apps/rmst_examples/rmst_sink.o \
147 diffusion3/apps/rmst_examples/rmst_source.o \
148 diffusion3/apps/ping/1pp_ping_sender.o \
149 diffusion3/apps/ping/1pp_ping_receiver.o \
150 diffusion3/apps/ping/2pp_ping_sender.o \
151 diffusion3/apps/ping/2pp_ping_receiver.o \
152 diffusion3/apps/ping/ping_common.o \
153 diffusion3/apps/ping/push_receiver.o \
154 diffusion3/apps/ping/push_sender.o \
155 diffusion3/filters/gear/gear_attr.o \
156 diffusion3/filters/gear/gear.o \
157 diffusion3/filters/gear/gear_tools.o \
158 diffusion3/filters/misc/log.o \
159 diffusion3/filters/misc/srcrt.o \
160 diffusion3/filters/misc/tag.o \
161 diffusion3/filters/rmst/rmst.o \
162 diffusion3/filters/rmst/rmst_filter.o
163
164 NS_TCL_LIB_STL = tcl/lib/ns-diffusion.tcl
165
166
167
168 # WIN32: uncomment the following line to include specific make for VC++
169 # !include <conf/makefile.win>
170
171 OBJ_CC = \
172 tools/random.o tools/rng.o tools/ranvar.o common/misc.o common/timer-handler.o \
173 common/scheduler.o common/object.o common/packet.o \
174 common/ip.o routing/route.o common/connector.o common/ttl.o \
175 trace/trace.o trace/trace-ip.o \
176 classifier/classifier.o classifier/classifier-addr.o \
177 classifier/classifier-hash.o \
178 classifier/classifier-virtual.o \
179 classifier/classifier-mcast.o \
180 classifier/classifier-bst.o \
181 classifier/classifier-mpath.o mcast/replicator.o \
182 classifier/classifier-mac.o \
183 classifier/classifier-qs.o \
184 classifier/classifier-port.o src_rtg/classifier-sr.o \
185 src_rtg/sragent.o src_rtg/hdr_src.o adc/ump.o \
186 qs/qsagent.o qs/hdr_qs.o \
187 apps/app.o apps/telnet.o tcp/tcplib-telnet.o \
188 tools/trafgen.o trace/traffictrace.o tools/pareto.o \
189 tools/expoo.o tools/cbr_traffic.o \
190 adc/tbf.o adc/resv.o adc/sa.o tcp/saack.o \
191 tools/measuremod.o adc/estimator.o adc/adc.o adc/ms-adc.o \
192 adc/timewindow-est.o adc/acto-adc.o \
193 adc/pointsample-est.o adc/salink.o adc/actp-adc.o \
194 adc/hb-adc.o adc/expavg-est.o\
195 adc/param-adc.o adc/null-estimator.o \
196 adc/adaptive-receiver.o apps/vatrcvr.o adc/consrcvr.o \
197 common/agent.o common/message.o apps/udp.o \
198 common/session-rtp.o apps/rtp.o tcp/rtcp.o \
199 common/ivs.o \
200 common/messpass.o common/tp.o common/tpm.o apps/worm.o \
201 tcp/tcp.o tcp/tcp-sink.o tcp/tcp-reno.o \
202 tcp/tcp-newreno.o \
203 tcp/tcp-vegas.o tcp/tcp-rbp.o tcp/tcp-full.o tcp/rq.o \
204 baytcp/tcp-full-bay.o baytcp/ftpc.o baytcp/ftps.o \
205 tcp/scoreboard.o tcp/scoreboard-rq.o tcp/tcp-sack1.o tcp/tcp-fack.o \
206 tcp/tcp-asym.o tcp/tcp-asym-sink.o tcp/tcp-fs.o \
207 tcp/tcp-asym-fs.o tcp/tcp-qs.o \
208 tcp/tcp-int.o tcp/chost.o tcp/tcp-session.o \
209 tcp/nilist.o \
210 sctp/sctp.o apps/sctp_app1.o\
211 sctp/sctp-timestamp.o sctp/sctp-hbAfterRto.o \
212 sctp/sctp-multipleFastRtx.o sctp/sctp-mfrHbAfterRto.o \
213 sctp/sctp-mfrTimestamp.o \
214 sctp/sctpDebug.o \
215 tools/integrator.o tools/queue-monitor.o \
216 tools/flowmon.o tools/loss-monitor.o \
217 queue/queue.o queue/drop-tail.o \
218 adc/simple-intserv-sched.o queue/red.o \
219 queue/semantic-packetqueue.o queue/semantic-red.o \
220 tcp/ack-recons.o \
221 queue/sfq.o queue/fq.o queue/drr.o queue/srr.o queue/cbq.o \
222 queue/jobs.o queue/marker.o queue/demarker.o \
223 link/hackloss.o queue/errmodel.o queue/fec.o\
224 link/delay.o tcp/snoop.o \
225 gaf/gaf.o \
226 link/dynalink.o routing/rtProtoDV.o common/net-interface.o \
227 mcast/ctrMcast.o mcast/mcast_ctrl.o mcast/srm.o \
228 common/sessionhelper.o queue/delaymodel.o \
229 mcast/srm-ssm.o mcast/srm-topo.o \
230 routing/alloc-address.o routing/address.o \
231 $(LIB_DIR)int.Vec.o $(LIB_DIR)int.RVec.o \
232 $(LIB_DIR)dmalloc_support.o \
233 webcache/http.o webcache/tcp-simple.o webcache/pagepool.o \
234 webcache/inval-agent.o webcache/tcpapp.o webcache/http-aux.o \
235 webcache/mcache.o webcache/webtraf.o \
236 webcache/webserver.o \
237 webcache/logweb.o \
238 empweb/empweb.o \
239 empweb/empftp.o \
240 realaudio/realaudio.o \
241 mac/lanRouter.o classifier/filter.o \
242 common/pkt-counter.o \
243 common/Decapsulator.o common/Encapsulator.o \
244 common/encap.o \
245 mac/channel.o mac/mac.o mac/ll.o mac/mac-802_11.o \
246 mac/mac-802_3.o mac/mac-tdma.o mac/smac.o \
247 mobile/mip.o mobile/mip-reg.o mobile/gridkeeper.o \
248 mobile/propagation.o mobile/tworayground.o \
249 mobile/antenna.o mobile/omni-antenna.o \
250 mobile/shadowing.o mobile/shadowing-vis.o mobile/dumb-agent.o \
251 common/bi-connector.o common/node.o \
252 common/mobilenode.o \
253 mac/arp.o mobile/god.o mobile/dem.o \
254 mobile/topography.o mobile/modulation.o \
255 queue/priqueue.o queue/dsr-priqueue.o \
256 mac/phy.o mac/wired-phy.o mac/wireless-phy.o \
257 mac/mac-timers.o trace/cmu-trace.o mac/varp.o \
258 mac/mac-simple.o \
259 satellite/sat-hdlc.o \
260 dsdv/dsdv.o dsdv/rtable.o queue/rtqueue.o \
261 routing/rttable.o \
262 imep/imep.o imep/dest_queue.o imep/imep_api.o \
263 imep/imep_rt.o imep/rxmit_queue.o imep/imep_timers.o \
264 imep/imep_util.o imep/imep_io.o \
265 tora/tora.o tora/tora_api.o tora/tora_dest.o \
266 tora/tora_io.o tora/tora_logs.o tora/tora_neighbor.o \
267 dsr/dsragent.o dsr/hdr_sr.o dsr/mobicache.o dsr/path.o \
268 dsr/requesttable.o dsr/routecache.o dsr/add_sr.o \
269 dsr/dsr_proto.o dsr/flowstruct.o dsr/linkcache.o \
270 dsr/simplecache.o dsr/sr_forwarder.o \
271 aodv/aodv_logs.o aodv/aodv.o \
272 aodv/aodv_rtable.o aodv/aodv_rqueue.o \
273 common/ns-process.o \
274 satellite/satgeometry.o satellite/sathandoff.o \
275 satellite/satlink.o satellite/satnode.o \
276 satellite/satposition.o satellite/satroute.o \
277 satellite/sattrace.o \
278 rap/raplist.o rap/rap.o rap/media-app.o rap/utilities.o \
279 common/fsm.o tcp/tcp-abs.o \
280 diffusion/diffusion.o diffusion/diff_rate.o diffusion/diff_prob.o \
281 diffusion/diff_sink.o diffusion/flooding.o diffusion/omni_mcast.o \
282 diffusion/hash_table.o diffusion/routing_table.o diffusion/iflist.o \
283 tcp/tfrc.o tcp/tfrc-sink.o mobile/energy-model.o apps/ping.o tcp/tcp-rfc793edu.o \
284 queue/rio.o queue/semantic-rio.o tcp/tcp-sack-rh.o tcp/scoreboard-rh.o \
285 plm/loss-monitor-plm.o plm/cbr-traffic-PP.o \
286 linkstate/hdr-ls.o \
287 mpls/classifier-addr-mpls.o mpls/ldp.o mpls/mpls-module.o \
288 routing/rtmodule.o classifier/classifier-hier.o \
289 routing/addr-params.o \
290 nix/hdr_nv.o nix/classifier-nix.o \
291 nix/nixnode.o \
292 routealgo/rnode.o \
293 routealgo/bfs.o \
294 routealgo/rbitmap.o \
295 routealgo/rlookup.o \
296 routealgo/routealgo.o \
297 nix/nixvec.o \
298 nix/nixroute.o \
299 diffserv/dsred.o diffserv/dsredq.o \
300 diffserv/dsEdge.o diffserv/dsCore.o \
301 diffserv/dsPolicy.o diffserv/ew.o diffserv/dewp.o \
302 queue/red-pd.o queue/pi.o queue/vq.o queue/rem.o \
303 queue/gk.o \
304 pushback/rate-limit.o pushback/rate-limit-strategy.o \
305 pushback/ident-tree.o pushback/agg-spec.o \
306 pushback/logging-data-struct.o \
307 pushback/rate-estimator.o \
308 pushback/pushback-queue.o pushback/pushback.o \
309 common/parentnode.o trace/basetrace.o \
310 common/simulator.o asim/asim.o \
311 common/scheduler-map.o common/splay-scheduler.o \
312 linkstate/ls.o linkstate/rtProtoLS.o \
313 pgm/classifier-pgm.o pgm/pgm-agent.o pgm/pgm-sender.o \
314 pgm/pgm-receiver.o mcast/rcvbuf.o \
315 mcast/classifier-lms.o mcast/lms-agent.o mcast/lms-receiver.o \
316 mcast/lms-sender.o \
317 queue/delayer.o \
318 xcp/xcpq.o xcp/xcp.o xcp/xcp-end-sys.o \
319 wpan/p802_15_4csmaca.o wpan/p802_15_4fail.o \
320 wpan/p802_15_4hlist.o wpan/p802_15_4mac.o \
321 wpan/p802_15_4nam.o wpan/p802_15_4phy.o \
322 wpan/p802_15_4sscs.o wpan/p802_15_4timer.o \
323 wpan/p802_15_4trace.o wpan/p802_15_4transac.o \
324 @V_STLOBJ@
325
326
327 # don't allow comments to follow continuation lines
328
329 # mac-csma.o mac-multihop.o\
330 # sensor-nets/landmark.o mac-simple-wireless.o \
331 # sensor-nets/tags.o sensor-nets/sensor-query.o \
332 # sensor-nets/flood-agent.o \
333
334 # what was here before is now in emulate/
335 OBJ_C =
336
337 OBJ_COMPAT = $(OBJ_GETOPT) common/win32.o
338 #XXX compat/win32x.o compat/tkConsole.o
339
340 OBJ_EMULATE_CC = \
341 emulate/net-ip.o \
342 emulate/net.o \
343 emulate/tap.o \
344 emulate/ether.o \
345 emulate/internet.o \
346 emulate/ping_responder.o \
347 emulate/arp.o \
348 emulate/icmp.o \
349 emulate/net-pcap.o \
350 emulate/nat.o \
351 emulate/iptap.o \
352 emulate/tcptap.o
353
354 OBJ_EMULATE_C = \
355 emulate/inet.o
356
357 OBJ_GEN = $(GEN_DIR)version.o $(GEN_DIR)ns_tcl.o $(GEN_DIR)ptypes.o
358
359 #NRL additions
360 OBJ_PROTOLIB_CPP = \
361 $(PROTOLIB)/ns/nsProtoSimAgent.o $(PROTOLIB)/common/protoSimAgent.o \
362 $(PROTOLIB)/common/protoSimSocket.o $(PROTOLIB)/common/protoAddress.o \
363 $(PROTOLIB)/common/protoTimer.o $(PROTOLIB)/common/protoExample.o \
364 $(PROTOLIB)/common/protoDebug.o $(PROTOLIB)/common/protoTree.o \
365 $(PROTOLIB)/ns/nsRouteMgr.o $(PROTOLIB)/common/protoRouteTable.o \
366 $(PROTOLIB)/common/protoBitmask.o $(PROTOLIB)/ns/nsProtoManetKernel.o \
367 $(PROTOLIB)/common/protoTime.o $(PROTOLIB)/ns/tcp/TCPData.o \
368 $(PROTOLIB)/ns/tcp/SimpleList.o $(PROTOLIB)/ns/tcp/TCPSocketApp.o \
369 $(PROTOLIB)/ns/tcp/TCPEvent.o $(PROTOLIB)/ns/tcp/TCPSocketAgent.o \
370 $(PROTOLIB)/ns/tcp/TCPServerSocketAgent.o $(PROTOLIB)/ns/tcp/TCPSocketFactory.o \
371 $(PROTOLIB)/ns/tcp/TCPSocketExample.o $(PROTOLIB)/ns/nsTCPProtoSocketAgent.o
372
373
374 MDP = ./mdp
375 OBJ_MDP_CPP = \
376 $(MDP)/ns/nsMdpAgent.o $(MDP)/common/mdpSimAgent.o \
377 $(MDP)/common/mdpBitMask.o $(MDP)/common/mdpMessage.o \
378 $(MDP)/common/mdpEncoder.o $(MDP)/common/mdpGalois.o \
379 $(MDP)/common/mdpSession.o $(MDP)/common/mdpMsgHandler.o \
380 $(MDP)/common/mdpNode.o $(MDP)/common/mdpObject.o \
381 $(MDP)/unix/mdpFile.o
382
383 NORM = ./norm
384 OBJ_NORM_CPP = \
385 $(NORM)/ns/nsNormAgent.o $(NORM)/common/normSimAgent.o \
386 $(NORM)/common/normMessage.o $(NORM)/common/normSession.o \
387 $(NORM)/common/normNode.o $(NORM)/common/normObject.o \
388 $(NORM)/common/normSegment.o $(NORM)/common/normFile.o \
389 $(NORM)/common/normEncoder.o $(NORM)/common/galois.o
390
391 MGEN = ./mgen
392 OBJ_MGEN_CPP = \
393 $(MGEN)/ns/nsMgenAgent.o \
394 $(MGEN)/common/mgen.o $(MGEN)/common/mgenEvent.o \
395 $(MGEN)/common/mgenFlow.o $(MGEN)/common/mgenMsg.o \
396 $(MGEN)/common/mgenTransportList.o $(MGEN)/common/mgenPattern.o \
397 $(MGEN)/common/mgenPayload.o $(MGEN)/common/mgenSequencer.o
398
399 OBJ_NRL_CPP = $(OBJ_PROTOLIB_CPP) $(OBJ_MDP_CPP) $(OBJ_NORM_CPP) $(OBJ_MGEN_CPP)
400
401 SRC = $(OBJ_C:.o=.c) $(OBJ_CC:.o=.cc) \
402 $(OBJ_EMULATE_C:.o=.c) $(OBJ_EMULATE_CC:.o=.cc) \
403 common/tclAppInit.cc common/tkAppInit.cc
404
405 #NRL adds "$(OBJ_NRL_CPP)" here
406 OBJ = $(OBJ_C) $(OBJ_CC) $(OBJ_GEN) $(OBJ_COMPAT) $(OBJ_NRL_CPP)
407
408 CLEANFILES = ns nse nsx ns.dyn $(OBJ) $(OBJ_EMULATE_CC) \
409 $(OBJ_EMULATE_C) common/tclAppInit.o \
410 $(GEN_DIR)* $(NS).core core core.$(NS) core.$(NSX) core.$(NSE) \
411 common/ptypes2tcl common/ptypes2tcl.o
412
413 SUBDIRS=\
414 indep-utils/cmu-scen-gen/setdest \
415 indep-utils/webtrace-conv/dec \
416 indep-utils/webtrace-conv/epa \
417 indep-utils/webtrace-conv/nlanr \
418 indep-utils/webtrace-conv/ucb
419
420 BUILD_NSE = @build_nse@
421
422 all: $(NS) $(BUILD_NSE) all-recursive
423
424
425 all-recursive:
426 for i in $(SUBDIRS); do ( cd $$i; $(MAKE) all; ) done
427
428 $(NS): $(OBJ) common/tclAppInit.o Makefile
429 $(LINK) $(LDFLAGS) $(LDOUT)$@ \
430 common/tclAppInit.o $(OBJ) $(LIB)
431
432 Makefile: Makefile.in
433 @echo "Makefile.in is newer than Makefile."
434 @echo "You need to re-run configure."
435 false
436
437 $(NSE): $(OBJ) common/tclAppInit.o $(OBJ_EMULATE_CC) $(OBJ_EMULATE_C)
438 $(LINK) $(LDFLAGS) $(LDOUT)$@ \
439 common/tclAppInit.o $(OBJ) \
440 $(OBJ_EMULATE_CC) $(OBJ_EMULATE_C) $(LIB)
441
442 ns.dyn: $(OBJ) common/tclAppInit.o
443 $(LINK) $(LDFLAGS) -o $@ \
444 common/tclAppInit.o $(OBJ) $(LIB)
445
446 PURIFY = purify -cache-dir=/tmp
447 ns-pure: $(OBJ) common/tclAppInit.o
448 $(PURIFY) $(LINK) $(LDFLAGS) -o $@ \
449 common/tclAppInit.o $(OBJ) $(LIB)
450
451 NS_TCL_LIB = \
452 tcl/lib/ns-compat.tcl \
453 tcl/lib/ns-default.tcl \
454 tcl/lib/ns-errmodel.tcl \
455 tcl/lib/ns-lib.tcl \
456 tcl/lib/ns-link.tcl \
457 tcl/lib/ns-mobilenode.tcl \
458 tcl/lib/ns-sat.tcl \
459 tcl/lib/ns-cmutrace.tcl \
460 tcl/lib/ns-node.tcl \
461 tcl/lib/ns-rtmodule.tcl \
462 tcl/lib/ns-hiernode.tcl \
463 tcl/lib/ns-packet.tcl \
464 tcl/lib/ns-queue.tcl \
465 tcl/lib/ns-source.tcl \
466 tcl/lib/ns-nam.tcl \
467 tcl/lib/ns-trace.tcl \
468 tcl/lib/ns-agent.tcl \
469 tcl/lib/ns-random.tcl \
470 tcl/lib/ns-namsupp.tcl \
471 tcl/lib/ns-address.tcl \
472 tcl/lib/ns-intserv.tcl \
473 tcl/lib/ns-autoconf.tcl \
474 tcl/rtp/session-rtp.tcl \
475 tcl/lib/ns-mip.tcl \
476 tcl/rtglib/dynamics.tcl \
477 tcl/rtglib/route-proto.tcl \
478 tcl/rtglib/algo-route-proto.tcl \
479 tcl/rtglib/ns-rtProtoLS.tcl \
480 tcl/interface/ns-iface.tcl \
481 tcl/mcast/BST.tcl \
482 tcl/mcast/ns-mcast.tcl \
483 tcl/mcast/McastProto.tcl \
484 tcl/mcast/DM.tcl \
485 tcl/mcast/srm.tcl \
486 tcl/mcast/srm-adaptive.tcl \
487 tcl/mcast/srm-ssm.tcl \
488 tcl/mcast/timer.tcl \
489 tcl/mcast/McastMonitor.tcl \
490 tcl/mobility/dsdv.tcl \
491 tcl/mobility/dsr.tcl \
492 tcl/ctr-mcast/CtrMcast.tcl \
493 tcl/ctr-mcast/CtrMcastComp.tcl \
494 tcl/ctr-mcast/CtrRPComp.tcl \
495 tcl/rlm/rlm.tcl \
496 tcl/rlm/rlm-ns.tcl \
497 tcl/session/session.tcl \
498 tcl/lib/ns-route.tcl \
499 tcl/emulate/ns-emulate.tcl \
500 tcl/lan/vlan.tcl \
501 tcl/lan/abslan.tcl \
502 tcl/lan/ns-ll.tcl \
503 tcl/lan/ns-mac.tcl \
504 tcl/webcache/http-agent.tcl \
505 tcl/webcache/http-server.tcl \
506 tcl/webcache/http-cache.tcl \
507 tcl/webcache/http-mcache.tcl \
508 tcl/webcache/webtraf.tcl \
509 tcl/webcache/empweb.tcl \
510 tcl/webcache/empftp.tcl \
511 tcl/plm/plm.tcl \
512 tcl/plm/plm-ns.tcl \
513 tcl/plm/plm-topo.tcl \
514 tcl/mpls/ns-mpls-classifier.tcl \
515 tcl/mpls/ns-mpls-ldpagent.tcl \
516 tcl/mpls/ns-mpls-node.tcl \
517 tcl/mpls/ns-mpls-simulator.tcl \
518 tcl/lib/ns-pushback.tcl \
519 tcl/lib/ns-srcrt.tcl \
520 tcl/mcast/ns-lms.tcl \
521 tcl/lib/ns-qsnode.tcl \
522 @V_NS_TCL_LIB_STL@
523
524 $(GEN_DIR)ns_tcl.cc: $(NS_TCL_LIB)
525 $(TCLSH) bin/tcl-expand.tcl tcl/lib/ns-lib.tcl @V_NS_TCL_LIB_STL@ | $(TCL2C) et_ns_lib > $@
526
527 $(GEN_DIR)version.c: VERSION
528 $(RM) $@
529 $(TCLSH) bin/string2c.tcl version_string < VERSION > $@
530
531 $(GEN_DIR)ptypes.cc: common/ptypes2tcl common/packet.h
532 ./common/ptypes2tcl > $@
533
534 common/ptypes2tcl: common/ptypes2tcl.o
535 $(LINK) $(LDFLAGS) $(LDOUT)$@ common/ptypes2tcl.o
536
537 common/ptypes2tcl.o: common/ptypes2tcl.cc common/packet.h
538
539 dirs:
540 for d in $(DESTDIR)$(MANDEST)/man1; do \
541 if [ ! -d $$d ]; then \
542 mkdir -p $$d ;\
543 fi;\
544 done
545
546
547 install: dirs force install-ns install-man
548
549 install-ns: force
550 $(INSTALL) -m 755 ns $(DESTDIR)$(BINDEST)
551
552 install-man: force
553 $(INSTALL) -m 644 ns.1 $(DESTDIR)$(MANDEST)/man1
554
555 install-recursive: force
556 for i in $(SUBDIRS); do ( cd $$i; $(MAKE) install; ) done
557
558 clean:
559 $(RM) $(CLEANFILES)
560
561 #NRL adds "nrlclean"
562 nrlclean:
563 $(RM) $(OBJ_NRL_CPP)
564
565 AUTOCONF_GEN = tcl/lib/ns-autoconf.tcl
566 distclean: distclean-recursive
567 $(RM) $(CLEANFILES) Makefile config.cache config.log config.status \
568 autoconf.h gnuc.h os-proto.h $(AUTOCONF_GEN); \
569 $(MV) .configure .configure- ;\
570 echo "Moved .configure to .configure-"
571
572 distclean-recursive:
573 for i in $(SUBDIRS); do ( cd $$i; $(MAKE) clean; $(RM) Makefile; ) done
574
575 tags: force
576 ctags -wtd *.cc *.h webcache/*.cc webcache/*.h dsdv/*.cc dsdv/*.h \
577 dsr/*.cc dsr/*.h webcache/*.cc webcache/*.h lib/*.cc lib/*.h \
578 ../Tcl/*.cc ../Tcl/*.h
579
580 TAGS: force
581 etags *.cc *.h webcache/*.cc webcache/*.h dsdv/*.cc dsdv/*.h \
582 dsr/*.cc dsr/*.h webcache/*.cc webcache/*.h lib/*.cc lib/*.h \
583 ../Tcl/*.cc ../Tcl/*.h
584
585 tcl/lib/TAGS: force
586 ( \
587 cd tcl/lib; \
588 $(TCLSH) ../../bin/tcl-expand.tcl ns-lib.tcl | grep '^### tcl-expand.tcl: begin' | awk '{print $$5}' >.tcl_files; \
589 etags --lang=none -r '/^[ \t]*proc[ \t]+\([^ \t]+\)/\1/' `cat .tcl_files`; \
590 etags --append --lang=none -r '/^\([A-Z][^ \t]+\)[ \t]+\(instproc\|proc\)[ \t]+\([^ \t]+\)[ \t]+/\1::\3/' `cat .tcl_files`; \
591 )
592
593 depend: $(SRC)
594 $(MKDEP) -- $(CFLAGS) -- -Y $(SRC) >& /dev/null
595
596 srctar:
597 @cwd=`pwd` ; dir=`basename $$cwd` ; \
598 name=ns-`cat VERSION | tr A-Z a-z` ; \
599 tar=ns-src-`cat VERSION`.tar.gz ; \
600 list="" ; \
601 for i in `cat FILES` ; do list="$$list $$name/$$i" ; done; \
602 echo \
603 "(rm -f $$tar; cd .. ; ln -s $$dir $$name)" ; \
604 (rm -f $$tar; cd .. ; ln -s $$dir $$name) ; \
605 echo \
606 "(cd .. ; tar cfh $$tar [lots of files])" ; \
607 (cd .. ; tar cfh - $$list) | gzip -c > $$tar ; \
608 echo \
609 "rm ../$$name; chmod 444 $$tar" ; \
610 rm ../$$name; chmod 444 $$tar
611
612 force:
613
614 test: force
615 ./validate
616
617 # Create makefile.vc for Win32 development by replacing:
618 # "# !include ..." -> "!include ..."
619 makefile.vc: Makefile.in
620 $(PERL) bin/gen-vcmake.pl < Makefile.in > makefile.vc
621 # $(PERL) -pe 's/^# (\!include)/\!include/o' < Makefile.in > makefile.vc