Guest User

NS2allinone - Makefile.in

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