# # # 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 targ_info # # # Verify that BUILD_TYPE is "SHARED" only. # ifneq ($(BUILD_TYPE), SHARED) default: @echo Error: Only BUILD_TYPE = SHARED is supported - $(BUILD_TYPE). @exit 1 endif #---------------------------------------------------------------------- # Include the usual commondefs #---------------------------------------------------------------------- include $(COMMONDEFS) #---------------------------------------------------------------------- # Set environment variables #---------------------------------------------------------------------- ifeq ($(BUILD_COMPILER), EDG) CVERSION = -xansi WOFF = -fullwarn else CVERSION = WOFF = endif RUN = ifeq ($(BUILD_ARCH), IA64) ifeq ($(BUILD_HOSTARCH), IA32) RUN = medusa -batch endif endif #---------------------------------------------------------------------- # Compiler Options #---------------------------------------------------------------------- HOSTDEFS = TARGDEFS = #---------------------------------------------------------------------- # List of directories, and source files of interest #---------------------------------------------------------------------- CURRENT_DIR = . COMMON_DIR = $(BUILD_TOT)/common COMMON_COM_DIR = $(COMMON_DIR)/com TARGINFO_DIR = $(BUILD_BASE) TARGINFO_ACCESS_DIR = $(TARGINFO_DIR)/access TARGINFO_GENERATE_DIR = $(TARGINFO_DIR)/generate ifeq ($(BUILD_TARGET), MIPS) BUILD_TARGET_DIR = mips endif TARGINFO_ISA_DIR = $(TARGINFO_DIR)/isa/$(BUILD_TARGET_DIR) TARGINFO_ABI_DIR = $(TARGINFO_DIR)/abi/$(BUILD_TARGET_DIR) TARGINFO_PROC_DIR = $(TARGINFO_DIR)/proc/$(BUILD_TARGET_DIR) TARG_INCLUDE_DIR = $(BUILD_AREA)/include # These are the directories in which to look for source files. SRC_DIRS = \ $(CURRENT_DIR) \ $(TARGINFO_ACCESS_DIR) \ $(TARGINFO_GENERATE_DIR) \ $(TARGINFO_ISA_DIR) \ $(TARGINFO_PROC_DIR) \ $(TARGINFO_ABI_DIR) #---------------------------------------------------------------------- # List of source files. Please keep them in alphabetical order. #---------------------------------------------------------------------- #---------------------------------------------------------------------- # File containing the list of symbols exported outside of si.so #---------------------------------------------------------------------- ifeq ($(BUILD_COMPILER), EDG) SI_EXPORT_LIST = $(TARGINFO_GENERATE_DIR)/si.Exported endif VPATH = $(SRC_DIRS) LCOPTS = $(STD_COMPILE_OPTS) LCDEFS = $(HOSTDEFS) $(TARGDEFS) LCINCS = $(addprefix -I, $(SRC_DIRS)) LCXXOPTS = $(STD_COMPILE_OPTS) LCXXDEFS = $(HOSTDEFS) $(TARGDEFS) LCXXINCS = $(addprefix -I, $(SRC_DIRS)) # Optionally remove "-MDupdate Makedepend" so executables don't get # rebuilt every time LATEST libC etc. changes ifdef BUILD_EXEC_NO_MAKEDEPEND CXXLDFLAGS1 = $(CXXFLAGS:N-MDupdate) $(LDFLAGS) CXXLDFLAGS = $(CXXLDFLAGS1:NMakedepend) else CXXLDFLAGS = $(CXXFLAGS) $(LDFLAGS) endif # setup stuff to build shared GLDOPTS = $(STD_LOAD_OPTS) # we don't have a so_locations to update, so don't do anything DSOSTARTOPT = DSOSTARTOPT_32 = $(DSOSTARTOPT) DSOSTARTOPT_N32 = $(DSOSTARTOPT) LDIRT += *.[ch] *.Exported isa_gen isa_subset_gen isa_operands_gen \ isa_properties_gen isa_hazards_gen isa_pack_gen isa_print_gen \ isa_decode_gen isa_pseudo_gen isa_registers_gen isa_enums_gen \ isa_lits_gen abi_properties_gen proc_gen proc_properties_gen \ isa_bundle_gen si_gen.so ii_files so_locations ifeq ($(BUILD_TARGET), MIPS) LDIRT += r10000_si_gen r8000_si_gen r5000_si_gen r4000_si_gen SO_TARGETS = \ r10000.so \ r8000.so \ r5000.so \ r4000.so endif ifeq ($(BUILD_TARGET), IA64) LDIRT += itanium_si_gen SO_TARGETS = \ itanium.so endif ifeq ($(BUILD_TARGET), IA32) LDIRT += pentium_si_gen SO_TARGETS = \ pentium.so endif HDRS_LOC = /usr/include/cmplrs/$(BUILD_TARGET_DIR) TARG_INFO_LIB = libtarginfo.a ifeq ($(BUILD_OS), LINUX) LIB_LOC = $(STD_MONGOOSE_LINUX_LOC) else LIB_LOC = $(STD_MONGOOSE_LOC) endif TARGINFO_ACCESS_SRCS = \ ti_asm.c \ ti_bundle.c \ ti_latency.c \ ti_errors.c TARGINFO_ACCESS_HDRS = $(TARGINFO_ACCESS_SRCS:.c=.h) TARGINFO_ACCESS_OBJS = $(TARGINFO_ACCESS_SRCS:.c=.o) TARG_INFO_SRCS = \ topcode.c \ targ_isa_subset.c \ targ_isa_properties.c \ targ_isa_enums.c \ targ_isa_hazards.c \ targ_isa_lits.c \ targ_isa_print.c \ targ_isa_pack.c \ targ_isa_operands.c \ targ_isa_registers.c \ targ_isa_decode.c \ targ_isa_pseudo.c \ targ_abi_properties.c \ targ_isa_bundle.c \ targ_proc.c \ targ_proc_properties.c TARG_INFO_HDRS = $(TARG_INFO_SRCS:.c=.h) TARG_INFO_OBJS = $(TARG_INFO_SRCS:.c=.o) LIBTARGINFO_OBJS = \ $(TARGINFO_ACCESS_OBJS) \ $(TARG_INFO_OBJS) TARGETS = \ $(SO_TARGETS) \ $(TARGINFO_ACCESS_HDRS) \ $(TARG_INFO_HDRS) \ $(TARG_INFO_SRCS) \ $(TARG_INFO_LIB) ifneq ($(BUILD_COMPILER), EDG) TARGETS += si_gen.a endif ifeq ($(BUILD_COMPILER), EDG) TARG_INFO_EXPORTED = $(TARG_INFO_SRCS:.c=.Exported) EXPORT_FILE = targinfo.Exported TARGETS += \ $(TARG_INFO_EXPORTED) \ $(EXPORT_FILE) endif #---------------------------------------------------------------------- # Variables describing additional sources, objects, and libraries #---------------------------------------------------------------------- LLDLIBS = default: first $(TARGETS) last #---------------------------------------------------------------------- # The commands in this section are done BEFORE any other target is # built. #---------------------------------------------------------------------- first: ifeq ($(BUILD_OS), LINUX) cd $(BUILD_AREA)/include && $(MAKE) endif #---------------------------------------------------------------------- # The commands in this section are done AFTER every other target is # built. #---------------------------------------------------------------------- last: make_deps #WEI: don't see why this needs to be set null #ifeq ($(BUILD_COMPILER), GNU) #SETPATH = LD_LIBRARY_PATH=. #else #SETPATH = #endif #---------------------------------------------------------------------- # # These rules build the targ_info objects and install the DSO's in the # /usr/lib32/cmplrs directory. # #---------------------------------------------------------------------- # to install header files, they must be in the current directory. ti_asm.h: ln -s $(TARGINFO_ACCESS_DIR)/ti_asm.h ti_asm.h ti_bundle.h: ln -s $(TARGINFO_ACCESS_DIR)/ti_bundle.h ti_bundle.h ti_latency.h: ln -s $(TARGINFO_ACCESS_DIR)/ti_latency.h ti_latency.h ti_errors.h: ln -s $(TARGINFO_ACCESS_DIR)/ti_errors.h ti_errors.h ti_asm.o: ti_asm.c topcode.h targ_isa_operands.h targ_isa_print.h \ targ_isa_pack.h targ_isa_bundle.h targ_isa_decode.h \ targ_isa_pseudo.h ti_errors.h ti_asm.h $(CC) $(CFLAGS) -c $(TARGINFO_ACCESS_DIR)/ti_asm.c ti_bundle.o: ti_bundle.c ti_si.h targ_isa_bundle.h ti_bundle.h $(CC) $(CFLAGS) -c $(TARGINFO_ACCESS_DIR)/ti_bundle.c ti_latency.o: ti_latency.c ti_si.h targ_isa_properties.h targ_isa_hazards.h \ targ_isa_subset.h ti_errors.h ti_latency.h $(CC) $(CFLAGS) -c $(TARGINFO_ACCESS_DIR)/ti_latency.c ti_errors.o: ti_errors.c ti_errors.h $(CC) $(CFLAGS) -c $(TARGINFO_ACCESS_DIR)/ti_errors.c topcode.o: isa_gen topcode.c $(CC) $(CFLAGS) -c topcode.c gen_util.o: gen_util.cxx gen_util.h $(CXX) $(CXXFLAGS) -c $(TARGINFO_GENERATE_DIR)/gen_util.cxx targ_proc.o: proc_gen targ_proc.c $(CC) $(CFLAGS) -c targ_proc.c ifeq ($(BUILD_COMPILER), EDG) topcode.Exported: topcode.h targ_isa_enums.Exported: targ_isa_enums.h targ_isa_lits.Exported: targ_isa_lits.h targ_isa_registers.Exported: targ_isa_registers.h targ_isa_hazards.Exported: targ_isa_hazards.h targ_isa_subset.Exported: targ_isa_subset.h targ_isa_properties.Exported: targ_isa_properties.h targ_isa_operands.Exported: targ_isa_operands.h targ_isa_pack.Exported: targ_isa_pack.h targ_isa_decode.Exported: targ_isa_decode.h targ_isa_pseudo.Exported: targ_isa_pseudo.h targ_isa_print.Exported: targ_isa_print.h targ_isa_bundle.Exported: targ_isa_bundle.h targ_abi_properties.Exported: targ_abi_properties.h targ_proc.Exported: targ_proc.h targ_proc_properties.Exported: targ_proc_properties.h endif ## topcode.[ch] ## topcode.c: topcode.h topcode.h: isa_gen $(RUN) ./isa_gen isa_gen: isa_gen.o gen_util.o isa.o $(CXX) $(CXXLDFLAGS) isa_gen.o gen_util.o isa.o -o isa_gen isa_gen.o: isa_gen.cxx isa_gen.h $(CXX) $(CXXFLAGS) -c $(TARGINFO_GENERATE_DIR)/isa_gen.cxx isa.o: isa.cxx isa_gen.h $(CXX) $(CXXFLAGS) -c $(TARGINFO_ISA_DIR)/isa.cxx ## targ_isa_enums.[ch] ## targ_isa_enums.c: targ_isa_enums.h targ_isa_enums.h: isa_enums_gen $(RUN) ./isa_enums_gen isa_enums_gen: isa_enums_gen.o gen_util.o isa_enums.o $(CXX) $(CXXLDFLAGS) isa_enums.o isa_enums_gen.o gen_util.o \ -o isa_enums_gen isa_enums_gen.o: isa_enums_gen.cxx isa_enums_gen.h $(CXX) $(CXXFLAGS) -c $(TARGINFO_GENERATE_DIR)/isa_enums_gen.cxx isa_enums.o: isa_enums.cxx isa_enums_gen.h $(CXX) $(CXXFLAGS) -c $(TARGINFO_ISA_DIR)/isa_enums.cxx ## targ_isa_lits.[ch] ## targ_isa_lits.c: targ_isa_lits.h targ_isa_lits.h: isa_lits_gen $(RUN) ./isa_lits_gen isa_lits_gen: isa_lits_gen.o gen_util.o isa_lits.o $(CXX) $(CXXLDFLAGS) isa_lits.o isa_lits_gen.o gen_util.o \ -o isa_lits_gen isa_lits_gen.o: isa_lits_gen.cxx isa_lits_gen.h $(CXX) $(CXXFLAGS) -c $(TARGINFO_GENERATE_DIR)/isa_lits_gen.cxx isa_lits.o: isa_lits.cxx isa_lits_gen.h $(CXX) $(CXXFLAGS) -c $(TARGINFO_ISA_DIR)/isa_lits.cxx ## targ_isa_registers.[ch] ## targ_isa_registers.c: targ_isa_registers.h targ_isa_registers.h: isa_registers_gen $(RUN) ./isa_registers_gen isa_registers_gen: isa_registers_gen.o gen_util.o isa_registers.o topcode.o \ targ_isa_subset.o $(CXX) $(CXXLDFLAGS) isa_registers.o isa_registers_gen.o \ gen_util.o targ_isa_subset.o topcode.o -o isa_registers_gen isa_registers_gen.o: isa_registers_gen.cxx isa_registers_gen.h targ_isa_subset.h $(CXX) $(CXXFLAGS) -c $(TARGINFO_GENERATE_DIR)/isa_registers_gen.cxx isa_registers.o: isa_registers.cxx isa_registers_gen.h targ_isa_subset.h $(CXX) $(CXXFLAGS) -c $(TARGINFO_ISA_DIR)/isa_registers.cxx ## targ_isa_hazards.[ch] ## targ_isa_hazards.c: targ_isa_hazards.h targ_isa_hazards.h: isa_hazards_gen $(RUN) ./isa_hazards_gen isa_hazards_gen: isa_hazards_gen.o gen_util.o isa_hazards.o topcode.o \ targ_isa_subset.o $(CXX) $(CXXLDFLAGS) isa_hazards.o isa_hazards_gen.o \ gen_util.o targ_isa_subset.o topcode.o -o isa_hazards_gen isa_hazards_gen.o: isa_hazards_gen.cxx isa_hazards_gen.h topcode.h targ_isa_subset.h $(CXX) $(CXXFLAGS) -c $(TARGINFO_GENERATE_DIR)/isa_hazards_gen.cxx isa_hazards.o: isa_hazards.cxx isa_hazards_gen.h topcode.h targ_isa_subset.h $(CXX) $(CXXFLAGS) -c $(TARGINFO_ISA_DIR)/isa_hazards.cxx ## targ_isa_subset.[ch] ## targ_isa_subset.c: targ_isa_subset.h targ_isa_subset.h: isa_subset_gen $(RUN) ./isa_subset_gen isa_subset_gen: isa_subset_gen.o gen_util.o isa_subset.o topcode.o $(CXX) $(CXXLDFLAGS) isa_subset.o isa_subset_gen.o gen_util.o \ topcode.o -o isa_subset_gen isa_subset_gen.o: isa_subset_gen.cxx isa_subset_gen.h topcode.h $(CXX) $(CXXFLAGS) -c $(TARGINFO_GENERATE_DIR)/isa_subset_gen.cxx isa_subset.o: isa_subset.cxx isa_subset_gen.h topcode.h $(CXX) $(CXXFLAGS) -c $(TARGINFO_ISA_DIR)/isa_subset.cxx ## targ_isa_properties.[ch] ## targ_isa_properties.c: targ_isa_properties.h targ_isa_properties.h: isa_properties_gen $(RUN) ./isa_properties_gen isa_properties_gen: isa_properties_gen.o gen_util.o isa_properties.o topcode.o $(CXX) $(CXXLDFLAGS) isa_properties.o isa_properties_gen.o gen_util.o \ topcode.o -o isa_properties_gen isa_properties_gen.o: isa_properties_gen.cxx isa_properties_gen.h topcode.h $(CXX) $(CXXFLAGS) -c $(TARGINFO_GENERATE_DIR)/isa_properties_gen.cxx isa_properties.o: isa_properties.cxx isa_properties_gen.h topcode.h $(CXX) $(CXXFLAGS) -c $(TARGINFO_ISA_DIR)/isa_properties.cxx ## targ_isa_operands.[ch] ## targ_isa_operands.c: targ_isa_operands.h targ_isa_operands.h: isa_operands_gen $(RUN) ./isa_operands_gen targ_isa_operands.o: targ_isa_operands.c targ_isa_operands.h targ_isa_properties.h $(CC) $(CFLAGS) -c targ_isa_operands.c isa_operands_gen: isa_operands_gen.o gen_util.o isa_operands.o topcode.o \ targ_isa_registers.o targ_isa_enums.o targ_isa_lits.o \ targ_isa_subset.o $(CXX) $(CXXLDFLAGS) isa_operands.o isa_operands_gen.o gen_util.o \ topcode.o targ_isa_registers.o targ_isa_enums.o targ_isa_lits.o \ targ_isa_subset.o -o isa_operands_gen isa_operands_gen.o: isa_operands_gen.cxx isa_operands_gen.h \ targ_isa_registers.h targ_isa_enums.h targ_isa_lits.h topcode.h $(CXX) $(CXXFLAGS) -c $(TARGINFO_GENERATE_DIR)/isa_operands_gen.cxx isa_operands.o: isa_operands.cxx isa_operands_gen.h targ_isa_registers.h \ targ_isa_enums.h targ_isa_lits.h topcode.h $(CXX) $(CXXFLAGS) -c -I$(COMMON_COM_DIR) \ $(TARGINFO_ISA_DIR)/isa_operands.cxx ## targ_isa_pack.[ch] ## targ_isa_pack.c: targ_isa_pack.h targ_isa_pack.h: isa_pack_gen $(RUN) ./isa_pack_gen isa_pack_gen: gen_util.o isa_pack_gen.o gen_util.o isa_pack.o \ topcode.o targ_isa_properties.o $(CXX) $(CXXLDFLAGS) isa_pack.o isa_pack_gen.o gen_util.o \ topcode.o targ_isa_properties.o -o isa_pack_gen isa_pack_gen.o: isa_pack_gen.cxx isa_pack_gen.h topcode.h targ_isa_properties.h $(CXX) $(CXXFLAGS) -c $(TARGINFO_GENERATE_DIR)/isa_pack_gen.cxx isa_pack.o: isa_pack.cxx isa_pack_gen.h topcode.h $(CXX) $(CXXFLAGS) -c $(TARGINFO_ISA_DIR)/isa_pack.cxx ## targ_isa_decode.[ch] ## targ_isa_decode.c: targ_isa_decode.h targ_isa_decode.h: isa_decode_gen $(RUN) ./isa_decode_gen isa_decode_gen: gen_util.o isa_decode_gen.o gen_util.o isa_decode.o topcode.o targ_isa_bundle.o $(CXX) $(CXXLDFLAGS) isa_decode.o isa_decode_gen.o gen_util.o \ topcode.o targ_isa_bundle.o -o isa_decode_gen isa_decode_gen.o: isa_decode_gen.cxx isa_decode_gen.h topcode.h $(CXX) $(CXXFLAGS) -c $(TARGINFO_GENERATE_DIR)/isa_decode_gen.cxx isa_decode.o: isa_decode.cxx isa_decode_gen.h topcode.h targ_isa_bundle.h \ targ_isa_pack.h $(CXX) $(CXXFLAGS) -c $(TARGINFO_ISA_DIR)/isa_decode.cxx ## targ_isa_pseudo.[ch] ## targ_isa_pseudo.c: targ_isa_pseudo.h targ_isa_pseudo.h: isa_pseudo_gen $(RUN) ./isa_pseudo_gen isa_pseudo_gen: gen_util.o isa_pseudo_gen.o gen_util.o isa_pseudo.o topcode.o \ targ_isa_operands.o targ_isa_operands.o targ_isa_registers.o \ targ_isa_lits.o targ_isa_enums.o targ_isa_subset.o $(CXX) $(CXXLDFLAGS) isa_pseudo.o isa_pseudo_gen.o gen_util.o \ topcode.o targ_isa_operands.o targ_isa_registers.o \ targ_isa_lits.o targ_isa_enums.o targ_isa_subset.o \ -o isa_pseudo_gen isa_pseudo_gen.o: isa_pseudo_gen.cxx isa_pseudo_gen.h topcode.h targ_isa_operands.h $(CXX) $(CXXFLAGS) -c $(TARGINFO_GENERATE_DIR)/isa_pseudo_gen.cxx isa_pseudo.o: isa_pseudo.cxx isa_pseudo_gen.h topcode.h $(CXX) $(CXXFLAGS) -c $(TARGINFO_ISA_DIR)/isa_pseudo.cxx ## targ_isa_print.[ch] ## targ_isa_print.c: targ_isa_print.h targ_isa_print.h: isa_print_gen $(RUN) ./isa_print_gen isa_print_gen: gen_util.o isa_print_gen.o isa_print.o \ topcode.o targ_isa_properties.o $(CXX) $(CXXLDFLAGS) isa_print.o isa_print_gen.o gen_util.o \ topcode.o targ_isa_properties.o -o isa_print_gen isa_print_gen.o: isa_print_gen.cxx isa_print_gen.h topcode.h targ_isa_properties.h $(CXX) $(CXXFLAGS) -c $(TARGINFO_GENERATE_DIR)/isa_print_gen.cxx isa_print.o: isa_print.cxx isa_print_gen.h topcode.h $(CXX) $(CXXFLAGS) -c $(TARGINFO_ISA_DIR)/isa_print.cxx ## targ_abi_properties.[ch] ## targ_abi_properties.c: targ_abi_properties.h targ_abi_properties.h: abi_properties_gen $(RUN) ./abi_properties_gen abi_properties_gen: abi_properties_gen.o gen_util.o abi_properties.o \ targ_isa_subset.o targ_isa_registers.o $(CXX) $(CXXLDFLAGS) abi_properties.o abi_properties_gen.o gen_util.o \ targ_isa_subset.o targ_isa_registers.o -o abi_properties_gen abi_properties_gen.o: abi_properties_gen.cxx abi_properties_gen.h \ targ_isa_registers.h $(CXX) $(CXXFLAGS) -c $(TARGINFO_GENERATE_DIR)/abi_properties_gen.cxx abi_properties.o: abi_properties.cxx abi_properties_gen.h targ_isa_registers.h $(CXX) $(CXXFLAGS) -c $(TARGINFO_ABI_DIR)/abi_properties.cxx ## targ_isa_bundle.[ch] ## targ_isa_bundle.c: targ_isa_bundle.h targ_isa_bundle.h: isa_bundle_gen $(RUN) ./isa_bundle_gen isa_bundle_gen: gen_util.o isa_bundle_gen.o gen_util.o isa_bundle.o \ topcode.o targ_isa_properties.o $(CXX) $(CXXLDFLAGS) isa_bundle.o isa_bundle_gen.o gen_util.o \ topcode.o targ_isa_properties.o -o isa_bundle_gen isa_bundle_gen.o: isa_bundle_gen.cxx isa_bundle_gen.h topcode.h \ targ_isa_properties.h $(CXX) $(CXXFLAGS) -c $(TARGINFO_GENERATE_DIR)/isa_bundle_gen.cxx isa_bundle.o: isa_bundle.cxx isa_bundle_gen.h topcode.h $(CXX) $(CXXFLAGS) -c $(TARGINFO_ISA_DIR)/isa_bundle.cxx ## targ_proc.[ch] ## targ_proc.c: targ_proc.h targ_proc.h: proc_gen $(RUN) ./proc_gen proc_gen: proc_gen.o gen_util.o proc.o $(CXX) $(CXXLDFLAGS) proc_gen.o gen_util.o proc.o -o proc_gen proc_gen.o: proc_gen.cxx proc_gen.h $(CXX) $(CXXFLAGS) -c $(TARGINFO_GENERATE_DIR)/proc_gen.cxx proc.o: proc.cxx proc_gen.h $(CXX) $(CXXFLAGS) -c $(TARGINFO_PROC_DIR)/proc.cxx ## targ_proc_properties.[ch] ## targ_proc_properties.c: targ_proc_properties.h targ_proc_properties.h: proc_properties_gen $(RUN) ./proc_properties_gen proc_properties_gen: proc_properties_gen.o gen_util.o proc_properties.o targ_proc.o $(CXX) $(CXXLDFLAGS) proc_properties_gen.o gen_util.o proc_properties.o targ_proc.o -o proc_properties_gen proc_properties_gen.o: proc_properties_gen.cxx proc_properties_gen.h targ_proc.h $(CXX) $(CXXFLAGS) -c $(TARGINFO_GENERATE_DIR)/proc_properties_gen.cxx proc_properties.o: proc_properties.cxx proc_properties_gen.h targ_proc.h $(CXX) $(CXXFLAGS) -c $(TARGINFO_PROC_DIR)/proc_properties.cxx ## si_gen.so ## # Need the current working directory so that rld doesn't get confused later CWD := $(shell pwd) si_gen.o: si_gen.cxx si_gen.h topcode.h targ_isa_properties.h \ targ_isa_subset.h targ_isa_operands.h $(CXX) $(CXXFLAGS) -c $(TARGINFO_GENERATE_DIR)/si_gen.cxx ifeq ($(BUILD_COMPILER), EDG) si_gen.so: si_gen.cxx topcode.h si_gen.h targ_isa_operands.h \ targ_isa_subset.o targ_isa_properties.o $(CXX) $(CXXLDFLAGS) $(TARGINFO_GENERATE_DIR)/si_gen.cxx \ targ_isa_subset.o targ_isa_properties.o \ -shared -o si_gen.so -rpath $(CWD) else si_gen.so: si_gen.o topcode.h si_gen.h targ_isa_operands.h \ targ_isa_operands.o targ_isa_properties.o targ_isa_registers.o \ targ_isa_subset.o targ_isa_enums.o targ_isa_lits.o $(CXX) $(CXXLDFLAGS) si_gen.o \ targ_isa_subset.o targ_isa_properties.o targ_isa_operands.o \ targ_isa_registers.o targ_isa_enums.o targ_isa_lits.o \ -shared -o si_gen.so ifeq ($(BUILD_OS), OSX) si_gen.a: si_gen.o topcode.h si_gen.h targ_isa_operands.h \ targ_isa_operands.o targ_isa_properties.o targ_isa_registers.o \ targ_isa_subset.o targ_isa_enums.o targ_isa_lits.o $(AR) rc si_gen.a si_gen.o \ targ_isa_subset.o targ_isa_properties.o targ_isa_operands.o \ targ_isa_registers.o targ_isa_enums.o targ_isa_lits.o ranlib si_gen.a else si_gen.a: si_gen.o topcode.h si_gen.h targ_isa_operands.h \ targ_isa_operands.o targ_isa_properties.o targ_isa_registers.o \ targ_isa_subset.o targ_isa_enums.o targ_isa_lits.o $(AR) rc si_gen.a si_gen.o \ targ_isa_subset.o targ_isa_properties.o targ_isa_operands.o \ targ_isa_registers.o targ_isa_enums.o targ_isa_lits.o endif endif ifeq ($(BUILD_TARGET), MIPS) ## r10000 ## r10000.so: r10000.o $(SI_EXPORT_LIST) $(CC) $(CFLAGS) $(STD_DSO_LOADOPTS) -exports_file $(SI_EXPORT_LIST) \ r10000.o -o r10000.so r10000.o: r10000.c ti_si.h $(CC) $(CFLAGS) -c r10000.c r10000.c: r10000_si_gen $(RUN) ./r10000_si_gen r10000_si_gen: si_gen.so r10000_si.o topcode.o $(CXX) $(CXXLDFLAGS) r10000_si.o topcode.o si_gen.so -o r10000_si_gen r10000_si.o: r10000_si.cxx targ_isa_subset.h topcode.h si_gen.h $(CXX) $(CXXFLAGS) -c $(TARGINFO_PROC_DIR)/r10000_si.cxx ## r8000 ## r8000.so: r8000.o $(SI_EXPORT_LIST) $(CC) $(CFLAGS) $(STD_DSO_LOADOPTS) -exports_file $(SI_EXPORT_LIST) \ r8000.o -o r8000.so r8000.o: r8000.c ti_si.h $(CC) $(CFLAGS) -c r8000.c r8000.c: r8000_si_gen $(RUN) ./r8000_si_gen r8000_si_gen: si_gen.so r8000_si.o topcode.o $(CXX) $(CXXLDFLAGS) r8000_si.o topcode.o si_gen.so -o r8000_si_gen r8000_si.o: r8000_si.cxx targ_isa_subset.h topcode.h si_gen.h $(CXX) $(CXXFLAGS) -c $(TARGINFO_PROC_DIR)/r8000_si.cxx ## r5000 ## r5000.so: r5000.o $(SI_EXPORT_LIST) $(CC) $(CFLAGS) $(STD_DSO_LOADOPTS) -exports_file $(SI_EXPORT_LIST) \ r5000.o -o r5000.so r5000.o: r5000.c ti_si.h $(CC) $(CFLAGS) -c r5000.c r5000.c: r5000_si_gen $(RUN) ./r5000_si_gen r5000_si_gen: si_gen.so r5000_si.o topcode.o $(CXX) $(CXXLDFLAGS) r5000_si.o topcode.o si_gen.so -o r5000_si_gen r5000_si.o: r5000_si.cxx targ_isa_subset.h topcode.h si_gen.h $(CXX) $(CXXFLAGS) -c $(TARGINFO_PROC_DIR)/r5000_si.cxx ## r4000 ## r4000.so: r4000.o $(SI_EXPORT_LIST) $(CC) $(CFLAGS) $(STD_DSO_LOADOPTS) -exports_file $(SI_EXPORT_LIST) \ r4000.o -o r4000.so r4000.o: r4000.c ti_si.h $(CC) $(CFLAGS) -c r4000.c r4000.c: r4000_si_gen $(RUN) ./r4000_si_gen r4000_si_gen: si_gen.so r4000_si.o topcode.o $(CXX) $(CXXLDFLAGS) r4000_si.o topcode.o si_gen.so -o r4000_si_gen r4000_si.o: r4000_si.cxx targ_isa_subset.h topcode.h si_gen.h $(CXX) $(CXXFLAGS) -c $(TARGINFO_PROC_DIR)/r4000_si.cxx endif ifeq ($(BUILD_TARGET), IA64) ifeq ($(BUILD_COMPILER), EDG) itanium.so: itanium.o $(SI_EXPORT_LIST) $(CC) $(CFLAGS) $(STD_DSO_LOADOPTS) -exports_file $(SI_EXPORT_LIST) \ itanium.o -o itanium.so else ifeq ($(BUILD_OS), OSX) itanium.so: itanium.o if test $$(sw_vers -productVersion | cut -d. -f1) -eq 10 && \ test $$(sw_vers -productVersion | cut -d. -f2) -lt 14 ; then \ libtool -dynamic itanium.o -o itanium.so; \ else \ $(CC) $(CFLAGS) $(STD_DSO_LOADOPTS) itanium.o -shared -o itanium.so; \ fi else itanium.so: itanium.o $(CC) $(CFLAGS) $(STD_DSO_LOADOPTS) itanium.o -shared -o itanium.so endif endif itanium.o: itanium.c ti_si.h $(CC) $(CFLAGS) -c itanium.c itanium.c: itanium_si_gen $(SETPATH) $(RUN) ./itanium_si_gen itanium_si_gen: si_gen.a itanium_si.o topcode.o $(CXX) $(CXXLDFLAGS) itanium_si.o topcode.o si_gen.a -o itanium_si_gen itanium_si.o: itanium_si.cxx targ_isa_subset.h topcode.h si_gen.h $(CXX) $(CXXFLAGS) -c $(TARGINFO_PROC_DIR)/itanium_si.cxx endif ifeq ($(BUILD_TARGET), IA32) ifeq ($(BUILD_COMPILER), EDG) pentium.so: pentium.o $(SI_EXPORT_LIST) $(CC) $(CFLAGS) $(STD_DSO_LOADOPTS) -exports_file $(SI_EXPORT_LIST) \ pentium.o -o pentium.so else pentium.so: pentium.o $(CC) $(CFLAGS) $(STD_DSO_LOADOPTS) pentium.o -o pentium.so endif pentium.o: pentium.c ti_si.h $(CC) $(CFLAGS) -c pentium.c pentium.c: pentium_si_gen $(SETPATH) $(RUN) ./pentium_si_gen pentium_si_gen: si_gen.a pentium_si.o topcode.o $(CXX) $(CXXLDFLAGS) pentium_si.o topcode.o si_gen.a -o pentium_si_gen pentium_si.o: pentium_si.cxx targ_isa_subset.h topcode.h si_gen.h $(CXX) $(CXXFLAGS) -c $(TARGINFO_PROC_DIR)/pentium_si.cxx endif ifeq ($(BUILD_OS), OSX) libtarginfo.a: $(foreach obj,$(LIBTARGINFO_OBJS),libtarginfo.a($(obj))) ranlib libtarginfo.a else libtarginfo.a: $(foreach obj,$(LIBTARGINFO_OBJS),libtarginfo.a($(obj))) endif ifeq ($(BUILD_COMPILER), EDG) $(EXPORT_FILE): $(TARG_INFO_EXPORTED) cat $(TARG_INFO_EXPORTED) > targinfo.Exported endif exports: default $(STD_INSTALL) $(STD_INSTALL_READ_MASK) -F $(HDRS_LOC) $(TARG_INFO_HDRS) $(STD_INSTALL) $(STD_INSTALL_READ_MASK) -F $(HDRS_LOC) $(TARGINFO_ACCESS_HDRS) ifeq ($(BUILD_COMPILER), EDG) $(STD_INSTALL) $(STD_INSTALL_READ_MASK) -F $(HDRS_LOC) $(EXPORT_FILE) endif $(STD_INSTALL) $(STD_INSTALL_READ_MASK) -F $(LIB_LOC) $(TARG_INFO_LIB) ifeq ($(BUILD_OS), LINUX) install: $(SO_TARGETS) $(TARG_INFO_LIB) $(STD_INSTALL) $(STD_INSTALL_EXEC_MASK) $(SO_TARGETS) $(STD_MONGOOSE_LINUX_LOC) ifeq ($(BUILD_TARGET), IA64) $(STD_INSTALL) $(STD_INSTALL_READ_MASK) -D $(TARG_INFO_LIB) $(LIB_LOC)/$(TARG_INFO_LIB) endif else install: exports $(STD_INSTALL) $(STD_INSTALL_EXEC_MASK) -F $(STD_MONGOOSE_LOC) $(SO_TARGETS) ifeq ($(BUILD_TYPE), SHARED) ifndef NOSYSGEN $(STD_INSTALL) $(STD_INSTALL_EXEC_MASK) \ -F /usr/cpu/sysgen/root$(STD_MONGOOSE_LOC) $(SO_TARGETS) endif endif endif #---------------------------------------------------------------------- # Include the usual commonrules #---------------------------------------------------------------------- include $(COMMONRULES)