#
# 3. Source - If specified, this sets the source code filenames. If this
# is not set, it defaults to be all of the .cpp, .c, .y, and .l files
-# in the current directory.
+# in the current directory. Also, if you want to build files in addition
+# to the local files, you can use the ExtraSource variable
#
# Default Rule: Make sure it's also a :: rule
BURG = /home/vadve/vadve/Research/DynOpt/Burg/burg
BURG_OPTS = -I
+
+PURIFY = /usr/dcs/applications/purify/bin/purify -cache-dir="/home/vadve/lattner/purifycache" -chain-length="10" -messages=all
+
#---------------------------------------------------------
# Compilation options...
#---------------------------------------------------------
#Prof = -pg
# TODO: Get rid of exceptions! : -fno-exceptions -fno-rtti
-CompileCommonOpts = $(Prof) -Wall -Winline -W -Wwrite-strings -Wno-unused -I$(LEVEL)/include
+CompileCommonOpts = $(Prof) -Wall -W -Wwrite-strings -Wno-unused -I$(LEVEL)/include
# Compile a file, don't link...
Compile = $(CXX) -c $(CPPFLAGS) $(CXXFLAGS) $(CompileCommonOpts)
CompileO = $(Compile) -O3 -DNDEBUG -finline-functions -felide-constructors -fnonnull-objects -freg-struct-return -fshort-enums
# Link final executable
+
+# To enable purify, do it here:
+###Link = $(PURIFY) $(CXX) $(Prof) -static
Link = $(CXX) $(Prof)
LinkG = $(Link) -g -L $(LEVEL)/lib/Debug
LinkO = $(Link) -O3 -L $(LEVEL)/lib/Release
# Source includes all of the cpp files, and objects are derived from the
# source files...
-# The local Makefile can list other Source files via Source = ...
+# The local Makefile can list other Source files via ExtraSource = ...
#
-Source := $(Source) $(wildcard *.cpp *.c *.y *.l)
+Source := $(ExtraSource) $(wildcard *.cpp *.c *.y *.l)
Objs = $(sort $(addsuffix .o,$(basename $(Source))))
ObjectsO = $(addprefix Release/,$(Objs))
ifeq ($(LEVEL), .)
tags:
- etags -l c++ `find . -name '*.cpp'` `find . -name '*.h'`
+ etags -l c++ `find . -name '*.cpp' -o -name '*.h'`
all:: tags
#---------------------------------------------------------
+.PRECIOUS: Depend/.dir Debug/.dir Release/.dir
# Create dependencies for the *.cpp files...
Depend/%.d: %.cpp Depend/.dir