Debian Codegraph @

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