# # Common makefile template for the dyninstAPI library. This file is not # intended to be a useful Makefile in isolation; instead, it should be # included from within an architecture-specific Makefile. # # $Id: make.module.tmpl,v 1.46 2003/03/02 22:03:12 schendel Exp $ # SUITE_NAME = Dyninst RELEASE_NUM = 3.0 #BUILD_MARK should be (re-)defined in core/make.config.local rather than here! DEFINES += -UMT_THREAD \ -DBPATCH_LIBRARY -DBPATCH_SET_MUTATIONS_ACTIVE \ -DBPATCH_LIBRARY_F -DNEW_TIME_TYPES CFLAGS += $(USEFULWARNINGS) $(DEFINES) CXXFLAGS += $(USEFULWARNINGS) $(DEFINES) TFLAGS += $(TCLFRIENDLYWARNINGS) $(DEFINES) ifdef GCC_2_95 # This may cause problems on Alpha # GCC has a new mangled name squisher (-fsquangle) which can be # set to "on" by default. This causes linker problems, so we # default to "off". CFLAGS += -fno-squangle CXXFLAGS += -fno-squangle TFLAGS += -fno-squangle endif TARGET = libdyninstAPI.a ifdef USES_LIBDYNINST_SO TARGET3_SO = libdyninstAPI.so LDFLAGS += $(LIBDIR) ifndef USES_NATIVE_CC LD = $(GXX) LDFLAGS += -shared CFLAGS += -fPIC CXXFLAGS += -fPIC else ifeq (solaris,$(findstring solaris,$(PLATFORM))) LDFLAGS += -G endif ifeq (irix,$(findstring irix,$(PLATFORM))) LDFLAGS += -shared endif endif # VG(8/3/2): This is needed so templates get the same debug flags as all other TFLAGS += $(filter -g%, $(CFLAGS)) -fPIC endif VPATH += ../../dyninstAPI/src:../dyninstAPI/h:\ ../../common/src:../../paradyn/h SRCS += ../src/BPatch.C \ ../src/BPatch_image.C \ ../src/BPatch_function.C \ ../src/BPatch_snippet.C \ ../src/BPatch_thread.C \ ../src/BPatch_type.C \ ../src/BPatch_init.C \ ../src/BPatch_module.C \ ../src/BPatch_point.C \ ../src/BPatch_collections.C \ ../src/BPatch_sourceBlock.C \ ../src/BPatch_basicBlock.C \ ../src/BPatch_basicBlockLoop.C \ ../src/BPatch_flowGraph.C \ ../src/Object.C \ ../src/MemoryAccess.C \ ../src/dummy.C \ ../src/api_showerror.C \ ../src/ast.C \ ../src/inst.C \ ../src/dyn_thread.C \ ../src/process.C \ ../src/dyn_lwp.C \ ../src/rpcMgr.C \ ../src/installed_miniTramps_list.C \ ../src/stats.C \ ../src/symtab.C \ ../src/util.C \ ../src/sharedobject.C \ ../src/LineInformation.C \ ../../common/src/Dictionary.C \ ../../common/src/Ident.C \ ../../common/src/String.C \ ../../common/src/Timer.C \ ../../common/src/Types.C \ ../../common/src/debugOstream.C \ ../../common/src/lprintf.C \ ../../common/src/pathName.C \ ../../common/src/vectorSet.C \ ../../common/src/Time.C \ ../../common/src/fraction.C \ ../../common/src/timing.C \ ifndef AUTO_TEMPLATES SRCS += ../src/BPatch_templates.C \ ../src/templates0.C \ ../src/templates1.C \ ../src/templates2.C \ endif #IGEN_GEN_SRCS = #IGEN_ISRCS = ifndef USES_NATIVE_CC ifdef CROSSCOMPILER SYSLIBS += -liberty -lg++ -lstdc++ -lm else SYSLIBS += -liberty endif else SYSLIBS += -ldemangle endif IFLAGS += -I../$(PLATFORM) -I../src -I../h ifdef USES_LIBDYNINST_SO all: $(TARGET3_SO) else all: $(TARGET) endif BPatch_templates.o: ../src/BPatch_templates.C $(CXX) $(TFLAGS) -c ../src/BPatch_templates.C templates0.o: ../src/templates0.C $(CXX) $(TFLAGS) -c ../src/templates0.C templates1.o: ../src/templates1.C $(CXX) $(TFLAGS) -c ../src/templates1.C templates2.o: ../src/templates2.C $(CXX) $(TFLAGS) -c ../src/templates2.C