Debian Codegraph @

protolib/src/sim/ns/ns233/ns233-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 LINK_SHLIB = @SHLIB_LD@
40 MKDEP = ./conf/mkdep
41 TCLSH = @V_TCLSH@
42 TCL2C = @V_TCL2CPP@
43 AR = ar rc $(BLANK)
44
45 RANLIB = @V_RANLIB@
46 INSTALL = @INSTALL@
47 LN = ln
48 TEST = test
49 RM = rm -f
50 MV = mv
51 PERL = @PERL@
52
53 # for diffusion
54 #DIFF_INCLUDES = "./diffusion3/main ./diffusion3/lib ./diffusion3/nr ./diffusion3/ns"
55
56 CCOPT = @V_CCOPT@
57 STATIC = @V_STATIC@
58 #LDFLAGS = $(STATIC)
59 LDFLAGS = @LDFLAGS@
60 LDOUT = -o $(BLANK)
61
62 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
63
64 ###################### Definitions for NRL Extensions #########################
65
66 ########################### PROTOLIB Section #######################
67
68 # These flags work on Linux
69 PROTOLIB_CFLAGS = -DUNIX -DNS2 -DPROTO_DEBUG -DSIMULATE -DHAVE_ASSERT -DHAVE_DIRFD
70 PROTOLIB = ./protolib
71 PROTOLIB_INCLUDES = -I$(PROTOLIB)/include -I$(PROTOLIB)/src/sim/ns
72 OBJ_PROTOLIB_CPP = \
73 protolib/src/sim/ns/nsProtoSimAgent.o protolib/src/common/protoSimAgent.o \
74 protolib/src/common/protoSimSocket.o protolib/src/common/protoAddress.o \
75 protolib/src/common/protoTimer.o protolib/examples/protoExample.o \
76 protolib/src/common/protoDebug.o protolib/src/common/protoTree.o \
77 protolib/src/common/protoList.o protolib/src/common/protoRouteMgr.o \
78 protolib/src/sim/ns/nsRouteMgr.o protolib/src/common/protoRouteTable.o \
79 protolib/src/common/protoBitmask.o protolib/src/sim/ns/nsProtoManetKernel.o \
80 protolib/src/common/protoTime.o protolib/src/sim/ns/tcp/TCPData.o \
81 protolib/src/sim/ns/tcp/SimpleList.o protolib/src/sim/ns/tcp/TCPSocketApp.o \
82 protolib/src/sim/ns/tcp/TCPEvent.o protolib/src/sim/ns/tcp/TCPSocketAgent.o \
83 protolib/src/sim/ns/tcp/TCPServerSocketAgent.o protolib/src/sim/ns/tcp/TCPSocketFactory.o \
84 protolib/src/sim/ns/tcp/TCPSocketExample.o protolib/src/sim/ns/nsTCPProtoSocketAgent.o
85
86 ############################## Other NRL Stuff ########################
87
88 # MGEN
89 MGEN_INCLUDES = -Imgen/include -Imgen/src/sim/ns -Imgen/src/sim
90 OBJ_MGEN_CPP = \
91 mgen/src/sim/ns/nsMgenAgent.o \
92 mgen/src/sim/mgenSimSinkTransport.o \
93 mgen/src/common/mgen.o mgen/src/common/mgenEvent.o \
94 mgen/src/common/mgenTransport.o \
95 mgen/src/common/mgenFlow.o mgen/src/common/mgenMsg.o \
96 mgen/src/common/mgenPattern.o \
97 mgen/src/common/mgenSequencer.o mgen/src/common/mgenPayload.o
98
99
100 # NORM
101 NORM_INCLUDES = -Inorm/src/common -Inorm/include
102 OBJ_NORM_CPP = \
103 norm/src/sim/ns/nsNormAgent.o norm/src/common/normSimAgent.o \
104 norm/src/common/normMessage.o norm/src/common/normSession.o \
105 norm/src/common/normNode.o norm/src/common/normObject.o \
106 norm/src/common/normSegment.o norm/src/common/normEncoder.o \
107 norm/src/common/normEncoderRS8.o norm/src/common/normEncoderRS16.o \
108 norm/src/common/normEncoderMDP.o norm/src/common/galois.o \
109 norm/src/common/normFile.o
110
111 # NRLOLSR
112 NRLOLSR_INCLUDES = -Inrlolsr/common -Inrlolsr/ns
113 OBJ_NRLOLSR_CPP = \
114 nrlolsr/common/nbr_queue.o nrlolsr/common/nrlolsr.o \
115 nrlolsr/common/olsr_packet_types.o nrlolsr/ns/nrlolsrAgent.o \
116 nrlolsr/ns/smfDupTree.o nrlolsr/ns/smfWindow.o
117
118
119 NRL_CFLAGS = $(PROTOLIB_CFLAGS)
120 NRL_INCLUDES = $(PROTOLIB_INCLUDES) \
121 $(MGEN_INCLUDES) \
122 $(NORM_INCLUDES) \
123 $(NRLOLSR_INCLUDES)
124 OBJ_NRL_CPP = $(OBJ_PROTOLIB_CPP) \
125 $(OBJ_MGEN_CPP) \
126 $(OBJ_NORM_CPP) \
127 $(OBJ_NRLOLSR_CPP)
128
129 ###############################################################################
130
131 INCLUDES = \
132 -I. @V_INCLUDE_X11@ \
133 -I. \
134 @V_INCLUDES@ \
135 -I../tclcl-1.19 -I../otcl-1.13 -I./include -I/usr/include/pcap \
136 -I./tcp -I./sctp -I./common -I./link -I./queue \
137 -I./adc -I./apps -I./mac -I./mobile -I./trace \
138 -I./routing -I./tools -I./classifier -I./mcast \
139 -I./diffusion3/lib/main -I./diffusion3/lib \
140 -I./diffusion3/lib/nr -I./diffusion3/ns \
141 -I./diffusion3/filter_core -I./asim/ -I./qs \
142 -I./diffserv -I./satellite \
143 -I./wpan \
144 $(NRL_INCLUDES)
145
146 LIB = \
147 @V_LIBS@ \
148 @V_LIB_X11@ \
149 @V_LIB@ \
150 -lm @LIBS@
151 # -L@libdir@ \
152
153 CFLAGS = -g $(CCOPT) $(DEFINE) $(NRL_CFLAGS)
154
155 # Explicitly define compilation rules since SunOS 4's make doesn't like gcc.
156 # Also, gcc does not remove the .o before forking 'as', which can be a
157 # problem if you don't own the file but can write to the directory.
158 .SUFFIXES: .cc .cpp # $(.SUFFIXES)
159
160 .cc.o:
161 @rm -f $@
162 $(CPP) -c $(CFLAGS) $(INCLUDES) -o $@ $*.cc
163
164 .c.o:
165 @rm -f $@
166 $(CC) -c $(CFLAGS) $(INCLUDES) -o $@ $*.c
167
168 .cpp.o:
169 @rm -f $@
170 $(CPP) -c $(CFLAGS) $(INCLUDES) -o $@ $*.cpp
171
172 GEN_DIR = gen/
173 LIB_DIR = lib/
174 NS = ns
175 NSLIB = @NSLIB@
176 NSX = nsx
177 NSE = nse
178 NSTK = nstk
179
180 # To allow conf/makefile.win overwrite this macro
181 # We will set these two macros to empty in conf/makefile.win since VC6.0
182 # does not seem to support the STL in gcc 2.8 and up.
183 OBJ_STL = diffusion3/lib/nr/nr.o diffusion3/lib/dr.o \
184 diffusion3/filters/diffusion/one_phase_pull.o \
185 diffusion3/filters/diffusion/two_phase_pull.o \
186 diffusion3/lib/diffapp.o \
187 diffusion3/ns/diffagent.o diffusion3/ns/diffrtg.o \
188 diffusion3/ns/difftimer.o \
189 diffusion3/filter_core/filter_core.o \
190 diffusion3/filter_core/iolog.o \
191 diffusion3/filter_core/iostats.o \
192 diffusion3/lib/main/attrs.o \
193 diffusion3/lib/main/events.o \
194 diffusion3/lib/main/iodev.o \
195 diffusion3/lib/main/iohook.o \
196 diffusion3/lib/main/timers.o \
197 diffusion3/lib/main/message.o \
198 diffusion3/lib/main/tools.o \
199 diffusion3/apps/gear_examples/gear_common.o \
200 diffusion3/apps/gear_examples/gear_receiver.o \
201 diffusion3/apps/gear_examples/gear_sender.o \
202 diffusion3/apps/rmst_examples/rmst_sink.o \
203 diffusion3/apps/rmst_examples/rmst_source.o \
204 diffusion3/apps/ping/1pp_ping_sender.o \
205 diffusion3/apps/ping/1pp_ping_receiver.o \
206 diffusion3/apps/ping/2pp_ping_sender.o \
207 diffusion3/apps/ping/2pp_ping_receiver.o \
208 diffusion3/apps/ping/ping_common.o \
209 diffusion3/apps/ping/push_receiver.o \
210 diffusion3/apps/ping/push_sender.o \
211 diffusion3/filters/gear/gear_attr.o \
212 diffusion3/filters/gear/gear.o \
213 diffusion3/filters/gear/gear_tools.o \
214 diffusion3/filters/misc/log.o \
215 diffusion3/filters/misc/srcrt.o \
216 diffusion3/filters/misc/tag.o \
217 diffusion3/filters/rmst/rmst.o \
218 diffusion3/filters/rmst/rmst_filter.o \
219 delaybox/delaybox.o \
220 packmime/packmime_HTTP.o packmime/packmime_HTTP_rng.o \
221 packmime/packmime_OL.o packmime/packmime_OL_ranvar.o\
222 packmime/packmime_ranvar.o
223
224 NS_TCL_LIB_STL = tcl/lib/ns-diffusion.tcl \
225 tcl/delaybox/delaybox.tcl \
226 tcl/packmime/packmime.tcl
227
228
229 # WIN32: uncomment the following line to include specific make for VC++
230 # !include <conf/makefile.win>
231
232 OBJ_CC = \
233 tools/random.o tools/rng.o tools/ranvar.o common/misc.o common/timer-handler.o \
234 common/scheduler.o common/object.o common/packet.o \
235 common/ip.o routing/route.o common/connector.o common/ttl.o \
236 trace/trace.o trace/trace-ip.o \
237 classifier/classifier.o classifier/classifier-addr.o \
238 classifier/classifier-hash.o \
239 classifier/classifier-virtual.o \
240 classifier/classifier-mcast.o \
241 classifier/classifier-bst.o \
242 classifier/classifier-mpath.o mcast/replicator.o \
243 classifier/classifier-mac.o \
244 classifier/classifier-qs.o \
245 classifier/classifier-port.o src_rtg/classifier-sr.o \
246 src_rtg/sragent.o src_rtg/hdr_src.o adc/ump.o \
247 qs/qsagent.o qs/hdr_qs.o \
248 apps/app.o apps/telnet.o tcp/tcplib-telnet.o \
249 tools/trafgen.o trace/traffictrace.o tools/pareto.o \
250 tools/expoo.o tools/cbr_traffic.o \
251 adc/tbf.o adc/resv.o adc/sa.o tcp/saack.o \
252 tools/measuremod.o adc/estimator.o adc/adc.o adc/ms-adc.o \
253 adc/timewindow-est.o adc/acto-adc.o \
254 adc/pointsample-est.o adc/salink.o adc/actp-adc.o \
255 adc/hb-adc.o adc/expavg-est.o\
256 adc/param-adc.o adc/null-estimator.o \
257 adc/adaptive-receiver.o apps/vatrcvr.o adc/consrcvr.o \
258 common/agent.o common/message.o apps/udp.o \
259 common/session-rtp.o apps/rtp.o tcp/rtcp.o \
260 common/ivs.o \
261 common/messpass.o common/tp.o common/tpm.o apps/worm.o \
262 tcp/tcp.o tcp/tcp-sink.o tcp/tcp-reno.o \
263 tcp/tcp-newreno.o \
264 tcp/tcp-vegas.o tcp/tcp-rbp.o tcp/tcp-full.o tcp/rq.o \
265 baytcp/tcp-full-bay.o baytcp/ftpc.o baytcp/ftps.o \
266 tcp/scoreboard.o tcp/scoreboard-rq.o tcp/tcp-sack1.o tcp/tcp-fack.o \
267 tcp/linux/tcp_naivereno.o\
268 tcp/linux/src/tcp_cong.o\
269 tcp/linux/src/tcp_highspeed.o tcp/linux/src/tcp_bic.o tcp/linux/src/tcp_htcp.o tcp/linux/src/tcp_scalable.o tcp/linux/src/tcp_cubic.o\
270 tcp/linux/src/tcp_westwood.o tcp/linux/src/tcp_vegas.o tcp/linux/src/tcp_hybla.o\
271 tcp/linux/src/tcp_illinois.o tcp/linux/src/tcp_yeah.o \
272 tcp/linux/src/tcp_veno.o tcp/linux/src/tcp_compound.o tcp/linux/src/tcp_lp.o\
273 tcp/scoreboard1.o tcp/tcp-linux.o tcp/linux/ns-linux-util.o tcp/linux/ns-linux-c.o tcp/linux/ns-linux-param.o\
274 tcp/tcp-asym.o tcp/tcp-asym-sink.o tcp/tcp-fs.o \
275 tcp/tcp-asym-fs.o \
276 tcp/tcp-int.o tcp/chost.o tcp/tcp-session.o \
277 tcp/nilist.o \
278 sctp/sctp.o apps/sctp_app1.o\
279 sctp/sctp-timestamp.o sctp/sctp-hbAfterRto.o \
280 sctp/sctp-multipleFastRtx.o sctp/sctp-mfrHbAfterRto.o \
281 sctp/sctp-mfrTimestamp.o \
282 sctp/sctp-cmt.o \
283 sctp/sctpDebug.o \
284 tools/integrator.o tools/queue-monitor.o \
285 tools/flowmon.o tools/loss-monitor.o \
286 queue/queue.o queue/drop-tail.o \
287 adc/simple-intserv-sched.o queue/red.o \
288 queue/semantic-packetqueue.o queue/semantic-red.o \
289 tcp/ack-recons.o \
290 queue/sfq.o queue/fq.o queue/drr.o queue/srr.o queue/cbq.o \
291 queue/jobs.o queue/marker.o queue/demarker.o \
292 link/hackloss.o queue/errmodel.o queue/fec.o\
293 link/delay.o tcp/snoop.o \
294 gaf/gaf.o \
295 link/dynalink.o routing/rtProtoDV.o common/net-interface.o \
296 mcast/ctrMcast.o mcast/mcast_ctrl.o mcast/srm.o \
297 common/sessionhelper.o queue/delaymodel.o \
298 mcast/srm-ssm.o mcast/srm-topo.o \
299 routing/alloc-address.o routing/address.o \
300 $(LIB_DIR)int.Vec.o $(LIB_DIR)int.RVec.o \
301 $(LIB_DIR)dmalloc_support.o \
302 webcache/http.o webcache/tcp-simple.o webcache/pagepool.o \
303 webcache/inval-agent.o webcache/tcpapp.o webcache/http-aux.o \
304 webcache/mcache.o webcache/webtraf.o \
305 webcache/webserver.o \
306 webcache/logweb.o \
307 empweb/empweb.o \
308 empweb/empftp.o \
309 realaudio/realaudio.o \
310 mac/lanRouter.o classifier/filter.o \
311 common/pkt-counter.o \
312 common/Decapsulator.o common/Encapsulator.o \
313 common/encap.o \
314 mac/channel.o mac/mac.o mac/ll.o mac/mac-802_11.o \
315 mac/mac-802_11Ext.o \
316 mac/mac-802_3.o mac/mac-tdma.o mac/smac.o \
317 mobile/mip.o mobile/mip-reg.o mobile/gridkeeper.o \
318 mobile/propagation.o mobile/tworayground.o \
319 mobile/nakagami.o \
320 mobile/antenna.o mobile/omni-antenna.o \
321 mobile/shadowing.o mobile/shadowing-vis.o mobile/dumb-agent.o \
322 common/bi-connector.o common/node.o \
323 common/mobilenode.o \
324 mac/arp.o mobile/god.o mobile/dem.o \
325 mobile/topography.o mobile/modulation.o \
326 queue/priqueue.o queue/dsr-priqueue.o \
327 mac/phy.o mac/wired-phy.o mac/wireless-phy.o \
328 mac/wireless-phyExt.o \
329 mac/mac-timers.o trace/cmu-trace.o mac/varp.o \
330 mac/mac-simple.o \
331 satellite/sat-hdlc.o \
332 dsdv/dsdv.o dsdv/rtable.o queue/rtqueue.o \
333 routing/rttable.o \
334 imep/imep.o imep/dest_queue.o imep/imep_api.o \
335 imep/imep_rt.o imep/rxmit_queue.o imep/imep_timers.o \
336 imep/imep_util.o imep/imep_io.o \
337 tora/tora.o tora/tora_api.o tora/tora_dest.o \
338 tora/tora_io.o tora/tora_logs.o tora/tora_neighbor.o \
339 dsr/dsragent.o dsr/hdr_sr.o dsr/mobicache.o dsr/path.o \
340 dsr/requesttable.o dsr/routecache.o dsr/add_sr.o \
341 dsr/dsr_proto.o dsr/flowstruct.o dsr/linkcache.o \
342 dsr/simplecache.o dsr/sr_forwarder.o \
343 aodv/aodv_logs.o aodv/aodv.o \
344 aodv/aodv_rtable.o aodv/aodv_rqueue.o \
345 common/ns-process.o \
346 satellite/satgeometry.o satellite/sathandoff.o \
347 satellite/satlink.o satellite/satnode.o \
348 satellite/satposition.o satellite/satroute.o \
349 satellite/sattrace.o \
350 rap/raplist.o rap/rap.o rap/media-app.o rap/utilities.o \
351 common/fsm.o tcp/tcp-abs.o \
352 diffusion/diffusion.o diffusion/diff_rate.o diffusion/diff_prob.o \
353 diffusion/diff_sink.o diffusion/flooding.o diffusion/omni_mcast.o \
354 diffusion/hash_table.o diffusion/routing_table.o diffusion/iflist.o \
355 tcp/tfrc.o tcp/tfrc-sink.o mobile/energy-model.o apps/ping.o tcp/tcp-rfc793edu.o \
356 queue/rio.o queue/semantic-rio.o tcp/tcp-sack-rh.o tcp/scoreboard-rh.o \
357 plm/loss-monitor-plm.o plm/cbr-traffic-PP.o \
358 linkstate/hdr-ls.o \
359 mpls/classifier-addr-mpls.o mpls/ldp.o mpls/mpls-module.o \
360 routing/rtmodule.o classifier/classifier-hier.o \
361 routing/addr-params.o \
362 nix/hdr_nv.o nix/classifier-nix.o \
363 nix/nixnode.o \
364 routealgo/rnode.o \
365 routealgo/bfs.o \
366 routealgo/rbitmap.o \
367 routealgo/rlookup.o \
368 routealgo/routealgo.o \
369 nix/nixvec.o \
370 nix/nixroute.o \
371 diffserv/dsred.o diffserv/dsredq.o \
372 diffserv/dsEdge.o diffserv/dsCore.o \
373 diffserv/dsPolicy.o diffserv/ew.o diffserv/dewp.o \
374 queue/red-pd.o queue/pi.o queue/vq.o queue/rem.o \
375 queue/gk.o \
376 pushback/rate-limit.o pushback/rate-limit-strategy.o \
377 pushback/ident-tree.o pushback/agg-spec.o \
378 pushback/logging-data-struct.o \
379 pushback/rate-estimator.o \
380 pushback/pushback-queue.o pushback/pushback.o \
381 common/parentnode.o trace/basetrace.o \
382 common/simulator.o asim/asim.o \
383 common/scheduler-map.o common/splay-scheduler.o \
384 linkstate/ls.o linkstate/rtProtoLS.o \
385 pgm/classifier-pgm.o pgm/pgm-agent.o pgm/pgm-sender.o \
386 pgm/pgm-receiver.o mcast/rcvbuf.o \
387 mcast/classifier-lms.o mcast/lms-agent.o mcast/lms-receiver.o \
388 mcast/lms-sender.o \
389 queue/delayer.o \
390 xcp/xcpq.o xcp/xcp.o xcp/xcp-end-sys.o \
391 wpan/p802_15_4csmaca.o wpan/p802_15_4fail.o \
392 wpan/p802_15_4hlist.o wpan/p802_15_4mac.o \
393 wpan/p802_15_4nam.o wpan/p802_15_4phy.o \
394 wpan/p802_15_4sscs.o wpan/p802_15_4timer.o \
395 wpan/p802_15_4trace.o wpan/p802_15_4transac.o \
396 apps/pbc.o \
397 @V_STLOBJ@
398
399
400 # don't allow comments to follow continuation lines
401
402 # mac-csma.o mac-multihop.o\
403 # sensor-nets/landmark.o mac-simple-wireless.o \
404 # sensor-nets/tags.o sensor-nets/sensor-query.o \
405 # sensor-nets/flood-agent.o \
406
407 # what was here before is now in emulate/
408 OBJ_C =
409
410 OBJ_COMPAT = $(OBJ_GETOPT) common/win32.o
411 #XXX compat/win32x.o compat/tkConsole.o
412
413 OBJ_EMULATE_CC = \
414 emulate/net-ip.o \
415 emulate/net.o \
416 emulate/tap.o \
417 emulate/ether.o \
418 emulate/internet.o \
419 emulate/ping_responder.o \
420 emulate/arp.o \
421 emulate/icmp.o \
422 emulate/net-pcap.o \
423 emulate/nat.o \
424 emulate/iptap.o \
425 emulate/tcptap.o
426
427 OBJ_EMULATE_C = \
428 emulate/inet.o
429
430 OBJ_GEN = $(GEN_DIR)version.o $(GEN_DIR)ns_tcl.o $(GEN_DIR)ptypes.o
431
432 OBJ_CPP = $(OBJ_NRL_CPP)
433
434 SRC = $(OBJ_C:.o=.c) $(OBJ_CC:.o=.cc) $(OBJ_CPP:.o=.cpp) \
435 $(OBJ_EMULATE_C:.o=.c) $(OBJ_EMULATE_CC:.o=.cc) \
436 common/tclAppInit.cc common/tkAppInit.cc
437
438 OBJ = $(OBJ_C) $(OBJ_CC) $(OBJ_GEN) $(OBJ_COMPAT) $(OBJ_CPP)
439
440 CLEANFILES = ns nse nsx ns.dyn $(OBJ) $(OBJ_EMULATE_CC) \
441 $(OBJ_EMULATE_C) common/tclAppInit.o \
442 common/tkAppInit.o nstk \
443 $(GEN_DIR)* $(NS).core core core.$(NS) core.$(NSX) core.$(NSE) \
444 common/ptypes2tcl common/ptypes2tcl.o
445
446 SUBDIRS=\
447 indep-utils/cmu-scen-gen/setdest \
448 indep-utils/webtrace-conv/dec \
449 indep-utils/webtrace-conv/epa \
450 indep-utils/webtrace-conv/nlanr \
451 indep-utils/webtrace-conv/ucb
452
453 BUILD_NSE = @build_nse@
454
455 all: $(NS) $(BUILD_NSE) $(NSTK) all-recursive Makefile
456
457
458 all-recursive:
459 for i in $(SUBDIRS); do ( cd $$i; $(MAKE) all; ) done
460
461
462
463
464 ifeq ($(NSLIB),libns.dll)
465
466 # This is for cygwin
467
468 NS_CPPFLAGS = -DNSLIBNAME=\"$(NSLIB)\"
469 NS_LIBS = @DL_LIBS@
470
471 $(NSLIB): $(OBJ) common/tclAppInit.o
472 $(LINK) -shared $(LDFLAGS) \
473 $(LDOUT)$@ \
474 -Wl,--export-all-symbols \
475 -Wl,--enable-auto-import \
476 -Wl,[email protected] \
477 -Wl,--whole-archive $^ \
478 -Wl,--no-whole-archive @V_IMPORT_LIBS@
479
480 $(NS): $(NSLIB) common/main-modular.cc
481 $(LINK) $(NS_CPPFLAGS) $(LDFLAGS) $(LDOUT)$@ common/main-modular.cc $(NS_LIBS)
482
483 else
484
485 # default for all systems but cygwin
486
487 $(NS): $(OBJ) common/tclAppInit.o common/main-monolithic.o
488 $(LINK) $(LDFLAGS) $(LDOUT)$@ $^ $(LIB)
489
490 endif
491
492
493
494 Makefile: Makefile.in
495 @echo "Makefile.in is newer than Makefile."
496 @echo "You need to re-run configure."
497 false
498
499 $(NSE): $(OBJ) common/tclAppInit.o common/main-monolithic.o $(OBJ_EMULATE_CC) $(OBJ_EMULATE_C)
500 $(LINK) $(LDFLAGS) $(LDOUT)$@ $^ $(LIB)
501
502 $(NSTK): $(OBJ) common/tkAppInit.o
503 $(LINK) $(LDFLAGS) $(LDOUT)$@ $^ $(LIB)
504
505 ns.dyn: $(OBJ) common/tclAppInit.o common/main-monolithic.o
506 $(LINK) $(LDFLAGS) -o $@ $^ $(LIB)
507
508 PURIFY = purify -cache-dir=/tmp
509 ns-pure: $(OBJ) common/tclAppInit.o common/main-monolithic.o
510 $(PURIFY) $(LINK) $(LDFLAGS) -o $@ $^ $(LIB)
511
512 NS_TCL_LIB = \
513 tcl/lib/ns-compat.tcl \
514 tcl/lib/ns-default.tcl \
515 tcl/lib/ns-errmodel.tcl \
516 tcl/lib/ns-lib.tcl \
517 tcl/lib/ns-link.tcl \
518 tcl/lib/ns-mobilenode.tcl \
519 tcl/lib/ns-sat.tcl \
520 tcl/lib/ns-cmutrace.tcl \
521 tcl/lib/ns-node.tcl \
522 tcl/lib/ns-rtmodule.tcl \
523 tcl/lib/ns-hiernode.tcl \
524 tcl/lib/ns-packet.tcl \
525 tcl/lib/ns-queue.tcl \
526 tcl/lib/ns-source.tcl \
527 tcl/lib/ns-nam.tcl \
528 tcl/lib/ns-trace.tcl \
529 tcl/lib/ns-agent.tcl \
530 tcl/lib/ns-random.tcl \
531 tcl/lib/ns-namsupp.tcl \
532 tcl/lib/ns-address.tcl \
533 tcl/lib/ns-intserv.tcl \
534 tcl/lib/ns-autoconf.tcl \
535 tcl/rtp/session-rtp.tcl \
536 tcl/lib/ns-mip.tcl \
537 tcl/rtglib/dynamics.tcl \
538 tcl/rtglib/route-proto.tcl \
539 tcl/rtglib/algo-route-proto.tcl \
540 tcl/rtglib/ns-rtProtoLS.tcl \
541 tcl/interface/ns-iface.tcl \
542 tcl/mcast/BST.tcl \
543 tcl/mcast/ns-mcast.tcl \
544 tcl/mcast/McastProto.tcl \
545 tcl/mcast/DM.tcl \
546 tcl/mcast/srm.tcl \
547 tcl/mcast/srm-adaptive.tcl \
548 tcl/mcast/srm-ssm.tcl \
549 tcl/mcast/timer.tcl \
550 tcl/mcast/McastMonitor.tcl \
551 tcl/mobility/dsdv.tcl \
552 tcl/mobility/dsr.tcl \
553 tcl/ctr-mcast/CtrMcast.tcl \
554 tcl/ctr-mcast/CtrMcastComp.tcl \
555 tcl/ctr-mcast/CtrRPComp.tcl \
556 tcl/rlm/rlm.tcl \
557 tcl/rlm/rlm-ns.tcl \
558 tcl/session/session.tcl \
559 tcl/lib/ns-route.tcl \
560 tcl/emulate/ns-emulate.tcl \
561 tcl/lan/vlan.tcl \
562 tcl/lan/abslan.tcl \
563 tcl/lan/ns-ll.tcl \
564 tcl/lan/ns-mac.tcl \
565 tcl/webcache/http-agent.tcl \
566 tcl/webcache/http-server.tcl \
567 tcl/webcache/http-cache.tcl \
568 tcl/webcache/http-mcache.tcl \
569 tcl/webcache/webtraf.tcl \
570 tcl/webcache/empweb.tcl \
571 tcl/webcache/empftp.tcl \
572 tcl/plm/plm.tcl \
573 tcl/plm/plm-ns.tcl \
574 tcl/plm/plm-topo.tcl \
575 tcl/mpls/ns-mpls-classifier.tcl \
576 tcl/mpls/ns-mpls-ldpagent.tcl \
577 tcl/mpls/ns-mpls-node.tcl \
578 tcl/mpls/ns-mpls-simulator.tcl \
579 tcl/lib/ns-pushback.tcl \
580 tcl/lib/ns-srcrt.tcl \
581 tcl/mcast/ns-lms.tcl \
582 tcl/lib/ns-qsnode.tcl \
583 @V_NS_TCL_LIB_STL@
584
585 $(GEN_DIR)ns_tcl.cc: $(NS_TCL_LIB)
586 $(TCLSH) bin/tcl-expand.tcl tcl/lib/ns-lib.tcl @V_NS_TCL_LIB_STL@ | $(TCL2C) et_ns_lib > $@
587
588 $(GEN_DIR)version.c: VERSION
589 $(RM) $@
590 $(TCLSH) bin/string2c.tcl version_string < VERSION > $@
591
592 $(GEN_DIR)ptypes.cc: common/ptypes2tcl common/packet.h
593 ./common/ptypes2tcl > $@
594
595 common/ptypes2tcl: common/ptypes2tcl.o
596 $(LINK) $(LDFLAGS) $(LDOUT)$@ common/ptypes2tcl.o
597
598 common/ptypes2tcl.o: common/ptypes2tcl.cc common/packet.h
599
600 dirs:
601 for d in $(DESTDIR)$(MANDEST)/man1; do \
602 if [ ! -d $$d ]; then \
603 mkdir -p $$d ;\
604 fi;\
605 done
606
607
608 install: dirs force install-ns install-man
609
610 install-ns: force
611 $(INSTALL) -m 755 ns $(DESTDIR)$(BINDEST)
612
613 install-man: force
614 $(INSTALL) -m 644 ns.1 $(DESTDIR)$(MANDEST)/man1
615
616 install-recursive: force
617 for i in $(SUBDIRS); do ( cd $$i; $(MAKE) install; ) done
618
619 clean:
620 $(RM) $(CLEANFILES)
621
622 nrlclean:
623 $(RM) $(OBJ_CPP)
624
625 AUTOCONF_GEN = tcl/lib/ns-autoconf.tcl
626 distclean: distclean-recursive
627 $(RM) $(CLEANFILES) Makefile config.cache config.log config.status \
628 autoconf.h gnuc.h os-proto.h $(AUTOCONF_GEN); \
629 $(MV) .configure .configure- ;\
630 echo "Moved .configure to .configure-"
631
632 distclean-recursive:
633 for i in $(SUBDIRS); do ( cd $$i; $(MAKE) clean; $(RM) Makefile; ) done
634
635 tags: force
636 ctags -wtd *.cc *.h webcache/*.cc webcache/*.h dsdv/*.cc dsdv/*.h \
637 dsr/*.cc dsr/*.h webcache/*.cc webcache/*.h lib/*.cc lib/*.h \
638 ../Tcl/*.cc ../Tcl/*.h
639
640 TAGS: force
641 etags *.cc *.h webcache/*.cc webcache/*.h dsdv/*.cc dsdv/*.h \
642 dsr/*.cc dsr/*.h webcache/*.cc webcache/*.h lib/*.cc lib/*.h \
643 ../Tcl/*.cc ../Tcl/*.h
644
645 tcl/lib/TAGS: force
646 ( \
647 cd tcl/lib; \
648 $(TCLSH) ../../bin/tcl-expand.tcl ns-lib.tcl | grep '^### tcl-expand.tcl: begin' | awk '{print $$5}' >.tcl_files; \
649 etags --lang=none -r '/^[ \t]*proc[ \t]+\([^ \t]+\)/\1/' `cat .tcl_files`; \
650 etags --append --lang=none -r '/^\([A-Z][^ \t]+\)[ \t]+\(instproc\|proc\)[ \t]+\([^ \t]+\)[ \t]+/\1::\3/' `cat .tcl_files`; \
651 )
652
653 depend: $(SRC)
654 $(MKDEP) $(CFLAGS) $(INCLUDES) -- $(SRC) 2>&1 > /dev/null
655
656 srctar:
657 @cwd=`pwd` ; dir=`basename $$cwd` ; \
658 name=ns-`cat VERSION | tr A-Z a-z` ; \
659 tar=ns-src-`cat VERSION`.tar.gz ; \
660 list="" ; \
661 for i in `cat FILES` ; do list="$$list $$name/$$i" ; done; \
662 echo \
663 "(rm -f $$tar; cd .. ; ln -s $$dir $$name)" ; \
664 (rm -f $$tar; cd .. ; ln -s $$dir $$name) ; \
665 echo \
666 "(cd .. ; tar cfhz $$tar [lots of files])" ; \
667 (cd .. ; tar cfhz - $$list) > $$tar ; \
668 echo \
669 "rm ../$$name; chmod 444 $$tar" ; \
670 rm ../$$name; chmod 444 $$tar
671
672 force:
673
674 test: force
675 ./validate
676
677 # Create makefile.vc for Win32 development by replacing:
678 # "# !include ..." -> "!include ..."
679 makefile.vc: Makefile.in
680 $(PERL) bin/gen-vcmake.pl < Makefile.in > makefile.vc
681 # $(PERL) -pe 's/^# (\!include)/\!include/o' < Makefile.in > makefile.vc