############################################################################### # # arch_spec_Inventor.mk # # Set up for: GL, Inventor, and Hepvis # ############################################################################### # # Joe Boudreau March 1998. # # There are four concievable compilers in use so there will be four different # Hepvis libraries, one for the KAI compiler, one for the Native Compiler, one # for the SGI native compiler compiled with the -n32 flags, and one for the # gnu compiler. So first, we figure out which of these situations we're in. # # Open Inventor may come from SGI or from TGS. If it comes from SGI, then # it's located in the system area. If it comes from TGS, it's in the # products area. So, we then figure out where our open inventor distribution # is coming from. # ############################################################################### # # Lucas Taylor 4 Dec 1998 # # Modified for CMS (especially on Sun) # # Move Motif stuff to: arch_spec_X11.mk # ############################################################################### ############################################################################### # # Identify the compiler and choose the directory extension accordingly. (FNAL) # ############################################################################### ifneq (,$(findstring KCC,$(BFARCH))) COMP=KCC else ifneq (,$(findstring IRIX6-CC,$(BFARCH))) COMP=CCN32 else ifneq (,$(findstring -CC,$(BFARCH))) COMP=CC else COMP=g++ endif endif endif ############################################################################### # # Set CMS defaults (Sun for now...) # ############################################################################### ifeq ("_CMS","$(EXPERIMENT)") ifndef OGL_DIR # # Inventor (at CERN) expects to find GL in /opt/opengl (on Sun) # OGL_DIR = /opt/opengl endif ifndef OIV_DIR OIV_DIR = /afs/cern.ch/sw/lhcxx/specific/@sys/OpenInventor/pro endif ifndef HEPVIS_DIR HEPVIS_DIR = /afs/cern.ch/user/c/cmscan/local_Hepvis endif OGL_INC =$(OGL_DIR)/include OGL_LIB =$(OGL_DIR)/lib OIV_INC =$(OIV_DIR)/include OIV_LIB =$(OIV_DIR)/lib HEPVIS_INC =$(HEPVIS_DIR)/include HEPVIS_LIB =$(HEPVIS_DIR)/lib HEPVISINC =$(HEPVIS_INC) HEPVISLIB =$(HEPVIS_LIB) endif ############################################################################### # # Check if OI from TGS is installed. Hepvis libs for use with OI have # a different directory structure, a subdirectory for each compiler. # # Changed to cope with Hepvis v4_x directory structure, 2 Dec 98 CG # ############################################################################### ifeq (,$(findstring v3,$(HEPVIS_DIR))) ifeq (D0,$(EXPERIMENT)) ifneq (,$(findstring IRIX,$(BFARCH))) override CPPFLAGS += -I$(HEPVIS_DIR)/KCC_N32_EX/include override LDFLAGS += -L$(HEPVIS_DIR)/KCC_N32_EX/lib else override CPPFLAGS += -I$(HEPVIS_DIR)/KCC_EX/include override LDFLAGS += -L$(HEPVIS_DIR)/KCC_EX/lib endif else override CPPFLAGS += -I$(HEPVISINC) # properly defined for Hepvis v4_x and higher override LDFLAGS += -L$(HEPVISLIB) endif else ifdef OIV_DIR HEPVIS_INC := $(HEPVIS_DIR)/include HEPVIS_LIB := $(HEPVIS_DIR)/lib$(COMP) else HEPVIS_INC := $(HEPVIS_DIR)/include HEPVIS_LIB := $(HEPVIS_DIR)/lib endif override CPPFLAGS += -I$(HEPVIS_INC) override LDFLAGS += -L$(HEPVIS_LIB) endif override LOADLIBES += -lHEPVis ############################################################################### # # See if we have a TGS/OI or an SGI/OI (FNAL) # ############################################################################## ifdef OIV_DIR OIV_INC = $(OIV_DIR)/include OIV_LIB = $(OIV_DIR)/lib # OIV_LIB = $(OIV_DIR)/lib$(COMP) # Comp. Division should toggle the above kludge. JeffK will work # on realizing this.... ifeq (D0,$(EXPERIMENT)) ifneq (,$(findstring IRIX,$(BFARCH))) OIV_LIB = $(OIV_DIR)/libKCC_N32_EX else OIV_LIB = $(OIV_DIR)/libKCC_EX endif endif override CPPFLAGS += -I$(OIV_INC) override LDFLAGS += -L$(OIV_LIB) endif ############################################################################### # # Add directories to include and lib paths # ############################################################################## ifneq (,$(OIV_INC)) override CPPFLAGS += -I$(OIV_INC) endif ifneq (,$(OGL_INC)) override CPPFLAGS += -I$(OGL_INC) endif ifneq (,$(OIV_LIB)) override LDFLAGS += -L$(OIV_LIB) endif ifneq (,$(OGL_LIB)) override LDFLAGS += -L$(OGL_LIB) endif ############################################################################### # # Inventor and GL libraries # ############################################################################### override LOADLIBES += -lInventorXt -lInventor -limage ifneq (,$(findstring KCC,$(BFARCH))) # TGS Inventor for KAI has a circular dependency => we need it twice override LOADLIBES += -lInventor endif ifneq (,$(findstring HEPVis,$(LOADLIBES))) override LOADLIBES += -lGLU -lGL ifeq (D0,$(EXPERIMENT)) ifneq (,$(MESA_DIR)) override CPPFLAGS += -I$(MESA_DIR)/include override LDFLAGS += -L$(MESA_DIR)/lib endif endif endif ############################################################################### # # X11 libraries -- should really get them from arch_spec_X11.mk !? (L.T. / CMS) # ############################################################################### ifneq (_CMS,$(EXPERIMENT)) ifneq (,$(findstring Linux,$(BFARCH))) override LDFLAGS += -L/usr/X11R6/lib override LOADLIBES += -lm -lXm -lXp -lXt -lSM -lICE -lXext -lX11 -lXi -ldl else override LOADLIBES += -lm -lXm -lXt -lXext -lX11 -lSM -lICE endif endif