forked from rose-compiler/rose
-
Notifications
You must be signed in to change notification settings - Fork 0
/
exampleMakefile.in
66 lines (53 loc) · 2.99 KB
/
exampleMakefile.in
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
# Example Makefile for ROSE users
# This makefile is provided as an example of how to use ROSE when ROSE is
# installed (using "make install"). This makefile is tested as part of the
# "make distcheck" rule (run as part of tests before any SVN checkin).
# The test of this makefile can also be run by using the "make installcheck"
# rule (run as part of "make distcheck").
# Location of include directory after "make install"
ROSE_INCLUDE_DIR = @prefix@/include
# Location of Boost include directory
BOOST_CPPFLAGS = @BOOST_CPPFLAGS@
# Location of Dwarf include and lib (if ROSE is configured to use Dwarf)
ROSE_DWARF_INCLUDES = @DWARF_INCLUDE@
ROSE_DWARF_LIBS_WITH_PATH = @DWARF_LINK@
# Location of library directory after "make install"
ROSE_LIB_DIR = @prefix@/lib
CC = @CC@
CXX = @CXX@
CPPFLAGS = @CPPFLAGS@
#CXXCPPFLAGS = @CXXCPPFLAGS@
CXXFLAGS = @CXXFLAGS@
LDFLAGS = @LDFLAGS@
ROSE_LIBS = $(ROSE_LIB_DIR)/librose.la
# Location of source code
ROSE_SOURCE_DIR = \
@top_srcdir@/tutorial
executableFiles = identityTranslator ASTGraphGenerator \
visitorTraversal inheritedAttributeTraversal \
synthesizedAttributeTraversal \
inheritedAndSynthesizedAttributeTraversal \
accumulatorAttributeTraversal persistantAttributes \
queryLibraryExample nestedTraversal \
loopRecognition \
typeInfoFromFunctionParameters \
resolveOverloadedFunction templateParameter \
instrumentationExample addVariableDeclaration \
addFunctionDeclaration loopOptimization \
buildCFG debuggingIRnodeToString \
debuggingSourceCodePositionInformation \
commandlineProcessing \
loopNestingInfoProcessing
# Default make rule to use
all: $(executableFiles)
@if [ x$${ROSE_IN_BUILD_TREE:+present} = xpresent ]; then echo "ROSE_IN_BUILD_TREE should not be set" >&2; exit 1; fi
# Example of how to use ROSE (linking to dynamic library, which is must faster
# and smaller than linking to static libraries). Dynamic linking requires the
# use of the "-L$(ROSE_LIB_DIR) -Wl,-rpath" syntax if the LD_LIBRARY_PATH is not
# modified to use ROSE_LIB_DIR. We provide two example of this; one using only
# the "-lrose -ledg" libraries, and one using the many separate ROSE libraries.
$(executableFiles):
# g++ -I$(ROSE_INCLUDE_DIR) -o $@ $(ROSE_SOURCE_DIR)/[email protected] -L$(ROSE_LIB_DIR) -Wl,-rpath $(ROSE_LIB_DIR) $(ROSE_LIBS)
# g++ -I$(ROSE_INCLUDE_DIR) -o $@ $(ROSE_SOURCE_DIR)/[email protected] $(ROSE_LIBS)
# /bin/sh @top_builddir@/libtool --mode=link $(CXX) $(CPPFLAGS) $(CXXFLAGS) $(LDFLAGS) -I$(ROSE_INCLUDE_DIR) $(BOOST_CPPFLAGS) -o $@ $(ROSE_SOURCE_DIR)/[email protected] $(ROSE_LIBS)
/bin/sh @top_builddir@/libtool --mode=link $(CXX) $(CPPFLAGS) $(CXXFLAGS) $(LDFLAGS) -I$(ROSE_INCLUDE_DIR) $(BOOST_CPPFLAGS) $(ROSE_DWARF_INCLUDES) -o $@ $(ROSE_SOURCE_DIR)/[email protected] $(ROSE_LIBS) $(ROSE_DWARF_LIBS_WITH_PATH)