# Paradyn overall build configuration (unix) # # $Id: make.config,v 1.107 2002/03/12 18:39:59 jaw Exp $ # SUITE_NAME = Paradyn RELEASE_NUM = 3.3 #BUILD_MARK = EXPLICIT_DEPENDS = 1 #USE_STL_VECTOR = 1 #IBM_BPATCH_COMPAT = 1 # Apart from actual "full" releases, don't modify these build Id components. # For personal/experimental builds, feel free to use your core/make.config.local # file to (re-)define BUILD_MARK as you desire. # ***** IMPORTANT INSTALLATION/CONFIGURATION INSTRUCTIONS ***** # Unless your site is set-up identically to that of the Paradyn/DyninstAPI # developers, you should carefully examine the (GNU)make configuration # parameters defined in this file, particularly utilities such as the C/C++ # compilers, perl, flex and bison, and the installed locations and names # for FLEX, TCL/TK, X11 and PVM (which is optional). ifdef USES_PVM # (PVM support only potentially relevant for paradynd) # uncomment/comment the following line to build with/without PVM support #INCLUDE_PVM_SUPPORT=true endif # most "main" modules are only two levels deep, but we need to be able to # change this for those that are deeper in the tree ifndef TO_CORE TO_CORE = ../.. endif # Destinations for library and executable installation (relative to core!) # Warning: modification of the build/install structure is not recommended! LIBRARY_DEST = ../lib/$(PLATFORM) PROGRAM_DEST = ../bin/$(PLATFORM) # Usually, we look for files, binaries, libs in $(TO_CORE)/..... # But if the file doesn't exist there (i.e. if the user hasn't checked them out # with cvs), then we should look in a backup location. That's what this vrble # is about. It's used several times below in this file. BACKUP_CORE = /p/paradyn/core AS = /bin/as CC = gcc CXX = g++ LEX = flex RANLIB = ranlib AR = ar YFLAGS = -d -y YACC = bison MV = mv CP = cp RM = rm -f MKDIR = mkdir -p PERL = perl # NB: perl v5 or higher required! # COLLECTOR is only used by purify & quantify COLLECTOR = /s/gcc-2.7.2/bin/../lib/gcc-lib/$(PLATFORM)/2.7.2/ld # BUILDSTAMP is used to generate local build vouchers BUILDSTAMP = $(TO_CORE)/../scripts/buildstamp ifdef PLATFORM ARCH_DEF = -D$(shell echo $$PLATFORM | $(PERL) -pe 's/\./_/g;s/-/_/g') else BUILDERROR: PLATFORM must be defined in environment to build (and run) Paradyn endif # temporary hack overrides to provide "grand migration illusion" # (these should be removed once definitions in sources are updated) ifeq ($(PLATFORM),mips-sgi-irix6.5) ARCH_DEF = -Dmips_sgi_irix6_4 endif ifeq ($(PLATFORM),i386-unknown-linux2.4) ARCH_DEF = -Di386_unknown_linux2_0 endif ifeq ($(PLATFORM),ia64-unknown-linux2.4) ARCH_DEF = -Dia64_unknown_linux2_4 endif ifeq ($(PLATFORM),sparc-sun-solaris2.7) ARCH_DEF = -Dsparc_sun_solaris2_4 endif ifeq ($(PLATFORM),rs6000-ibm-aix4.3) ARCH_DEF = -Drs6000_ibm_aix4_1 endif ifeq ($(PLATFORM),rs6000-ibm-aix4.2) ARCH_DEF = -Drs6000_ibm_aix4_1 endif # [temporary hack overrides] ifdef CROSSCOMPILER AS = /p/sp2/gcc/bin/rs6000-gcc CC = /p/sp2/gcc/bin/rs6000-gcc CXX = /p/sp2/gcc/bin/rs6000-gcc AR = /p/sp2/gcc/rs6000/bin/ar RANLIB = /p/sp2/gcc/rs6000/bin/ranlib endif ifeq (solaris,$(findstring solaris,$(PLATFORM))) AS = /usr/ccs/bin/as RANLIB = true endif ifeq (linux,$(findstring linux,$(PLATFORM))) AS = /usr/bin/as RANLIB = true endif # Default module compiler; modules which want $(CC) should redefine # this, **NOT** CC MODCC = $(CXX) MODCFLAGS = $(CXXFLAGS) .SUFFIXES: .I IFLAGS = -I. -I$(TO_CORE) ASFLAGS = -P $(ARCH_DEF) # uncomment/comment the line below to build with/without compilation warnings # SILENCE_WARNINGS=true ifndef SILENCE_WARNINGS BASICWARNINGS = -W -Wall COMMONWARNINGS = -W -Wall -Wshadow -Wpointer-arith \ -Wcast-qual \ -Wconversion \ -Wmissing-prototypes \ -Wredundant-decls -Woverloaded-virtual # not as strict as above, but can actually be used -- mdc USEFULWARNINGS = -W -Wall -Wpointer-arith \ -Wcast-qual \ -Wconversion \ -Wmissing-prototypes \ -Woverloaded-virtual # being nice to poor old pathetic tcl/tk header files --ari TCLFRIENDLYWARNINGS = -W -Wall -Wpointer-arith \ -Wcast-qual \ -Wconversion \ -Wmissing-prototypes \ -Woverloaded-virtual ifeq (solaris,$(findstring solaris,$(PLATFORM))) COMMONWARNINGS += -Wno-unknown-pragmas USEFULWARNINGS += -Wno-unknown-pragmas TCLFRIENDLYWARNINGS += -Wno-unknown-pragmas else # STL on Solaris with cast-align generates a warning with much output COMMONWARNINGS += -Wcast-align USEFULWARNINGS += -Wcast-align endif endif # SILENCE_WARNINGS ifndef GCC_2_95 GCC_VER := $(shell gcc --version) ifneq (,$(findstring 2.95,$(GCC_VER))) GCC_2_95 = true endif endif ifndef OLD_GCC GCC_VER := $(shell gcc --version) versionNumbers = $(sort $(GCC_VER), 2.95) versionNumber = $(firstword $(versionNumbers)) ifneq (2.95, $(versionNumber)) OLD_GCC = true endif endif ifndef OLD_GCC COMMONWARNINGS += -Wno-non-template-friend USEFULWARNINGS += -Wno-non-template-friend TCLFRIENDLYWARNINGS += -Wno-non-template-friend endif #don't inline -- for the files that won't emit template code INLINE_DEFINES = #inline the private members of the class -- templates.o can use this TEMP_INLINE_DEFINES = -DDO_INLINE_P="inline" # inline everything -- the way things should be ALL_INLINE_DEFINES = -DDO_INLINE_F="inline" -DDO_INLINE_P="inline" USES_MT_THREAD = ifeq (solaris,$(findstring solaris,$(PLATFORM))) USES_LIBDYNINST_SO = true USES_DYNAMIC_INF_HEAP = true endif ifeq (linux,$(findstring linux,$(PLATFORM))) USES_LIBDYNINST_SO = true USES_DYNAMIC_INF_HEAP = true ifndef IBM_BPATCH_COMPAT DETACH_ON_THE_FLY = true endif endif ifeq (irix,$(findstring irix,$(PLATFORM))) USES_LIBDYNINST_SO = true USES_DYNAMIC_INF_HEAP = true USES_NATIVE_CC = true USE_IRIX_FIXES = true endif ifeq (osf,$(findstring osf,$(PLATFORM))) USES_LIBDYNINST_SO = true USES_DYNAMIC_INF_HEAP = true endif ifeq (rs6000,$(findstring rs6000,$(PLATFORM))) USES_LIBDYNINST_SO = true USES_DYNAMIC_INF_HEAP = true USES_PERF_LIBRARY = true #USES_LIB_TEXT_HEAP = true # Uncomment if you want to use cc to build the RT libraries #USES_NATIVE_CC = true endif # if we don't want OPT_FLAG defined for a particular part of the code # (e.g. rtinst for aix), we just need to define NO_OPT_FLAG before doing # the include of make.config - naim ifndef NO_OPT_FLAG OPT_FLAG = -O3 endif # flags for normal (non-kludge) files, with common warnings CFLAGS = $(IFLAGS) $(ARCH_DEF) $(OPT_FLAG) $(COMMON_WARNINGS) CXXFLAGS = $(IFLAGS) $(ARCH_DEF) $(OPT_FLAG) $(COMMON_WARNINGS) # flags for kludge files, won't have warnings generated KFLAGS = $(IFLAGS) $(ARCH_DEF) $(BASICWARNINGS) ifdef USING_PURIFY CFLAGS += -DPURE_BUILD CXXFLAGS += -DPURE_BUILD endif ifdef USES_MT_THREAD CFLAGS += -DMT_THREAD CXXFLAGS += -DMT_THREAD endif ifdef USES_PERF_LIBRARY # Add any platform-specific performance libraries here ifeq (rs6000,$(findstring rs6000,$(PLATFORM))) USES_PMAPI = true endif endif ifdef USES_DYNAMIC_INF_HEAP CFLAGS += -DUSES_DYNAMIC_INF_HEAP CXXFLAGS += -DUSES_DYNAMIC_INF_HEAP endif ifdef USE_STL_VECTOR CXXFLAGS += -DUSE_STL_VECTOR CFLAGS += -fimplicit-templates CXXFLAGS += -fimplicit-templates endif ifdef IBM_BPATCH_COMPAT CXXFLAGS += -DIBM_BPATCH_COMPAT CFLAGS += -DIBM_BPATCH_COMPAT endif ifdef DETACH_ON_THE_FLY CFLAGS += -DDETACH_ON_THE_FLY CXXFLAGS += -DDETACH_ON_THE_FLY endif ifndef OPT_FLAG KFLAGS += -g ifndef DEBUG_FLAG DEBUG_FLAG = -g endif endif ifeq ($(DEBUG_FLAG),none) DEBUG_FLAG = endif ifdef DEBUG_FLAG CFLAGS += $(DEBUG_FLAG) CXXFLAGS += $(DEBUG_FLAG) KFLAGS += $(DEBUG_FLAG) endif # flags for template files, don't define external template flags # -g is optional in this case -- should be defined at module level TFLAGS = $(IFLAGS) $(TEMP_INLINE_DEFINES) $(ARCH_DEF) $(OPT_FLAG) $(BASICWARNINGS) ifdef USES_MT_THREAD TFLAGS += -DMT_THREAD endif ifdef USE_STL_VECTOR TFLAGS += -DUSE_STL_VECTOR TFLAGS += -fimplicit-templates endif ifdef DETACH_ON_THE_FLY TFLAGS += -DDETACH_ON_THE_FLY endif ifdef USE_IRIX_FIXES CFLAGS += -DUSE_IRIX_FIXES CXXFLAGS += -DUSE_IRIX_FIXES endif ifdef DO_INLINE_ALL CFLAGS += $(ALL_INLINE_DEFINES) CXXFLAGS += $(ALL_INLINE_DEFINES) endif # Start off LIBDIR to point to the user's devel area's paradyn lib directory. # As a backup, in case the user hasn't checked out & compiled some paradyn lib, # we stick in (BACKUP_CORE)/lib _second_. LIBDIR = -L$(TO_CORE)/../lib/$(PLATFORM) \ -L$(BACKUP_CORE)/../lib/$(PLATFORM) # Set IGEN to point to $(TO_CORE)/../bin/$(PLATFORM)/igen, if it exists, # else set it to $(BACKUP_CORE)/../bin/$(PLATFORM)/igen, if it exists, # else set it to just "igen" (i.e. assume it's in the user's path) ifdef CROSSCOMPILER IGEN = $(shell if [ -f $(TO_CORE)/../bin/$(BASEPLATFORM)/igen ]; then echo $(TO_CORE)/../bin/$(BASEPLATFORM)/igen; else if [ -f $(BACKUP_CORE)/../bin/$(BASEPLATFORM)/igen ]; then echo $(BACKUP_CORE)/../bin/$(BASEPLATFORM)/igen; else echo igen; fi; fi ) else IGEN = $(shell if [ -f $(TO_CORE)/../bin/$(PLATFORM)/igen ]; then echo $(TO_CORE)/../bin/$(PLATFORM)/igen; else if [ -f $(BACKUP_CORE)/../bin/$(PLATFORM)/igen ]; then echo $(BACKUP_CORE)/../bin/$(PLATFORM)/igen; else echo igen; fi; fi ) endif ifdef NO_IMPLICIT_TEMPLATES ifndef USE_STL_VECTOR CFLAGS += -fno-implicit-templates CXXFLAGS += -fno-implicit-templates KFLAGS += -fno-implicit-templates endif endif ifndef INSTANTIATE_TEMPLATES ifndef NO_IMPLICIT_TEMPLATES # -fexternal-templates and -Dexternal_templates should both be used or # neither should be used; add them to CFLAGS, CXXFLAGS, and KFLAGS # (but not to TFLAGS). # CFLAGS += -fexternal-templates -Dexternal_templates CXXFLAGS += -fexternal-templates -Dexternal_templates KFLAGS += -fexternal-templates -Dexternal_templates endif endif ifdef INCLUDE_CP_PROFILING INCLUDE_PVM_SUPPORT=true USES_PVM=true endif # ***** EXTERNAL SOFTWARE CONFIGURATION ***** ifdef INCLUDE_PVM_SUPPORT ifndef PVM_ROOT BUILDERROR: PVM_ROOT must be defined in environment to build (and run) Paradyn endif ifndef PVM_ARCH BUILDERROR: PVM_ARCH must be defined in environment to build (and run) Paradyn endif ifdef USES_PVM PVM_INCDIR = $(PVM_ROOT)/include PVM_LIBDIR = $(PVM_ROOT)/lib/$(PVM_ARCH) PVM_LIB = -lpvm3 IFLAGS += -I$(PVM_INCDIR) LIBDIR += $(patsubst %,-L%,$(PVM_LIBDIR)) VPATH += $(PVM_LIBDIR) endif endif ifdef USES_LIBHRTIME HRTIME_ROOT = /p/paradyn/packages/libhrtime-0.6 HRTIME_INCDIR = $(HRTIME_ROOT)/include HRTIME_LIBDIR = $(HRTIME_ROOT)/lib HRTIME_LIB = -Wl,-static -lhrtime -Wl,-Bdynamic IFLAGS += -I$(HRTIME_INCDIR) LIBDIR += $(patsubst %,-L%,$(HRTIME_LIBDIR)) CFLAGS += -DHRTIME CXXFLAGS += -DHRTIME TFLAGS += -DHRTIME endif ifdef USES_TCLTK TCLTK_DIR = /p/paradyn/packages/tcl8.3.0 TCLTK_INCLUDES = $(TCLTK_DIR)/include TCLTK_LIBVER_ID = 8.3 TCL_LIB = -ltcl$(TCLTK_LIBVER_ID) TK_LIB = -ltk$(TCLTK_LIBVER_ID) TCLTK_LIBS = $(TCL_LIB) $(TK_LIB) # TCL2C is used to generate compilable sources from tcl files TCL2C = $(TO_CORE)/../scripts/tcl2c TCL2C_GEN_SRCS = tcl2c.C IFLAGS += $(patsubst %,-I%,$(TCLTK_INCLUDES)) ifdef CROSSCOMPILER LIBDIR += $(patsubst %,-L%/rs_aix41/lib,$(TCLTK_DIR)) else LIBDIR += $(patsubst %,-L%/lib,$(TCLTK_DIR)) endif endif # USES_TCLTK ifdef USES_FLEX FLEX_LIB = -lfl FLEX_DIR = /s/flex/lib #FLEX_DIR = /usr/imports/flex-2.5.4a/lib/ LIBDIR += $(patsubst %,-L%,$(FLEX_DIR)) VPATH += $(FLEX_DIR) endif ifdef CROSSCOMPILER FLEX_DIR = /s/flex/rs_aix41/lib LIBDIR += -L/p/sp2/gcc/lib endif ifdef USES_LIBERTY # Since libiberty.a is in the same g++ directory as libstdc++.a and # libg++.a, no need for a "-L$(LIBERTY_DIR)" entry -at endif ifdef USES_X11 X11_LIB = -lX11 ifeq (solaris,$(findstring solaris,$(PLATFORM))) X11DIR = /usr/openwin CFLAGS += -I$(X11DIR)/include CXXFLAGS += -I$(X11DIR)/include TFLAGS += -I$(X11DIR)/include LIBDIR += -R$(X11DIR)/lib -L$(X11DIR)/lib endif ifeq (linux,$(findstring linux,$(PLATFORM))) X11DIR = /usr/X11R6 CFLAGS += -I$(X11DIR)/include/X11 CXXFLAGS += -I$(X11DIR)/include/X11 TFLAGS += -I$(X11DIR)/include/X11 LIBDIR += -L$(X11DIR)/lib endif ifeq (aix,$(findstring aix,$(PLATFORM))) X11DIR = /usr endif endif # USES_X11 THREADSLIB = #USE_PTHREADS = no ifeq (xyes,x$(USE_PTHREADS)) THREADSLIB += -lpthread endif # System build constraints ifneq (sparc-sun-solaris,$(findstring sparc-sun-solaris,$(PLATFORM))) DONT_BUILD_PD_MT=true endif # Include any per-user configuration changes; this "local" config file # should *not* be under CVS control, so that it never gets committed. -include $(TO_CORE)/make.config.local