Debian Codegraph @

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