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 5ae115bc7Smrj# Common Development and Distribution License (the "License"). 6ae115bc7Smrj# 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# 22b31b5de1SJerry Gilliam# Copyright 2009 Sun Microsystems, Inc. All rights reserved. 237c478bd9Sstevel@tonic-gate# Use is subject to license terms. 247c478bd9Sstevel@tonic-gate# 25f96a0cefSRichard Lowe 267c478bd9Sstevel@tonic-gateTOPDIR = ../../../../.. 277c478bd9Sstevel@tonic-gate 287c478bd9Sstevel@tonic-gateinclude $(TOPDIR)/Makefile.master 297c478bd9Sstevel@tonic-gateinclude $(TOPDIR)/Makefile.psm 307c478bd9Sstevel@tonic-gateinclude $(TOPDIR)/psm/stand/lib/Makefile.lib 317c478bd9Sstevel@tonic-gate 327c478bd9Sstevel@tonic-gateSYSDIR = $(TOPDIR)/uts 337c478bd9Sstevel@tonic-gateCOMDIR = ../../common 347c478bd9Sstevel@tonic-gateOSDIR = $(SYSDIR)/common/os 357c478bd9Sstevel@tonic-gateARCHDIR = $(SYSDIR)/$(ARCH) 367c478bd9Sstevel@tonic-gateMACHDIR = $(SYSDIR)/$(MACH) 377c478bd9Sstevel@tonic-gateMMUDIR = $(SYSDIR)/$(MMU) 387c478bd9Sstevel@tonic-gatePROMLIBDIR= $(TOPDIR)/psm/stand/lib/promif/$(ARCH_PROMDIR) 397c478bd9Sstevel@tonic-gatePROMLIB = $(PROMLIBDIR)/libprom.a 407c478bd9Sstevel@tonic-gate 417c478bd9Sstevel@tonic-gateSALIBS += $(PROMLIB) 427c478bd9Sstevel@tonic-gateLDLIBS += -L$(PROMLIBDIR) -lprom 4385f4cb87SRichard LoweLDFLAGS = -Wl,-dn -Wl,-Mmapfile $(MAP_FLAG) 447c478bd9Sstevel@tonic-gate 457c478bd9Sstevel@tonic-gateCPRBOOTOBJ += support.o compress.o 467c478bd9Sstevel@tonic-gate 477c478bd9Sstevel@tonic-gateL_SRCS = $(COMDIR)/support.c $(OSDIR)/compress.c 487c478bd9Sstevel@tonic-gateL_COBJ = $(CPRBOOTOBJ:%.o=%.ln) 497c478bd9Sstevel@tonic-gate 507c478bd9Sstevel@tonic-gateCPPDEFS = $(ARCHOPTS) -D$(ARCH) -D__$(ARCH) -D$(MACH) -D__$(MACH) 517c478bd9Sstevel@tonic-gateCPPDEFS += -D_KERNEL -D_MACHDEP -D__ELF 527c478bd9Sstevel@tonic-gate 537c478bd9Sstevel@tonic-gateCPPINCS = -I. -I$(ARCHDIR) -I$(MMUDIR) -I$(MACHDIR) 547c478bd9Sstevel@tonic-gateCPPINCS += -I$(MACHDIR)/$(ARCHVER) -I$(SYSDIR)/sun 557c478bd9Sstevel@tonic-gateCPPINCS += -I$(SYSDIR)/sun4 -I$(SYSDIR)/common -I$(TOPDIR)/head 567c478bd9Sstevel@tonic-gate 577c478bd9Sstevel@tonic-gateCPPFLAGS = $(CPPDEFS) $(CPPINCS) $(CPPFLAGS.master) 587c478bd9Sstevel@tonic-gateCPPFLAGS += $(CCYFLAG)$(SYSDIR)/common 597c478bd9Sstevel@tonic-gate 60bd0ce624SYuri PankovCSTD = $(CSTD_GNU99) 61bd0ce624SYuri PankovCFLAGS = $(CCVERBOSE) -O $(CSTD) 627c478bd9Sstevel@tonic-gate 63*5d9d9091SRichard LoweASFLAGS = -D_ASM $(CPPDEFS) -DLOCORE -D_LOCORE -D__STDC__ 647c478bd9Sstevel@tonic-gateAS_CPPFLAGS = $(CPPINCS) $(CPPFLAGS.master) 657c478bd9Sstevel@tonic-gate 667c478bd9Sstevel@tonic-gate# install values 677c478bd9Sstevel@tonic-gateCPRFILES= $(ALL:%=$(ROOT_PSM_DIR)/$(ARCH)/%) 687c478bd9Sstevel@tonic-gateFILEMODE= 644 697c478bd9Sstevel@tonic-gate 707c478bd9Sstevel@tonic-gate# install rule 717c478bd9Sstevel@tonic-gate$(ROOT_PSM_DIR)/$(ARCH)/%: % 727c478bd9Sstevel@tonic-gate $(INS.file) 737c478bd9Sstevel@tonic-gate 747c478bd9Sstevel@tonic-gate 757c478bd9Sstevel@tonic-gateall: $(ALL) 767c478bd9Sstevel@tonic-gate 777c478bd9Sstevel@tonic-gateinstall: all $(CPRFILES) 787c478bd9Sstevel@tonic-gate 797c478bd9Sstevel@tonic-gate# build rule 807c478bd9Sstevel@tonic-gate 817c478bd9Sstevel@tonic-gatecompress.o: $(OSDIR)/compress.c 827c478bd9Sstevel@tonic-gate $(COMPILE.c) $(OSDIR)/compress.c 837c478bd9Sstevel@tonic-gate 847c478bd9Sstevel@tonic-gatesupport.o: $(COMDIR)/support.c 857c478bd9Sstevel@tonic-gate $(COMPILE.c) $(COMDIR)/support.c 867c478bd9Sstevel@tonic-gate 877c478bd9Sstevel@tonic-gate.KEEP_STATE: 887c478bd9Sstevel@tonic-gate 897c478bd9Sstevel@tonic-gate.PARALLEL: $(CPRBOOTOBJ) $(L_COBJ) 907c478bd9Sstevel@tonic-gate 917c478bd9Sstevel@tonic-gatecprboot: $(CPRBOOT_MAPFILE) $(CPRBOOTOBJ) $(SALIBS) 927c478bd9Sstevel@tonic-gate $(LD) $(LDFLAGS) -o $@ $(CPRBOOTOBJ) $(LDLIBS) 937c478bd9Sstevel@tonic-gate $(POST_PROCESS) 947c478bd9Sstevel@tonic-gate 957c478bd9Sstevel@tonic-gate$(SALIBS): FRC 96f96a0cefSRichard Lowe @cd $(@D); $(MAKE) 977c478bd9Sstevel@tonic-gate 987c478bd9Sstevel@tonic-gate$(ROOTDIR): 997c478bd9Sstevel@tonic-gate $(INS.dir) 1007c478bd9Sstevel@tonic-gate 1017c478bd9Sstevel@tonic-gateclean: 1027c478bd9Sstevel@tonic-gate $(RM) *.o *.ln 1037c478bd9Sstevel@tonic-gate 1047c478bd9Sstevel@tonic-gateclobber: 1057c478bd9Sstevel@tonic-gate $(RM) *.o *.ln $(ALL) 1067c478bd9Sstevel@tonic-gate 1077c478bd9Sstevel@tonic-gateFRC: 108