Debian Codegraph @

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