17c478bd9Sstevel@tonic-gate# 27c478bd9Sstevel@tonic-gate# CDDL HEADER START 37c478bd9Sstevel@tonic-gate# 47c478bd9Sstevel@tonic-gate# The contents of this file are subject to the terms of the 5986fd29aSsetje# Common Development and Distribution License (the "License"). 6986fd29aSsetje# You may not use this file except in compliance with the License. 77c478bd9Sstevel@tonic-gate# 87c478bd9Sstevel@tonic-gate# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 97c478bd9Sstevel@tonic-gate# or http://www.opensolaris.org/os/licensing. 107c478bd9Sstevel@tonic-gate# See the License for the specific language governing permissions 117c478bd9Sstevel@tonic-gate# and limitations under the License. 127c478bd9Sstevel@tonic-gate# 137c478bd9Sstevel@tonic-gate# When distributing Covered Code, include this CDDL HEADER in each 147c478bd9Sstevel@tonic-gate# file and include the License file at usr/src/OPENSOLARIS.LICENSE. 157c478bd9Sstevel@tonic-gate# If applicable, add the following below this CDDL HEADER, with the 167c478bd9Sstevel@tonic-gate# fields enclosed by brackets "[]" replaced with your own identifying 177c478bd9Sstevel@tonic-gate# information: Portions Copyright [yyyy] [name of copyright owner] 187c478bd9Sstevel@tonic-gate# 197c478bd9Sstevel@tonic-gate# CDDL HEADER END 207c478bd9Sstevel@tonic-gate# 217c478bd9Sstevel@tonic-gate# 22d24234c2SJerry Gilliam# Copyright 2010 Sun Microsystems, Inc. All rights reserved. 237c478bd9Sstevel@tonic-gate# Use is subject to license terms. 247c478bd9Sstevel@tonic-gate# 257c478bd9Sstevel@tonic-gate# psm/stand/boot/sparcv9/ieee1275/sun4v/Makefile 267c478bd9Sstevel@tonic-gate# 277c478bd9Sstevel@tonic-gate# 287c478bd9Sstevel@tonic-gateTOPDIR = ../../../../../../.. 297c478bd9Sstevel@tonic-gate 307c478bd9Sstevel@tonic-gateinclude $(TOPDIR)/Makefile.master 317c478bd9Sstevel@tonic-gateinclude $(TOPDIR)/lib/Makefile.lib 327c478bd9Sstevel@tonic-gateinclude $(TOPDIR)/psm/stand/lib/Makefile.lib 337c478bd9Sstevel@tonic-gateinclude $(TOPDIR)/psm/Makefile.psm.64 347c478bd9Sstevel@tonic-gate 357c478bd9Sstevel@tonic-gateCFLAGS64 += -xchip=ultra $(CCABS32) 367c478bd9Sstevel@tonic-gate 377c478bd9Sstevel@tonic-gatePLATDIR = $(TOPDIR)/psm/promif/ieee1275/sun4u 387c478bd9Sstevel@tonic-gatePLATSUN4DIR = $(TOPDIR)/psm/promif/ieee1275/sun4 397c478bd9Sstevel@tonic-gateSYSDIR = $(TOPDIR)/uts 407c478bd9Sstevel@tonic-gate 417c478bd9Sstevel@tonic-gateLIBPLAT = libplat.a 427c478bd9Sstevel@tonic-gateLINTLIBPLAT = llib-lplat.ln 437c478bd9Sstevel@tonic-gate 44d24234c2SJerry GilliamPLAT_PFILES = 457c478bd9Sstevel@tonic-gate 467c478bd9Sstevel@tonic-gatePLAT_PSUN4FILES = \ 477c478bd9Sstevel@tonic-gate prom_alloc.c \ 487c478bd9Sstevel@tonic-gate prom_cpuctl.c \ 49e7cbe64fSgw prom_fio.c \ 507c478bd9Sstevel@tonic-gate prom_getunum.c \ 51d24234c2SJerry Gilliam prom_heartbeat.c \ 527c478bd9Sstevel@tonic-gate prom_idprom.c \ 537c478bd9Sstevel@tonic-gate prom_init.c \ 547c478bd9Sstevel@tonic-gate prom_macaddr.c \ 557c478bd9Sstevel@tonic-gate prom_map.c \ 567c478bd9Sstevel@tonic-gate prom_mem.c \ 57d24234c2SJerry Gilliam prom_mmu.c \ 587c478bd9Sstevel@tonic-gate prom_retain.c \ 59986fd29aSsetje prom_sparc.c \ 60d24234c2SJerry Gilliam prom_vername.c \ 61d24234c2SJerry Gilliam prom_vercheck.c 627c478bd9Sstevel@tonic-gate 637c478bd9Sstevel@tonic-gateKARCH = sun4v 647c478bd9Sstevel@tonic-gateMMU = sfmmu 657c478bd9Sstevel@tonic-gate 667c478bd9Sstevel@tonic-gateOBJSDIR = objs 677c478bd9Sstevel@tonic-gate 687c478bd9Sstevel@tonic-gatePLAT_POBJ = $(PLAT_PFILES:%.c=$(OBJSDIR)/%.o) 697c478bd9Sstevel@tonic-gatePLAT_PSUN4OBJ = $(PLAT_PSUN4FILES:%.c=$(OBJSDIR)/%.o) 707c478bd9Sstevel@tonic-gateOBJS = $(PLAT_POBJ) $(PLAT_PSUN4OBJ) 717c478bd9Sstevel@tonic-gateL_OBJS = $(OBJS:%.o=%.ln) 727c478bd9Sstevel@tonic-gateL_SRCS = $(PLAT_PFILES:%=$(PLATDIR)/%) 737c478bd9Sstevel@tonic-gateL_SRCS += $(PLAT_PSUN4FILES:%=$(PLATSUN4DIR)/%) 747c478bd9Sstevel@tonic-gate 757c478bd9Sstevel@tonic-gateARCHOPTS= -Dsun4v 767c478bd9Sstevel@tonic-gateASFLAGS = -P -D__STDC__ -D_BOOT -D_ASM 777c478bd9Sstevel@tonic-gateCPPDEFS = $(ARCHOPTS) -D$(KARCH) -D_BOOT -D_KERNEL -D_MACHDEP 787c478bd9Sstevel@tonic-gateCPPINCS = -I. -I$(SYSDIR)/sun4 -I$(SYSDIR)/$(KARCH) -I$(SYSDIR)/$(MMU) \ 797c478bd9Sstevel@tonic-gate -I$(SYSDIR)/sun4u \ 807c478bd9Sstevel@tonic-gate -I$(SYSDIR)/sparc/v9 -I$(SYSDIR)/sparc \ 817c478bd9Sstevel@tonic-gate -I$(SYSDIR)/sun -I$(SYSDIR)/common 827c478bd9Sstevel@tonic-gateCPPFLAGS= $(CPPDEFS) $(CPPINCS) $(CPPFLAGS.master) 837c478bd9Sstevel@tonic-gateCFLAGS += $(CCVERBOSE) 847c478bd9Sstevel@tonic-gate 857c478bd9Sstevel@tonic-gate.KEEP_STATE: 867c478bd9Sstevel@tonic-gate 877c478bd9Sstevel@tonic-gate.PARALLEL: $(OBJS) $(L_OBJS) 887c478bd9Sstevel@tonic-gate 897c478bd9Sstevel@tonic-gateall install: $(LIBPLAT) 907c478bd9Sstevel@tonic-gate 917c478bd9Sstevel@tonic-gatelint: $(LINTLIBPLAT) 927c478bd9Sstevel@tonic-gate 937c478bd9Sstevel@tonic-gateclean: 947c478bd9Sstevel@tonic-gate $(RM) $(OBJS) $(L_OBJS) 957c478bd9Sstevel@tonic-gate 967c478bd9Sstevel@tonic-gateclobber: clean 97*b6805bf7SGordon Ross $(RM) $(LIBPLAT) $(LINTLIBPLAT) 987c478bd9Sstevel@tonic-gate 997c478bd9Sstevel@tonic-gate$(LIBPLAT): $(OBJSDIR) .WAIT $(OBJS) 1007c478bd9Sstevel@tonic-gate $(BUILD.AR) $(OBJS) 1017c478bd9Sstevel@tonic-gate 1027c478bd9Sstevel@tonic-gate$(LINTLIBPLAT): $(OBJSDIR) .WAIT $(L_OBJS) 1037c478bd9Sstevel@tonic-gate @$(ECHO) "\nlint library construction:" $@ 1047c478bd9Sstevel@tonic-gate @$(LINT.lib) -o plat $(L_SRCS) 1057c478bd9Sstevel@tonic-gate 1067c478bd9Sstevel@tonic-gate$(OBJSDIR): 1077c478bd9Sstevel@tonic-gate -@[ -d $@ ] || mkdir $@ 1087c478bd9Sstevel@tonic-gate 1097c478bd9Sstevel@tonic-gate# 1107c478bd9Sstevel@tonic-gate# build rules using standard library object subdirectory 1117c478bd9Sstevel@tonic-gate# 1127c478bd9Sstevel@tonic-gate$(OBJSDIR)/%.o: $(PLATDIR)/%.c 1137c478bd9Sstevel@tonic-gate $(COMPILE.c) -o $@ $< 1147c478bd9Sstevel@tonic-gate $(POST_PROCESS_O) 1157c478bd9Sstevel@tonic-gate 1167c478bd9Sstevel@tonic-gate$(OBJSDIR)/%.o: $(PLATDIR)/%.s 1177c478bd9Sstevel@tonic-gate $(COMPILE.s) -o $@ $< 1187c478bd9Sstevel@tonic-gate $(POST_PROCESS_O) 1197c478bd9Sstevel@tonic-gate 1207c478bd9Sstevel@tonic-gate$(OBJSDIR)/%.o: $(PLATSUN4DIR)/%.c 1217c478bd9Sstevel@tonic-gate $(COMPILE.c) -o $@ $< 1227c478bd9Sstevel@tonic-gate $(POST_PROCESS_O) 1237c478bd9Sstevel@tonic-gate 1247c478bd9Sstevel@tonic-gate$(OBJSDIR)/%.o: $(PLATSUN4DIR)/%.s 1257c478bd9Sstevel@tonic-gate $(COMPILE.s) -o $@ $< 1267c478bd9Sstevel@tonic-gate $(POST_PROCESS_O) 1277c478bd9Sstevel@tonic-gate 1287c478bd9Sstevel@tonic-gate$(OBJSDIR)/%.ln: $(PLATDIR)/%.c 1297c478bd9Sstevel@tonic-gate @($(LHEAD) $(LINT.c) $< $(LTAIL)) 1307c478bd9Sstevel@tonic-gate @$(MV) $(@F) $@ 1317c478bd9Sstevel@tonic-gate 1327c478bd9Sstevel@tonic-gate$(OBJSDIR)/%.ln: $(PLATDIR)/%.s 1337c478bd9Sstevel@tonic-gate @($(LHEAD) $(LINT.s) $< $(LTAIL)) 1347c478bd9Sstevel@tonic-gate @$(MV) $(@F) $@ 1357c478bd9Sstevel@tonic-gate 1367c478bd9Sstevel@tonic-gate$(OBJSDIR)/%.ln: $(PLATSUN4DIR)/%.c 1377c478bd9Sstevel@tonic-gate @($(LHEAD) $(LINT.c) $< $(LTAIL)) 1387c478bd9Sstevel@tonic-gate @$(MV) $(@F) $@ 1397c478bd9Sstevel@tonic-gate 1407c478bd9Sstevel@tonic-gate$(OBJSDIR)/%.ln: $(PLATSUN4DIR)/%.s 1417c478bd9Sstevel@tonic-gate @($(LHEAD) $(LINT.s) $< $(LTAIL)) 1427c478bd9Sstevel@tonic-gate @$(MV) $(@F) $@ 143