# # # Copyright (C) 2000, 2001 Silicon Graphics, Inc. All Rights Reserved. # # This program is free software; you can redistribute it and/or modify it # under the terms of version 2 of the GNU General Public License as # published by the Free Software Foundation. # # This program is distributed in the hope that it would be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. # # Further, this software is distributed without any warranty that it is # free of the rightful claim of any third person regarding infringement # or the like. Any license provided herein, whether implied or # otherwise, applies only to this software file. Patent licenses, if # any, provided herein do not apply to combinations of this program with # other software, or any other product whatsoever. # # You should have received a copy of the GNU General Public License along # with this program; if not, write the Free Software Foundation, Inc., 59 # Temple Place - Suite 330, Boston MA 02111-1307, USA. # # Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pky, # Mountain View, CA 94043, or: # # http://www.sgi.com # # For further information regarding this notice, see: # # http://oss.sgi.com/projects/GenInfo/NoticeExplan # # # # Makefile.base for libcomutil # include $(COMMONDEFS) ifeq ($(BUILD_OPTIMIZE), DEBUG) # HOSTDEFS += -DIs_True_On HOSTDEFS += -DInsist_On endif ifeq ($(BUILD_COMPILER), VENDOR) ifeq ($(BUILD_OS), IRIX) CVERSION = -xansi WOFF = -fullwarn endif else CVERSION = WOFF = endif LASOPTS = $(STD_COMPILE_OPTS) LCOPTS = $(STD_COMPILE_OPTS) LCDEFS += $(HOSTDEFS) $(TARGDEFS) LCXXOPTS = $(STD_COMPILE_OPTS) LCXXDEFS += $(HOSTDEFS) $(TARGDEFS) ifeq ($(BUILD_COMPILER), GNU) #LCOPTS += -fwritable-strings #LCXXOPTS += -fwritable-strings endif #-------------------------------------------------------------------------- # define LCINCS #-------------------------------------------------------------------------- COMMON_COM_DIR = $(BUILD_TOT)/common/com COMMON_COM_TARG_DIR = $(BUILD_TOT)/common/com/ia64 INCLUDE_DIR = $(BUILD_TOT)/include LCINCS = -I$(BUILD_BASE) -I$(COMMON_COM_DIR) -I$(COMMON_COM_TARG_DIR) \ -I$(INCLUDE_DIR) ifeq ($(BUILD_OS), LINUX) LCINCS += -I$(BUILD_AREA)/include endif LCXXINCS = $(LCINCS) LIBRARY = libcomutil.a TARGETS = $(LIBRARY) # only build mips3 version and install in default place ifeq ($(BUILD_TARGET), MIPS) STD_LIBRARY_LOC=$(DEF_LIBRARY_LOC) endif #-------------------------------------------------------------------------- # List of Source files #-------------------------------------------------------------------------- ifeq ($(BUILD_OS), IRIX) ifeq ($(BUILD_COMPILER), VENDOR) ASFILES = c_qwmultu.s else CFIL = c_qwmultu.c endif else CFIL = c_qwmultu.c endif CFILES = \ bitset.c \ c_a_to_q.c \ c_q_add.c \ c_q_div.c \ c_q_mul.c \ c_q_neg.c \ c_q_rel.c \ c_q_sqrt.c \ c_q_sub.c \ c_q_to_a.c \ c_qtenscale.c \ file_util.c \ flags.c \ linklist.c \ memory.c \ priority_queue.c \ quadsim.c \ resource.c \ mstack.c \ tracing.c \ util.c \ vstring.c \ $(CFIL) HFILES = \ libcomutil.h \ bitset.h \ errors.h \ file_util.h \ flags.h \ linklist.h \ mempool.h \ cxx_memory.h \ quad.h \ quadsim.h \ priority_queue.h \ resource.h \ mstack.h \ tracing.h \ util.h \ vstring.h CXXFILES = \ cxx_memory.cxx \ errors.cxx \ #-------------------------------------------------------------------------- # Platform specific options #-------------------------------------------------------------------------- ifeq ($(BUILD_OS), IRIX) ifeq ($(BUILD_COMPILER), VENDOR) WOFF = -woff 1164,1196,1174,1209,1233,1506,1552,3201 endif CFLAGS += -D_SGI_SGI CXXFLAGS += -D_SGI_SGI endif ifeq ($(filter LINUX TRU64, $(BUILD_OS)), $(BUILD_OS)) CFLAGS += -D_LINUX_LINUX CXXFLAGS += -D_LINUX_LINUX endif ifeq ($(BUILD_OS), SOLARIS) CFLAGS = -D_SOLARIS_SOLARIS -D_SOLARIS $(LCINCS) $(OPTIMIZER) ifeq ($(BUILD_COMPILER), VENDOR) ifeq ($(BUILD_SB), YES) CFLAGS += -xsb endif endif CXXFLAGS := $(CFLAGS) endif #-------------------------------------------------------------------------- VPATH = $(BUILD_BASE) $(BUILD_BASE)/$(BUILD_TARGET_DIR) default: first depends $(TARGETS) last #---------------------------------------------------------------------- # The commands in this section are done BEFORE any other target is # built. #---------------------------------------------------------------------- ifeq ($(BUILD_OS), LINUX) first: cd $(BUILD_AREA)/include && $(MAKE) else first: endif include $(BUILD_TOT)/Makeinclude #---------------------------------------------------------------------- # The commands in this section are done AFTER every other target is # built. #---------------------------------------------------------------------- DIRTS = $(OBJECTS) REAL_OBJS = $(filter %.o,$(OBJECTS)) ifeq ($(BUILD_OS), OSX) $(LIBRARY) : $(REAL_OBJS) $(AR) r $@ $(REAL_OBJS) ranlib $(LIBRARY) else $(LIBRARY) : $(REAL_OBJS) $(AR) r $@ $(REAL_OBJS) endif #---------------------------------------------------------------------- # installation #---------------------------------------------------------------------- exports: default $(INSTALL) -m 444 -F $(STD_LIBRARY_LOC) $(TARGETS) install: default $(STD_INSTALL) -m 444 -F $(STD_LIBRARY_LOC) $(TARGETS) #---------------------------------------------------------------------- # Include the usual commonrules #---------------------------------------------------------------------- include $(COMMONRULES) #---------------------------------------------------------------------- # Special case rules for files that want to be individualistic #---------------------------------------------------------------------- ifeq ($(BUILD_ABI), I32BIT) ifeq ($(BUILD_TARGET), IA64) c_qwmultu.o: $(BUILD_TOT)/common/util/ia32/IA32_host/c_qwmultu.c $(CC) $(CFLAGS) -c $(BUILD_TOT)/common/util/ia32/IA32_host/c_qwmultu.c endif endif