10Sstevel@tonic-gate# 20Sstevel@tonic-gate# CDDL HEADER START 30Sstevel@tonic-gate# 40Sstevel@tonic-gate# The contents of this file are subject to the terms of the 5*3066Sjg# Common Development and Distribution License (the "License"). 6*3066Sjg# You may not use this file except in compliance with the License. 70Sstevel@tonic-gate# 80Sstevel@tonic-gate# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 90Sstevel@tonic-gate# or http://www.opensolaris.org/os/licensing. 100Sstevel@tonic-gate# See the License for the specific language governing permissions 110Sstevel@tonic-gate# and limitations under the License. 120Sstevel@tonic-gate# 130Sstevel@tonic-gate# When distributing Covered Code, include this CDDL HEADER in each 140Sstevel@tonic-gate# file and include the License file at usr/src/OPENSOLARIS.LICENSE. 150Sstevel@tonic-gate# If applicable, add the following below this CDDL HEADER, with the 160Sstevel@tonic-gate# fields enclosed by brackets "[]" replaced with your own identifying 170Sstevel@tonic-gate# information: Portions Copyright [yyyy] [name of copyright owner] 180Sstevel@tonic-gate# 190Sstevel@tonic-gate# CDDL HEADER END 200Sstevel@tonic-gate# 210Sstevel@tonic-gate# 220Sstevel@tonic-gate# uts/intel/elfexec/Makefile 230Sstevel@tonic-gate# 24*3066Sjg# Copyright 2006 Sun Microsystems, Inc. All rights reserved. 250Sstevel@tonic-gate# Use is subject to license terms. 260Sstevel@tonic-gate# 27*3066Sjg#ident "%Z%%M% %I% %E% SMI" 280Sstevel@tonic-gate# 290Sstevel@tonic-gate# This makefile drives the production of the elfexec exec kernel 300Sstevel@tonic-gate# module. 310Sstevel@tonic-gate# 320Sstevel@tonic-gate# intel architecture dependent 330Sstevel@tonic-gate# 340Sstevel@tonic-gate 350Sstevel@tonic-gate# 360Sstevel@tonic-gate# Path to the base of the uts directory tree (usually /usr/src/uts). 370Sstevel@tonic-gate# 380Sstevel@tonic-gateUTSBASE = ../.. 390Sstevel@tonic-gate 400Sstevel@tonic-gate# 410Sstevel@tonic-gate# Define the module and object file sets. 420Sstevel@tonic-gate# 430Sstevel@tonic-gateMODULE = elfexec 440Sstevel@tonic-gateELFEXEC_OBJS_32 = 450Sstevel@tonic-gateELFEXEC_OBJS_64 = elf32.o elf32_notes.o old32_notes.o 460Sstevel@tonic-gateELFEXEC_OBJS += $(ELFEXEC_OBJS_$(CLASS)) 470Sstevel@tonic-gateOBJECTS = $(ELFEXEC_OBJS:%=$(OBJS_DIR)/%) 480Sstevel@tonic-gateLINTS = $(ELFEXEC_OBJS:%.o=$(LINTS_DIR)/%.ln) 490Sstevel@tonic-gateROOTMODULE = $(ROOT_EXEC_DIR)/$(MODULE) 500Sstevel@tonic-gate 510Sstevel@tonic-gate# 520Sstevel@tonic-gate# Include common rules. 530Sstevel@tonic-gate# 540Sstevel@tonic-gateinclude $(UTSBASE)/intel/Makefile.intel 550Sstevel@tonic-gate 560Sstevel@tonic-gate# 570Sstevel@tonic-gate# Define targets 580Sstevel@tonic-gate# 590Sstevel@tonic-gateALL_TARGET = $(BINARY) 600Sstevel@tonic-gateLINT_TARGET = $(MODULE).lint 610Sstevel@tonic-gateINSTALL_TARGET = $(BINARY) $(ROOTMODULE) 620Sstevel@tonic-gate 630Sstevel@tonic-gate# 64*3066Sjg# For now, disable these lint checks; maintainers should endeavor 65*3066Sjg# to investigate and remove these for maximum lint coverage. 66*3066Sjg# Please do not carry these forward to new Makefiles. 67*3066Sjg# 68*3066SjgLINTTAGS += -erroff=E_BAD_PTR_CAST_ALIGN 69*3066SjgLINTTAGS += -erroff=E_PTRDIFF_OVERFLOW 70*3066SjgLINTTAGS += -erroff=E_ASSIGN_NARROW_CONV 71*3066Sjg 72*3066Sjg# 730Sstevel@tonic-gate# Default build targets. 740Sstevel@tonic-gate# 750Sstevel@tonic-gate.KEEP_STATE: 760Sstevel@tonic-gate 770Sstevel@tonic-gatedef: $(DEF_DEPS) 780Sstevel@tonic-gate 790Sstevel@tonic-gateall: $(ALL_DEPS) 800Sstevel@tonic-gate 810Sstevel@tonic-gateclean: $(CLEAN_DEPS) 820Sstevel@tonic-gate 830Sstevel@tonic-gateclobber: $(CLOBBER_DEPS) 840Sstevel@tonic-gate 850Sstevel@tonic-gatelint: $(LINT_DEPS) 860Sstevel@tonic-gate 870Sstevel@tonic-gatemodlintlib: $(MODLINTLIB_DEPS) 880Sstevel@tonic-gate 890Sstevel@tonic-gateclean.lint: $(CLEAN_LINT_DEPS) 900Sstevel@tonic-gate 910Sstevel@tonic-gateinstall: $(INSTALL_DEPS) 920Sstevel@tonic-gate 930Sstevel@tonic-gate# 940Sstevel@tonic-gate# Include common targets. 950Sstevel@tonic-gate# 960Sstevel@tonic-gateinclude $(UTSBASE)/intel/Makefile.targ 970Sstevel@tonic-gate 980Sstevel@tonic-gate.NO_PARALLEL: $(LINTS) 990Sstevel@tonic-gate 1000Sstevel@tonic-gate$(OBJS_DIR)/elf32.o: $(UTSBASE)/common/exec/elf/elf.c 1010Sstevel@tonic-gate $(COMPILE.c) -o $@ -D_ELF32_COMPAT $(UTSBASE)/common/exec/elf/elf.c 1020Sstevel@tonic-gate 1030Sstevel@tonic-gate$(OBJS_DIR)/elf32_notes.o: $(UTSBASE)/common/exec/elf/elf_notes.c 1040Sstevel@tonic-gate $(COMPILE.c) -o $@ -D_ELF32_COMPAT $(UTSBASE)/common/exec/elf/elf_notes.c 1050Sstevel@tonic-gate 1060Sstevel@tonic-gate$(OBJS_DIR)/old32_notes.o: $(UTSBASE)/common/exec/elf/old_notes.c 1070Sstevel@tonic-gate $(COMPILE.c) -o $@ -D_ELF32_COMPAT $(UTSBASE)/common/exec/elf/old_notes.c 1080Sstevel@tonic-gate 1090Sstevel@tonic-gate$(LINTS_DIR)/elf32.ln: $(UTSBASE)/common/exec/elf/elf.c 1100Sstevel@tonic-gate @($(LHEAD) $(LINT.c) -Celf32 -D_ELF32_COMPAT $(UTSBASE)/common/exec/elf/elf.c $(LTAIL)) 1110Sstevel@tonic-gate @$(MV) $(@F) $@ 1120Sstevel@tonic-gate 1130Sstevel@tonic-gate$(LINTS_DIR)/elf32_notes.ln: $(UTSBASE)/common/exec/elf/elf_notes.c 1140Sstevel@tonic-gate @($(LHEAD) $(LINT.c) -Celf32_notes -D_ELF32_COMPAT $(UTSBASE)/common/exec/elf/elf_notes.c $(LTAIL)) 1150Sstevel@tonic-gate @$(MV) $(@F) $@ 1160Sstevel@tonic-gate 1170Sstevel@tonic-gate$(LINTS_DIR)/old32_notes.ln: $(UTSBASE)/common/exec/elf/old_notes.c 1180Sstevel@tonic-gate @($(LHEAD) $(LINT.c) -Cold32_notes -D_ELF32_COMPAT $(UTSBASE)/common/exec/elf/old_notes.c $(LTAIL)) 1190Sstevel@tonic-gate @$(MV) $(@F) $@ 120