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 # Copyright 2015 Gary Mills 22 # Copyright 2009 Sun Microsystems, Inc. All rights reserved. 23 # Use is subject to license terms. 24 # 25 LIBRARY = pkcs11_tpm.a 26 VERS = .1 27 28 OBJECTS= api_interface.o \ 29 apiutil.o \ 30 asn1.o \ 31 cert.o \ 32 data_obj.o \ 33 decr_mgr.o \ 34 dig_mgr.o \ 35 encr_mgr.o \ 36 globals.o \ 37 hwf_obj.o \ 38 key.o \ 39 key_mgr.o \ 40 loadsave.o \ 41 log.o \ 42 mech_md5.o \ 43 mech_rsa.o \ 44 mech_sha.o \ 45 new_host.o \ 46 obj_mgr.o \ 47 object.o \ 48 sess_mgr.o \ 49 sign_mgr.o \ 50 template.o \ 51 tpm_specific.o \ 52 utility.o \ 53 verify_mgr.o 54 55 56 include $(SRC)/lib/Makefile.lib 57 58 SRCDIR= ../common 59 60 SRCS= $(OBJECTS:%.o=$(SRCDIR)/%.c) 61 62 # set signing mode 63 POST_PROCESS_SO += ; $(ELFSIGN_CRYPTO) 64 65 ROOTLIBDIR=$(ROOT)/usr/lib/security 66 ROOTLIBDIR64=$(ROOT)/usr/lib/security/$(MACH64) 67 68 LIBS=$(DYNLIB) $(DYNLIB64) 69 70 TSSROOT=$(ADJUNCT_PROTO) 71 TSPIINCDIR=$(TSSROOT)/usr/include 72 TSSINC=-I$(TSPIINCDIR) 73 74 LDLIBS += -lc -luuid -lmd -ltspi -lcrypto 75 CPPFLAGS += -xCC -D_POSIX_PTHREAD_SEMANTICS $(TSSINC) 76 CPPFLAGS64 += $(CPPFLAGS) 77 C99MODE= $(C99_ENABLE) 78 79 CERRWARN += -_gcc=-Wno-parentheses 80 CERRWARN += -_gcc=-Wno-unused-label 81 CERRWARN += -_gcc=-Wno-uninitialized 82 83 LINTSRC= $(OBJECTS:%.o=$(SRCDIR)/%.c) 84 85 $(LINTLIB):= SRCS = $(SRCDIR)/$(LINTSRC) 86 LINTSRC= $(SRCS) 87 88 CLOBBERFILES += C.ln 89 90 .KEEP_STATE: 91 92 all: $(LIBS) 93 94 lint: $$(LINTSRC) 95 $(LINT.c) $(LINTCHECKFLAGS) $(LINTSRC) $(LDLIBS) 96 97 pics/%.o: $(SRCDIR)/%.c 98 $(COMPILE.c) -o $@ $< 99 $(POST_PROCESS_O) 100 101 include $(SRC)/lib/Makefile.targ