# Paradyn overall build configuration (unix) # # $Id: make.config,v 1.75 2000/07/18 19:54:06 bernat Exp $ # SUITE_NAME = Paradyn RELEASE_NUM = 3.0 #BUILD_MARK = # 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.2) ARCH_DEF = -Di386_unknown_linux2_0 endif ifeq ($(PLATFORM),i386-unknown-solaris2.6) ARCH_DEF = -Di386_unknown_solaris2_5 endif ifeq ($(PLATFORM),sparc-sun-solaris2.6) 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 -Wtraditional -Wshadow -Wpointer-arith \ -Wbad-function-cast -Wcast-qual -Wcast-align \ -Wconversion -Wstrict-prototypes \ -Wmissing-prototypes -Wmissing-declarations \ -Wredundant-decls -Woverloaded-virtual # not as strict as above, but can actually be used -- mdc USEFULWARNINGS = -W -Wall -Wtraditional -Wpointer-arith \ -Wbad-function-cast -Wcast-qual -Wcast-align \ -Wconversion -Wstrict-prototypes \ -Wmissing-prototypes -Wmissing-declarations \ -Woverloaded-virtual # being nice to poor old pathetic tcl/tk header files --ari TCLFRIENDLYWARNINGS = -W -Wall -Wtraditional -Wpointer-arith \ -Wbad-function-cast -Wcast-qual \ -Wconversion -Wstrict-prototypes \ -Wmissing-prototypes -Wmissing-declarations \ -Woverloaded-virtual endif # SILENCE_WARNINGS ifndef GCC_2_95 GCC_VER := $(shell gcc --version) ifneq (,$(findstring 2.95,$(GCC_VER))) GCC_2_95 = true endif endif ifdef GCC_2_95 COMMONWARNINGS += -Wno-non-template-friend USEFULWARNINGS += -Wno-non-template-friend TCLFRIENDLYWARNINGS += -Wno-non-template-friend XFLAGS += -fpermissive 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_LIBDYNINSTRT_SO = true USES_LIBDYNINST_SO = true USES_DYNAMIC_INF_HEAP = true endif ifeq (linux,$(findstring linux,$(PLATFORM))) USES_LIBDYNINSTRT_SO = true USES_LIBDYNINST_SO = true USES_DYNAMIC_INF_HEAP = true DETACH_ON_THE_FLY = true endif ifeq (irix,$(findstring irix,$(PLATFORM))) USES_LIBDYNINSTRT_SO = true USES_LIBDYNINST_SO = true USES_DYNAMIC_INF_HEAP = true USES_NATIVE_CC = true endif ifeq ($(PLATFORM),alpha-dec-osf4.0) USES_LIBDYNINSTRT_SO = true USES_LIBDYNINST_SO = true USES_DYNAMIC_INF_HEAP = true endif ifeq (rs6000,$(findstring rs6000,$(PLATFORM))) #USES_LIBDYNINSTRT_SO = false #USESLIBDYNINST_SO = false USES_DYNAMIC_INF_HEAP = 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_LIBDYNINSTRT_SO CFLAGS += -DUSES_LIBDYNINSTRT_SO CXXFLAGS += -DUSES_LIBDYNINSTRT_SO endif ifdef USES_DYNAMIC_INF_HEAP CFLAGS += -DUSES_DYNAMIC_INF_HEAP CXXFLAGS += -DUSES_DYNAMIC_INF_HEAP 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 USES_LIBDYNINSTRT_SO TFLAGS += -DUSES_LIBDYNINSTRT_SO endif ifdef DETACH_ON_THE_FLY TFLAGS += -DDETACH_ON_THE_FLY 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 CFLAGS += -fno-implicit-templates CXXFLAGS += -fno-implicit-templates KFLAGS += -fno-implicit-templates 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_TCLTK TCLTK_DIR = /p/paradyn/packages/tcl8.3.0 TCLTK_LIBS = -ltk8.3 -ltcl8.3 # Set TCL2C to $(TO_CORE)/tclStuff/tcl2c, if it exists, else # set it to $(BACKUP_CORE)/tclStuff/tcl2c, if it exists, else # set it to just tcl2c (i.e. assume it's in the user's shell path) TCL2C = $(shell if [ -f $(TO_CORE)/tclStuff/tcl2c ]; then echo $(TO_CORE)/tclStuff/tcl2c; else if [ -f $(BACKUP_CORE)/tclStuff/tcl2c ]; then echo $(BACKUP_CORE)/tclStuff/tcl2c; else echo tcl2c; fi; fi ) TCL2C_GEN_SRCS = tcl2c.C # Set TCLTK_INCLUDES to $(TO_CORE)/tclStuff/include, if it exists, # else set it to $(BACKUP_CORE)/tclStuff/include. TCLTK_INCLUDES = $(TCLTK_DIR)/include 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 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 (linux,$(findstring linux,$(PLATFORM))) X11DIR = /usr/X11R6 #else #X11DIR = /usr/openwin #endif ifeq (solaris,$(findstring solaris,$(PLATFORM))) CFLAGS += -I$(X11DIR)/include CXXFLAGS += -I$(X11DIR)/include TFLAGS += -I$(X11DIR)/include LIBDIR += -R$(X11DIR)/lib -L$(X11DIR)/lib VPATH += $(X11DIR)/lib endif ifeq (linux,$(findstring linux,$(PLATFORM))) CFLAGS += -I$(X11DIR)/include/X11 CXXFLAGS += -I$(X11DIR)/include/X11 TFLAGS += -I$(X11DIR)/include/X11 LIBDIR += -L$(X11DIR)/lib VPATH += $(X11DIR)/include/X11 endif endif # USES_X11 # 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