1# 2# CDDL HEADER START 3# 4# The contents of this file are subject to the terms of the 5# Common Development and Distribution License (the "License"). 6# You may not use this file except in compliance with the License. 7# 8# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 9# or http://www.opensolaris.org/os/licensing. 10# See the License for the specific language governing permissions 11# and limitations under the License. 12# 13# When distributing Covered Code, include this CDDL HEADER in each 14# file and include the License file at usr/src/OPENSOLARIS.LICENSE. 15# If applicable, add the following below this CDDL HEADER, with the 16# fields enclosed by brackets "[]" replaced with your own identifying 17# information: Portions Copyright [yyyy] [name of copyright owner] 18# 19# CDDL HEADER END 20# 21# 22# Copyright 2007 Sun Microsystems, Inc. All rights reserved. 23# Use is subject to license terms. 24# 25# psm/stand/boot/sparcv9/ieee1275/sun4u/Makefile 26# 27# 28#ident "%Z%%M% %I% %E% SMI" 29# 30TOPDIR = ../../../../../../.. 31 32include $(TOPDIR)/Makefile.master 33include $(TOPDIR)/lib/Makefile.lib 34include $(TOPDIR)/psm/stand/lib/Makefile.lib 35include $(TOPDIR)/psm/Makefile.psm.64 36 37CFLAGS64 += -xchip=ultra $(CCABS32) 38 39PLATDIR = $(TOPDIR)/psm/promif/ieee1275/sun4u 40PLATSUN4DIR = $(TOPDIR)/psm/promif/ieee1275/sun4 41SYSDIR = $(TOPDIR)/uts 42 43LIBPLAT = libplat.a 44LINTLIBPLAT = llib-lplat.ln 45 46PLAT_PFILES = \ 47 prom_heartbeat.c \ 48 prom_mmu.c \ 49 prom_serengeti.c \ 50 prom_sunfire.c \ 51 prom_vercheck.c 52 53PLAT_PSUN4FILES = \ 54 prom_alloc.c \ 55 prom_cpuctl.c \ 56 prom_fio.c \ 57 prom_getunum.c \ 58 prom_idprom.c \ 59 prom_init.c \ 60 prom_macaddr.c \ 61 prom_map.c \ 62 prom_mem.c \ 63 prom_retain.c \ 64 prom_sparc.c \ 65 prom_vername.c 66 67KARCH = sun4u 68MMU = sfmmu 69 70OBJSDIR = objs 71 72PLAT_POBJ = $(PLAT_PFILES:%.c=$(OBJSDIR)/%.o) 73PLAT_PSUN4OBJ = $(PLAT_PSUN4FILES:%.c=$(OBJSDIR)/%.o) 74OBJS = $(PLAT_POBJ) $(PLAT_PSUN4OBJ) 75L_OBJS = $(OBJS:%.o=%.ln) 76L_SRCS = $(PLAT_PFILES:%=$(PLATDIR)/%) 77L_SRCS += $(PLAT_PSUN4FILES:%=$(PLATSUN4DIR)/%) 78 79ARCHOPTS= -Dsun4u 80ASFLAGS = -P -D__STDC__ -D_BOOT -D_ASM 81CPPDEFS = $(ARCHOPTS) -D$(KARCH) -D_BOOT -D_KERNEL -D_MACHDEP 82CPPINCS = -I. -I$(SYSDIR)/sun4 -I$(SYSDIR)/$(KARCH) -I$(SYSDIR)/$(MMU) \ 83 -I$(SYSDIR)/sparc/v9 -I$(SYSDIR)/sparc \ 84 -I$(SYSDIR)/sun -I$(SYSDIR)/common 85CPPFLAGS= $(CPPDEFS) $(CPPINCS) $(CPPFLAGS.master) 86CFLAGS += $(CCVERBOSE) 87 88.KEEP_STATE: 89 90.PARALLEL: $(OBJS) $(L_OBJS) 91 92all install: $(LIBPLAT) 93 94lint: $(LINTLIBPLAT) 95 96clean: 97 $(RM) $(OBJS) $(L_OBJS) 98 99clobber: clean 100 $(RM) $(LIBPLAT) $(LINTLIBPLAT) a.out core 101 102$(LIBPLAT): $(OBJSDIR) .WAIT $(OBJS) 103 $(BUILD.AR) $(OBJS) 104 105$(LINTLIBPLAT): $(OBJSDIR) .WAIT $(L_OBJS) 106 @$(ECHO) "\nlint library construction:" $@ 107 @$(LINT.lib) -o plat $(L_SRCS) 108 109$(OBJSDIR): 110 -@[ -d $@ ] || mkdir $@ 111 112# 113# build rules using standard library object subdirectory 114# 115$(OBJSDIR)/%.o: $(PLATDIR)/%.c 116 $(COMPILE.c) -o $@ $< 117 $(POST_PROCESS_O) 118 119$(OBJSDIR)/%.o: $(PLATDIR)/%.s 120 $(COMPILE.s) -o $@ $< 121 $(POST_PROCESS_O) 122 123$(OBJSDIR)/%.o: $(PLATSUN4DIR)/%.c 124 $(COMPILE.c) -o $@ $< 125 $(POST_PROCESS_O) 126 127$(OBJSDIR)/%.o: $(PLATSUN4DIR)/%.s 128 $(COMPILE.s) -o $@ $< 129 $(POST_PROCESS_O) 130 131$(OBJSDIR)/%.ln: $(PLATDIR)/%.c 132 @($(LHEAD) $(LINT.c) $< $(LTAIL)) 133 @$(MV) $(@F) $@ 134 135$(OBJSDIR)/%.ln: $(PLATDIR)/%.s 136 @($(LHEAD) $(LINT.s) $< $(LTAIL)) 137 @$(MV) $(@F) $@ 138 139$(OBJSDIR)/%.ln: $(PLATSUN4DIR)/%.c 140 @($(LHEAD) $(LINT.c) $< $(LTAIL)) 141 @$(MV) $(@F) $@ 142 143$(OBJSDIR)/%.ln: $(PLATSUN4DIR)/%.s 144 @($(LHEAD) $(LINT.s) $< $(LTAIL)) 145 @$(MV) $(@F) $@ 146