# # $Log: make.config,v $ # Revision 1.40 1997/08/19 19:50:20 naim # Adding support to dynamically link libdyninstRT by using dlopen on sparc- # solaris - naim # # Revision 1.39 1997/05/07 19:03:40 naim # Getting rid of old support for threads and turning it off until the new # version is finished. Additionally, new superTable, baseTable and superVector # classes for future support of multiple threads. The fastInferiorHeap class has # also changed - naim # # Revision 1.38 1997/02/28 15:54:50 naim # Turning MT_THREAD flag to "true" in order to use vector of counter/timers - naim # # Revision 1.37 1997/01/27 19:35:52 naim # Part of the base instrumentation for supporting multithreaded applications # (vectors of counter/timers) implemented for all current platforms + # different bug fixes - naim # # Revision 1.36 1996/11/26 16:02:13 naim # Implementation of cross-compiler (sparc-solaris,x86-solaris)->rs6000 - naim # # Revision 1.35 1996/11/08 23:38:17 tamches # added support for a DEBUG_FLAG of 'none' # # Revision 1.34 1996/10/28 23:05:52 tamches # added DEBUG_FLAG feature # # Revision 1.33 1996/10/18 23:46:03 mjrg # Solaris/X86 port # # Revision 1.32 1996/08/05 07:08:18 tamches # Added BACKUP_CORE, which removes several "/p/paradyn" dependencies. # Upgraded to tcl 7.5 # removed obsolete USES_BLT # removed AIX kludges for FLEX_DIR # # Revision 1.31 1996/05/12 04:36:48 tamches # FLEX_DIR in /usr/local/lib for aix 4.1 # # Revision 1.30 1996/04/06 21:18:08 hollings # Removed write-strings warning (eliminates several thousand warnings on AIX # that are due to bad system header files). # # Revision 1.29 1996/01/05 19:43:18 tamches # IGEN, TCL2C, and TCLTK_INCLUDES (IGEN is a new variable) set more # intelligently (we look for several possibilities) # # Revision 1.28 1995/12/29 20:09:30 tamches # Changed the collector to gcc 2.7.1's "ld", from 2.6.3 # # Revision 1.27 1995/12/20 01:09:55 tamches # removed -L/usr/psup/lib from LIBDIR # removed TCLTK_DIRS, replacing with 2 different things: # TCLTK_INCLUDES and TCLTK_LIBS # TCL2C and TCL2C_GEN_SRCS added # changed FLEX_DIR to a new directory # removed LIBERTY_DIR and associated stuff (not needed anymore) # AS = /bin/as CC = gcc ifdef CROSSCOMPILER AS = /p/sp2/gcc/bin/rs6000-gcc CC = /p/sp2/gcc/bin/rs6000-gcc endif CXX = g++ LEX = flex RANLIB = ranlib AR = ar YFLAGS = -d -y YACC = bison # COLLECTOR is only used by purify & quantify COLLECTOR = /s/gcc-2.7.2/bin/../lib/gcc-lib/$(PLATFORM)/2.7.2/ld ifdef CROSSCOMPILER CXX = /p/sp2/gcc/bin/rs6000-gcc AR = /p/sp2/gcc/rs6000/bin/ar RANLIB = /p/sp2/gcc/rs6000/bin/ranlib endif ifeq ($(PLATFORM),sparc-sun-solaris2.4) AS = /usr/ccs/bin/as RANLIB = true endif ifeq ($(PLATFORM),i386-unknown-solaris2.5) AS = /usr/ccs/bin/as RANLIB = true endif ifeq ($(PLATFORM),hppa1.1-hp-hpux) COLLECTOR = /usr/psup/gcc-2.6.3/lib/gcc-lib/hppa1.1-hp-hpux9.01/2.6.3/ld endif ifdef PLATFORM ARCH_DEF = -D$(shell echo $$PLATFORM | perl -pe 's/\./_/g;s/-/_/g') else ERROR PLATFORM MUST BE DEFINED IN ORDER TO BUILD PARADYN 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 # 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 # Default module compiler; modules which want $(CC) should redefine # this, **NOT** CC MODCC = $(CXX) MODCFLAGS = $(CXXFLAGS) .SUFFIXES: .I # VPATH = ../src:$(TO_CORE)/../lib/$(PLATFORM):/p/paradyn/lib/$(PLATFORM) IFLAGS = -I. -I$(TO_CORE) ASFLAGS = -P $(ARCH_DEF) 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 #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 ($(PLATFORM),sparc-sun-solaris2.4) USES_LIBDYNINSTRT_SO = true endif CFLAGS = $(IFLAGS) -Wall $(ARCH_DEF) CXXFLAGS = $(IFLAGS) -Wall $(ARCH_DEF) ifdef USES_MT_THREAD CFLAGS += -DMT_THREAD CXXFLAGS += -DMT_THREAD endif ifdef USES_LIBDYNINSTRT_SO CFLAGS += -DUSES_LIBDYNINSTRT_SO CXXFLAGS += -DUSES_LIBDYNINSTRT_SO endif # flags for kludge files, won't have warnings generated KFLAGS = $(IFLAGS) -g -Wall $(ARCH_DEF) ifndef DEBUG_FLAG DEBUG_FLAG = -g 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) -Wall $(TEMP_INLINE_DEFINES) $(ARCH_DEF) ifdef USES_MT_THREAD TFLAGS += -DMT_THREAD endif ifdef USES_LIBDYNINSTRT_SO TFLAGS += -DUSES_LIBDYNINSTRT_SO 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 TFLAGS += -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 USES_PVM PVM_DIR = $(PVM_ROOT)/lib/$(PVM_ARCH) IFLAGS += -I$(PVM_ROOT)/include LIBDIR += $(patsubst %,-L%,$(PVM_DIR)) VPATH += $(PVM_DIR) endif ifdef USES_TCLTK # 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 = $(shell if [ -d $(TO_CORE)/tclStuff/include ]; then echo $(TO_CORE)/tclStuff/include; else echo $(BACKUP_CORE)/tclStuff/include; fi ) TCLTK_LIBS = /p/paradyn/packages/tcl7.5 IFLAGS += $(patsubst %,-I%,$(TCLTK_INCLUDES)) ifdef CROSSCOMPILER LIBDIR += $(patsubst %,-L%/rs_aix41/lib,$(TCLTK_LIBS)) else LIBDIR += $(patsubst %,-L%/lib,$(TCLTK_LIBS)) endif endif ifdef USES_FLEX 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 ifeq ($(PLATFORM),sparc-sun-solaris2.4) CFLAGS += -I/usr/openwin/include CXXFLAGS += -I/usr/openwin/include TFLAGS += -I/usr/openwin/include LIBDIR += -R/usr/openwin/lib -L/usr/openwin/lib VPATH += /usr/openwin/lib endif ifeq ($(PLATFORM),i386-unknown-solaris2.5) CFLAGS += -I/usr/openwin/include CXXFLAGS += -I/usr/openwin/include TFLAGS += -I/usr/openwin/include LIBDIR += -R/usr/openwin/lib -L/usr/openwin/lib VPATH += /usr/openwin/lib endif 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