GNUmakefile.in 3.65 KB
Newer Older
1
#
Robert Ricci's avatar
Robert Ricci committed
2 3 4
# EMULAB-COPYRIGHT
# Copyright (c) 2000-2005 University of Utah and the Flux Group.
# All rights reserved.
5
#
6 7 8 9
SRCDIR		= @srcdir@
TESTBED_SRCDIR	= @top_srcdir@
OBJDIR		= ..
SUBDIR		= assign
10
MAKEFILE_IN	= @srcdir@/GNUmakefile.in
11 12

include $(OBJDIR)/Makeconf
13

14 15 16 17 18 19 20
#
# Uncomment these to build with gcc3.3
#
#CC=gcc33
#CPP=cpp33
#CXX=g++33	

21
all: assign 
22

23
include $(TESTBED_SRCDIR)/GNUmakerules
24

25
OBJS=parse_top.o parse_ptop.o assign.o pclass.o vclass.o config.o score.o \
26
     parser.o solution.o anneal.o featuredesire.o neighborhood.o fstring.o
27 28
LIBS+= -lm
LDFLAGS+= -pipe -O3
29
CXXFLAGS = -pipe -I/usr/local/include -ftemplate-depth-40
30

31 32 33
# Pick either this
CXXFLAGS += -O3 
# or this
34
#CXXFLAGS += -O0 -g -Wall -DVERBOSE
35 36 37 38 39 40 41 42
# and then zero or more of these
#CXXFLAGS += -DSCORE_DEBUG
#CXXFLAGS += -DSCORE_DEBUG_MORE
#CXXFLAGS += -DPCLASS_DEBUG
#CXXFLAGS += -DDUMP_GRAPH
#CXXFLAGS += -DSCORE_DEBUG_LOTS

# And then, regardless, you can also have this
43
#CXXFLAGS += -DSTATS
44

45 46 47 48 49 50 51 52 53
# assign now supports a dizzing array of defines, which are as-yet undocumented
# Here are the ones used for a typical build:
# Pick cooling schedule
CXXFLAGS += -DMELT -DEPSILON_TERMINATE -DCHILL -DNEIGHBOR_LENGTH \
    -DLOCAL_DERIVATIVE -DALLOW_NEGATIVE_DELTA
# Bug/scoring fixes
CXXFLAGS += -DINTERSWITCH_LENGTH -DPNODE_SWITCH_LOAD -DFIX_SHARED_INTERFACES 
# Various tweaks to the simulated annealing behavior
CXXFLAGS += -DFIND_PNODE_SEARCH -DNO_REVERT
54 55 56 57 58
# Keeps information about which pclasses are potential mappings for vnodes on a
# per-vnode basis, not a per-type basis
CXXFLAGS += -DPER_VNODE_TT
# Should be on by default, but not well tested enough
#CXXFLAGS += -DSMART_UNMAP
Robert Ricci's avatar
Robert Ricci committed
59 60
# Make sure that all emulated links that are assigned to a plink have the same
# endpoints
61
CXXFLAGS += -DFIX_PLINK_ENDPOINTS
62 63
# Allow pnodes to cap the amount of trivial link bandwidth they can handle
CXXFLAGS += -DTRIVIAL_LINK_BW
64
# Use the old acceptance criteria, which gives special treatment to violations
65
CXXFLAGS += -DSPECIAL_VIOLATION_TREATMENT
66

67 68 69
# If you're looking to turn on or off USE_OPTIMAL, its now a cmdline
# option. Use OP={0,1} on the command line at run time... :)

Mac Newbold's avatar
Mac Newbold committed
70 71
DEPLIBS=$(OBJS)

72
assign: ${MAKEFILE_IN} ${DEPLIBS} ${OBJS}
73
	${CXX} -o assign ${LIBS} $(OBJS) ${LDFLAGS}
Mac Newbold's avatar
Mac Newbold committed
74

75
install: $(INSTALL_LIBEXECDIR)/assign 
76

Mac Newbold's avatar
Mac Newbold committed
77
clean:
78
	-${RM} *.o assign 
79

80 81 82 83
#
# All this crap generated with 'g++ -MM' - don't want to do all the makefile goo
# to make this automatic, since none of it ever changes
#
84 85 86
anneal.o: anneal.cc anneal.h port.h delay.h physical.h common.h \
 config.h featuredesire.h pclass.h virtual.h maps.h score.h solution.h \
 vclass.h ${MAKEFILE_IN}
87
assign.o: assign.cc port.h common.h config.h delay.h physical.h \
88 89
 featuredesire.h virtual.h vclass.h pclass.h score.h solution.h maps.h \
 anneal.h ${MAKEFILE_IN}
90
config.o: config.cc config.h ${MAKEFILE_IN}
91 92 93 94
featuredesire.o: featuredesire.cc featuredesire.h common.h config.h \
 ${MAKEFILE_IN}
parse_ptop.o: parse_ptop.cc port.h delay.h physical.h common.h \
 config.h featuredesire.h parser.h ${MAKEFILE_IN}
95
parse_top.o: parse_top.cc port.h common.h config.h vclass.h delay.h \
96 97
 physical.h featuredesire.h virtual.h parser.h anneal.h pclass.h ${MAKEFILE_IN}
parser.o: parser.cc parser.h port.h ${MAKEFILE_IN}
98
pclass.o: pclass.cc port.h common.h config.h delay.h physical.h \
99
 featuredesire.h virtual.h pclass.h ${MAKEFILE_IN}
100
score.o: score.cc port.h common.h config.h vclass.h delay.h physical.h \
101 102 103
 featuredesire.h virtual.h pclass.h score.h /usr/include/math.h ${MAKEFILE_IN}
solution.o: solution.cc solution.h port.h delay.h physical.h common.h \
 config.h featuredesire.h virtual.h maps.h vclass.h ${MAKEFILE_IN}
104
vclass.o: vclass.cc port.h common.h config.h vclass.h delay.h \
105
 physical.h featuredesire.h virtual.h ${MAKEFILE_IN}