1*df8bdeb3Sjohnz# 2*df8bdeb3Sjohnz# CDDL HEADER START 3*df8bdeb3Sjohnz# 4*df8bdeb3Sjohnz# The contents of this file are subject to the terms of the 5*df8bdeb3Sjohnz# Common Development and Distribution License (the "License"). 6*df8bdeb3Sjohnz# You may not use this file except in compliance with the License. 7*df8bdeb3Sjohnz# 8*df8bdeb3Sjohnz# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 9*df8bdeb3Sjohnz# or http://www.opensolaris.org/os/licensing. 10*df8bdeb3Sjohnz# See the License for the specific language governing permissions 11*df8bdeb3Sjohnz# and limitations under the License. 12*df8bdeb3Sjohnz# 13*df8bdeb3Sjohnz# When distributing Covered Code, include this CDDL HEADER in each 14*df8bdeb3Sjohnz# file and include the License file at usr/src/OPENSOLARIS.LICENSE. 15*df8bdeb3Sjohnz# If applicable, add the following below this CDDL HEADER, with the 16*df8bdeb3Sjohnz# fields enclosed by brackets "[]" replaced with your own identifying 17*df8bdeb3Sjohnz# information: Portions Copyright [yyyy] [name of copyright owner] 18*df8bdeb3Sjohnz# 19*df8bdeb3Sjohnz# CDDL HEADER END 20*df8bdeb3Sjohnz# 21*df8bdeb3Sjohnz 22*df8bdeb3Sjohnz# 23*df8bdeb3Sjohnz#ident "%Z%%M% %I% %E% SMI" 24*df8bdeb3Sjohnz# 25*df8bdeb3Sjohnz# Copyright 2007 Sun Microsystems, Inc. All rights reserved. 26*df8bdeb3Sjohnz# Use is subject to license terms. 27*df8bdeb3Sjohnz# 28*df8bdeb3Sjohnz 29*df8bdeb3SjohnzPROG= elfsign 30*df8bdeb3SjohnzSHFILES= elfsigncmp 31*df8bdeb3Sjohnz 32*df8bdeb3SjohnzLIBOBJS= elfcertlib.o elfsignlib.o 33*df8bdeb3SjohnzOBJS= $(PROG).o $(LIBOBJS) 34*df8bdeb3Sjohnz 35*df8bdeb3Sjohnz.PARALLEL: $(OBJS) 36*df8bdeb3Sjohnz 37*df8bdeb3SjohnzCMDDIR= $(SRC)/cmd/cmd-crypto/elfsign 38*df8bdeb3SjohnzLIBDIR= $(SRC)/lib/libelfsign/common 39*df8bdeb3SjohnzSRCS= $(CMDDIR)/$(PROG).c $(LIBOBJS:%.o=$(LIBDIR)/%.c) 40*df8bdeb3SjohnzCLEANFILES= $(PROG) $(OBJS) $(SHFILES) 41*df8bdeb3Sjohnz 42*df8bdeb3Sjohnzinclude ../../../src/tools/Makefile.tools 43*df8bdeb3Sjohnz 44*df8bdeb3SjohnzOWNER= root 45*df8bdeb3SjohnzGROUP= bin 46*df8bdeb3SjohnzCFLAGS += $(CCVERBOSE) 47*df8bdeb3SjohnzCFLAGS += -_gcc=-fasm 48*df8bdeb3Sjohnz 49*df8bdeb3SjohnzCPPFLAGS += -D_POSIX_PTHREAD_SEMANTICS 50*df8bdeb3SjohnzCPPFLAGS += -I$(SRC)/lib/libelfsign/common 51*df8bdeb3SjohnzCPPFLAGS += -I$(SRC)/uts/common 52*df8bdeb3SjohnzCPPFLAGS += -I$(SRC)/lib/libkmf/include 53*df8bdeb3SjohnzCPPFLAGS += -I$(SRC)/lib/libcryptoutil/common 54*df8bdeb3SjohnzLDFLAGS += -lmd -lelf -lkmf -lcryptoutil -lc 55*df8bdeb3Sjohnz 56*df8bdeb3Sjohnz# 57*df8bdeb3Sjohnz# While the gate builds a libelfsign.so linked staticly against 58*df8bdeb3Sjohnz# pksc11_softtoken, the tools version of libelfsign is dynamically linked 59*df8bdeb3Sjohnz# against the build machines pkcs11_softtoken.so. 60*df8bdeb3Sjohnz# 61*df8bdeb3SjohnzSOFTTOKENDIR = /usr/lib/security 62*df8bdeb3SjohnzSOFTTOKENLIB = pkcs11_softtoken.so 63*df8bdeb3SjohnzLDFLAGS += -R $(SOFTTOKENDIR) $(SOFTTOKENDIR)/$(SOFTTOKENLIB) 64*df8bdeb3Sjohnz 65*df8bdeb3SjohnzMKDIR= mkdir 66*df8bdeb3Sjohnz 67*df8bdeb3Sjohnz.KEEP_STATE: 68*df8bdeb3Sjohnz 69*df8bdeb3Sjohnzall: $(PROG) $(SHFILES) 70*df8bdeb3Sjohnz 71*df8bdeb3Sjohnzinstall: all .WAIT $(ROOTONBLDMACHPROG) $(ROOTONBLDSHFILES) 72*df8bdeb3Sjohnz 73*df8bdeb3Sjohnz$(PROG): $(OBJS) 74*df8bdeb3Sjohnz $(LINK.c) -o $@ $(OBJS) $(LDLIBS) 75*df8bdeb3Sjohnz $(POST_PROCESS) 76*df8bdeb3Sjohnz 77*df8bdeb3Sjohnz%.o: $(CMDDIR)/%.c 78*df8bdeb3Sjohnz $(COMPILE.c) -o $@ $< 79*df8bdeb3Sjohnz 80*df8bdeb3Sjohnz%.o: $(LIBDIR)/%.c 81*df8bdeb3Sjohnz $(COMPILE.c) -o $@ $< 82*df8bdeb3Sjohnz 83*df8bdeb3Sjohnzlint: lint_SRCS 84*df8bdeb3Sjohnz 85*df8bdeb3Sjohnzclean: 86*df8bdeb3Sjohnz $(RM) $(CLEANFILES) 87*df8bdeb3Sjohnz 88*df8bdeb3Sjohnzinclude ../../../src/tools/Makefile.targ 89