File: makefile.vc

package info (click to toggle)
nam 1.15-5
  • links: PTS, VCS
  • area: main
  • in suites: buster, sid
  • size: 29,240 kB
  • sloc: cpp: 17,338; tcl: 10,655; sh: 2,997; ansic: 1,252; makefile: 139; perl: 66
file content (201 lines) | stat: -rw-r--r-- 5,968 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
#
# Copyright (c) 1991,1993 The Regents of the University of California.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
# 1. Redistributions of source code must retain the above copyright
#    notice, this list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright
#    notice, this list of conditions and the following disclaimer in the
#    documentation and/or other materials provided with the distribution.
# 3. All advertising materials mentioning features or use of this software
#    must display the following acknowledgement:
#	This product includes software developed by the Computer Systems
#	Engineering Group at Lawrence Berkeley Laboratory.
# 4. Neither the name of the University nor of the Laboratory may be used
#    to endorse or promote products derived from this software without
#    specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
# ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
# SUCH DAMAGE.
#
# @(#) $Header: /cvsroot/nsnam/nam-1/makefile.vc,v 1.30 2002/04/15 21:58:28 buchheim Exp $
#

# Top level hierarchy
prefix = @prefix@
exec_prefix = @exec_prefix@
# Pathname of directory to install the binary
BINDEST = @bindir@
# Pathname of directory to install the man page
MANDEST = @mandir@

CC = @CC@
CPP = @CXX@
CCOPT = @V_CCOPT@
MKDEP = ./conf/mkdep
# Have to be the same as that defined in conf/makefile.win
TCL2C = @V_TCL2CPP@
TCLSH = @V_TCLSH@

#
# Remember to add a dependency if you add any tcl sources here.
#
LIB =  \
	@V_LIBS@ \
	@V_LIB_X11@ \
	@V_LIB@ -lm @LIBS@
INCLUDE = \
	-I. @V_INCLUDES@ \
	@V_INCLUDE_X11@ 

STATIC = @V_STATIC@
DEFINE = -DTCL_TK @V_DEFINE@ @V_DEFINES@
CFLAGS = $(CCOPT) $(DEFINE) $(INCLUDE)

INSTALL = @INSTALL@
RANLIB = @V_RANLIB@

BLANK	= # make a blank space.  DO NOT add anything to this line
AR	= ar rc $(BLANK)
LINK	= $(CPP)
LDFLAGS	=
LDOUT	= -o $(BLANK)
PERL	= perl
RM	= rm -f

# Explicitly define compilation rules since SunOS 4's make doesn't like gcc.
# Also, gcc does not remove the .o before forking 'as', which can be a
# problem if you don't own the file but can write to the directory.
.SUFFIXES: .cc 

.cc.o:
	rm -f $@; $(CPP) -o $@ -c $(CFLAGS) $*.cc

.c.o:
	rm -f $@; $(CC) -o $@ -c $(CFLAGS) $*.c

GEN_DIR = gen/
NAM	= nam

# WIN32: uncomment the following line to include specific make for VC++
!include <conf/makefile.win>

OBJ_C = tkcompat.o tkUnixInit.o win32.o getopt.o

OBJ_CC = \
	netview.o netmodel.o edge.o packet.o node.o main.o \
	trace.o queue.o drop.o animation.o agent.o feature.o \
	route.o transform.o paint.o state.o monitor.o anetmodel.o \
	random.o rng.o view.o graphview.o netgraph.o tracehook.o\
	lan.o psview.o group.o editview.o tag.o address.o animator.o \
	wnetmodel.o nam_stream.o enetmodel.o testview.o parser.o \
	trafficsource.o lossmodel.o queuehandle.o

OBJ_GEN = \
	$(GEN_DIR)version.o $(GEN_DIR)nam_tcl.o
SRC_GEN = \
	$(GEN_DIR)version.c $(GEN_DIR)nam_tcl.cc

OBJ =	$(OBJ_C) $(OBJ_CC) $(OBJ_GEN)
SRC =	$(OBJ_C:.o=.c) $(OBJ_CC:.o=.cc)

CLEANFILES = $(NAM) $(OBJ) $(SRC_GEN) core core.nam

NAM_TCL_LIB = \
	tcl/nam-lib.tcl \
	tcl/nam-default.tcl \
	tcl/balloon.tcl \
	tcl/snapshot.tcl \
	tcl/animator.tcl \
	tcl/anim-ctrl.tcl \
	tcl/netModel.tcl \
	tcl/autoNetModel.tcl \
	tcl/build-ui.tcl \
	tcl/annotation.tcl \
	tcl/node.tcl \
	tcl/monitor.tcl \
	tcl/stats.tcl \
	tcl/www.tcl \
	tcl/menu_file.tcl \
	tcl/menu_view.tcl \
  tcl/NamgraphView.tcl \
  tcl/NamgraphModel.tcl \
  tcl/TimesliderNamgraphView.tcl \
  tcl/TimesliderView.tcl \
  tcl/TimesliderModel.tcl \
  tcl/observer.tcl \
  tcl/observable.tcl \
  tcl/wirelessNetModel.tcl \
  tcl/editorNetModel.tcl \
  tcl/Editor.tcl \
  tcl/Editor-FileParser.tcl

$(NAM):	$(OBJ) $(SCRYOBJ) makefile.vc
	$(RM) $@
	$(LINK) $(STATIC) $(LDFLAGS) $(LDOUT)$@ \
		$(OBJ) $(SCRYOBJ) $(LIB)

Makefile: Makefile.in
	@echo "Makefile.in is newer than Makefile."
	@echo "You need to re-run configure."
	false

$(GEN_DIR)nam_tcl.cc: $(NAM_TCL_LIB)
	-mkdir $(GEN_DIR:\\=)
	$(RM) $@
	$(TCLSH) bin/tcl-expand.tcl tcl/nam-lib.tcl | $(TCL2C) et_nam > $@

$(GEN_DIR)version.c: VERSION
	-mkdir $(GEN_DIR:\\=)
	$(RM) $@
	$(TCLSH) bin/string2c.tcl version < VERSION > $@

install: force
	$(INSTALL) -m 555 -o bin -g bin nam $(DESTDIR)$(BINDEST)

clean:
	$(RM) $(CLEANFILES)

distclean:
	$(RM) $(CLEANFILES) Makefile config.cache config.log config.status

tar:	force
	tar=$(TAR_PREFIX)-nam-`cat VERSION`.tar.gz ; \
	rm -f $$tar ; \
	tar cfhF -  $(TAR) | gzip -c > $$tar

depend: $(SRC)
	$(MKDEP) $(CFLAGS) $(SRC)

srctar:
	@cwd=`pwd` ; dir=`basename $$cwd` ; \
	    name=nam-`cat VERSION | tr A-Z a-z` ; \
	    tar=nam-src-`cat VERSION`.tar.gz ; \
	    list="" ; \
	    for i in `cat FILES` ; do list="$$list $$name/$$i" ; done; \
	    echo \
	    "(rm -f $$tar; cd .. ; ln -s $$dir $$name)" ; \
	     (rm -f $$tar; cd .. ; ln -s $$dir $$name) ; \
	    echo \
	    "(cd .. ; tar cfh $$tar [lots of files])" ; \
	     (cd .. ; tar cfh - $$list) | gzip -c > $$tar ; \
	    echo \
	    "rm ../$$name; chmod 444 $$tar" ;  \
	     rm ../$$name; chmod 444 $$tar

force:

# Create makefile.vc for Win32 development by replacing:
# "# !include ..." 	-> 	"!include ..."