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# 22*b31b5de1SJerry Gilliam# Copyright 2009 Sun Microsystems, Inc. All rights reserved. 237c478bd9Sstevel@tonic-gate# Use is subject to license terms. 247c478bd9Sstevel@tonic-gate# 257c478bd9Sstevel@tonic-gate# psm/stand/cpr/common/Makefile.com 267c478bd9Sstevel@tonic-gate# 277c478bd9Sstevel@tonic-gateGREP = egrep 287c478bd9Sstevel@tonic-gateWC = wc 297c478bd9Sstevel@tonic-gateTOPDIR = ../../../../.. 307c478bd9Sstevel@tonic-gate 317c478bd9Sstevel@tonic-gateinclude $(TOPDIR)/Makefile.master 327c478bd9Sstevel@tonic-gateinclude $(TOPDIR)/Makefile.psm 337c478bd9Sstevel@tonic-gateinclude $(TOPDIR)/psm/stand/lib/Makefile.lib 347c478bd9Sstevel@tonic-gate 357c478bd9Sstevel@tonic-gateSYSDIR = $(TOPDIR)/uts 367c478bd9Sstevel@tonic-gateCOMDIR = ../../common 377c478bd9Sstevel@tonic-gateOSDIR = $(SYSDIR)/common/os 387c478bd9Sstevel@tonic-gateARCHDIR = $(SYSDIR)/$(ARCH) 397c478bd9Sstevel@tonic-gateMACHDIR = $(SYSDIR)/$(MACH) 407c478bd9Sstevel@tonic-gateMMUDIR = $(SYSDIR)/$(MMU) 417c478bd9Sstevel@tonic-gatePROMLIBDIR= $(TOPDIR)/psm/stand/lib/promif/$(ARCH_PROMDIR) 427c478bd9Sstevel@tonic-gatePROMLIB = $(PROMLIBDIR)/libprom.a 437c478bd9Sstevel@tonic-gate 447c478bd9Sstevel@tonic-gateSALIBS += $(PROMLIB) 457c478bd9Sstevel@tonic-gateLDLIBS += -L$(PROMLIBDIR) -lprom 467c478bd9Sstevel@tonic-gateLDFLAGS = -dn -M mapfile $(MAP_FLAG) 477c478bd9Sstevel@tonic-gate 487c478bd9Sstevel@tonic-gateLINTLIBS += $(PROMLIBDIR)/llib-lprom.ln 497c478bd9Sstevel@tonic-gateLINTFLAGS.lib = -ysxmun 507c478bd9Sstevel@tonic-gate 517c478bd9Sstevel@tonic-gateCPRBOOTOBJ += support.o compress.o 527c478bd9Sstevel@tonic-gate 537c478bd9Sstevel@tonic-gateL_SRCS = $(COMDIR)/support.c $(OSDIR)/compress.c 547c478bd9Sstevel@tonic-gateL_COBJ = $(CPRBOOTOBJ:%.o=%.ln) 557c478bd9Sstevel@tonic-gate 567c478bd9Sstevel@tonic-gateCPPDEFS = $(ARCHOPTS) -D$(ARCH) -D__$(ARCH) -D$(MACH) -D__$(MACH) 577c478bd9Sstevel@tonic-gateCPPDEFS += -D_KERNEL -D_MACHDEP -D__ELF 587c478bd9Sstevel@tonic-gate 597c478bd9Sstevel@tonic-gateCPPINCS = -I. -I$(ARCHDIR) -I$(MMUDIR) -I$(MACHDIR) 607c478bd9Sstevel@tonic-gateCPPINCS += -I$(MACHDIR)/$(ARCHVER) -I$(SYSDIR)/sun 617c478bd9Sstevel@tonic-gateCPPINCS += -I$(SYSDIR)/sun4 -I$(SYSDIR)/common -I$(TOPDIR)/head 627c478bd9Sstevel@tonic-gate 637c478bd9Sstevel@tonic-gateCPPFLAGS = $(CPPDEFS) $(CPPINCS) $(CPPFLAGS.master) 647c478bd9Sstevel@tonic-gateCPPFLAGS += $(CCYFLAG)$(SYSDIR)/common 657c478bd9Sstevel@tonic-gate 66ae115bc7SmrjC99MODE = $(C99_ENABLE) 67ae115bc7SmrjCFLAGS = $(CCVERBOSE) -O $(C99MODE) 687c478bd9Sstevel@tonic-gate 697c478bd9Sstevel@tonic-gateASFLAGS = -P -D_ASM $(CPPDEFS) -DLOCORE -D_LOCORE -D__STDC__ 707c478bd9Sstevel@tonic-gateAS_CPPFLAGS = $(CPPINCS) $(CPPFLAGS.master) 717c478bd9Sstevel@tonic-gate 727c478bd9Sstevel@tonic-gate# install values 737c478bd9Sstevel@tonic-gateCPRFILES= $(ALL:%=$(ROOT_PSM_DIR)/$(ARCH)/%) 747c478bd9Sstevel@tonic-gateFILEMODE= 644 757c478bd9Sstevel@tonic-gate 767c478bd9Sstevel@tonic-gate# lint stuff 777c478bd9Sstevel@tonic-gateLINTFLAGS += -Dlint 787c478bd9Sstevel@tonic-gateLOPTS = -hbxn 797c478bd9Sstevel@tonic-gate 807c478bd9Sstevel@tonic-gate# install rule 817c478bd9Sstevel@tonic-gate$(ROOT_PSM_DIR)/$(ARCH)/%: % 827c478bd9Sstevel@tonic-gate $(INS.file) 837c478bd9Sstevel@tonic-gate 847c478bd9Sstevel@tonic-gate 857c478bd9Sstevel@tonic-gateall: $(ALL) 867c478bd9Sstevel@tonic-gate 877c478bd9Sstevel@tonic-gateinstall: all $(CPRFILES) 887c478bd9Sstevel@tonic-gate 897c478bd9Sstevel@tonic-gate 907c478bd9Sstevel@tonic-gateLINT.c= $(LINT) $(LINTFLAGS.c) $(LINT_DEFS) $(CPPFLAGS) -c 917c478bd9Sstevel@tonic-gateLINT.s= $(LINT) $(LINTFLAGS.s) $(LINT_DEFS) $(CPPFLAGS) -c 927c478bd9Sstevel@tonic-gate 937c478bd9Sstevel@tonic-gate# build rule 947c478bd9Sstevel@tonic-gate 957c478bd9Sstevel@tonic-gatecompress.o: $(OSDIR)/compress.c 967c478bd9Sstevel@tonic-gate $(COMPILE.c) $(OSDIR)/compress.c 977c478bd9Sstevel@tonic-gate 987c478bd9Sstevel@tonic-gatesupport.o: $(COMDIR)/support.c 997c478bd9Sstevel@tonic-gate $(COMPILE.c) $(COMDIR)/support.c 1007c478bd9Sstevel@tonic-gate 1017c478bd9Sstevel@tonic-gatecompress.ln: $(OSDIR)/compress.c 1027c478bd9Sstevel@tonic-gate @$(LHEAD) $(LINT.c) $(OSDIR)/compress.c $(LTAIL) 1037c478bd9Sstevel@tonic-gate 1047c478bd9Sstevel@tonic-gatesupport.ln: $(COMDIR)/support.c 1057c478bd9Sstevel@tonic-gate @$(LHEAD) $(LINT.c) $(COMDIR)/support.c $(LTAIL) 1067c478bd9Sstevel@tonic-gate 1077c478bd9Sstevel@tonic-gate%.ln: %.c 1087c478bd9Sstevel@tonic-gate @$(LHEAD) $(LINT.c) $< $(LTAIL) 1097c478bd9Sstevel@tonic-gate 1107c478bd9Sstevel@tonic-gate%.ln: %.s 1117c478bd9Sstevel@tonic-gate @$(LHEAD) $(LINT.s) $< $(LTAIL) 1127c478bd9Sstevel@tonic-gate 1137c478bd9Sstevel@tonic-gate.KEEP_STATE: 1147c478bd9Sstevel@tonic-gate 1157c478bd9Sstevel@tonic-gate.PARALLEL: $(CPRBOOTOBJ) $(L_COBJ) 1167c478bd9Sstevel@tonic-gate 1177c478bd9Sstevel@tonic-gatecprboot: $(CPRBOOT_MAPFILE) $(CPRBOOTOBJ) $(SALIBS) 1187c478bd9Sstevel@tonic-gate $(LD) $(LDFLAGS) -o $@ $(CPRBOOTOBJ) $(LDLIBS) 1197c478bd9Sstevel@tonic-gate $(POST_PROCESS) 120*b31b5de1SJerry Gilliam $(CHK4UBINARY) 1217c478bd9Sstevel@tonic-gate 1227c478bd9Sstevel@tonic-gate$(SALIBS): FRC 1237c478bd9Sstevel@tonic-gate @cd $(@D); $(MAKE) $(MFLAGS) 1247c478bd9Sstevel@tonic-gate 1257c478bd9Sstevel@tonic-gate$(LINTLIBS): FRC 1267c478bd9Sstevel@tonic-gate @cd $(@D); $(MAKE) $(MFLAGS) $(@F) 1277c478bd9Sstevel@tonic-gate 1287c478bd9Sstevel@tonic-gate$(ROOTDIR): 1297c478bd9Sstevel@tonic-gate $(INS.dir) 1307c478bd9Sstevel@tonic-gate 1317c478bd9Sstevel@tonic-gatelint: $(L_COBJ) $(LINTLIBS) 132466faa1bSjg @$(ECHO) "\n$@: global crosschecks:" 1337c478bd9Sstevel@tonic-gate @$(LINT.2) $(L_COBJ) $(LDLIBS) 1347c478bd9Sstevel@tonic-gate 1357c478bd9Sstevel@tonic-gateclean.lint: 1367c478bd9Sstevel@tonic-gate $(RM) *.ln 1377c478bd9Sstevel@tonic-gate 1387c478bd9Sstevel@tonic-gateclean: 1397c478bd9Sstevel@tonic-gate $(RM) *.o *.ln 1407c478bd9Sstevel@tonic-gate 1417c478bd9Sstevel@tonic-gateclobber: 1427c478bd9Sstevel@tonic-gate $(RM) *.o *.ln $(ALL) 1437c478bd9Sstevel@tonic-gate 1447c478bd9Sstevel@tonic-gateFRC: 145