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 2009 Sun Microsystems, Inc. All rights reserved.
22 # Use is subject to license terms.
23 #
24 # Copyright 2018 Jason King
25 #
26 LIBRARY = pkcs11_tpm.a
27 VERS = .1
28
29 RSA_DIR = $(SRC)/common/crypto/rsa
30 RSA_FLAGS = -I$(RSA_DIR)
31
32 BIGNUM_DIR = $(SRC)/common/bignum
33 BIGNUM_FLAGS = -I$(BIGNUM_DIR)
34
35 PADDING_DIR = $(SRC)/common/crypto/padding
36 PADDING_FLAGS = -I$(PADDING_DIR)
37
38 SOFTCRYPTOFLAGS = $(RSA_FLAGS) $(PADDING_FLAGS) $(BIGNUM_FLAGS)
39
40 OBJECTS= api_interface.o \
41 apiutil.o \
42 asn1.o \
43 cert.o \
44 data_obj.o \
45 decr_mgr.o \
78 ROOTLIBDIR64=$(ROOT)/usr/lib/security/$(MACH64)
79
80 LIBS=$(DYNLIB) $(DYNLIB64)
81
82 TSSROOT=$(ADJUNCT_PROTO)
83 TSPILIBDIR=$(TSSROOT)/usr/lib
84 TSPIINCDIR=$(TSSROOT)/usr/include
85 TSSLIB=-L$(TSPILIBDIR)
86 TSSLIB64=-L$(TSPILIBDIR)/$(MACH64)
87 TSSINC=-I$(TSPIINCDIR)
88
89 LDLIBS += $(TSSLIB) -L$(ADJUNCT_PROTO)/lib -lc -luuid -lmd -ltspi -lsoftcrypto
90 CPPFLAGS += -xCC -D_POSIX_PTHREAD_SEMANTICS $(TSSINC) $(SOFTCRYPTOFLAGS)
91 CPPFLAGS64 += $(CPPFLAGS)
92 CSTD= $(CSTD_GNU99)
93
94 CERRWARN += -_gcc=-Wno-parentheses
95 CERRWARN += -_gcc=-Wno-unused-label
96 CERRWARN += -_gcc=-Wno-uninitialized
97
98 LINTSRC= $(OBJECTS:%.o=$(SRCDIR)/%.c)
99
100 $(LINTLIB):= SRCS = $(SRCDIR)/$(LINTSRC)
101 LINTSRC= $(SRCS)
102
103 CLOBBERFILES += C.ln
104
105 .KEEP_STATE:
106
107 all: $(LIBS)
108
109 lint: $$(LINTSRC)
110 $(LINT.c) $(LINTCHECKFLAGS) $(LINTSRC) $(LDLIBS)
111
112 pics/%.o: $(SRCDIR)/%.c
113 $(COMPILE.c) -o $@ $<
114 $(POST_PROCESS_O)
115
116 include $(SRC)/lib/Makefile.targ
|
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 2009 Sun Microsystems, Inc. All rights reserved.
22 # Use is subject to license terms.
23 #
24 # Copyright 2018 Jason King
25 #
26 # Copyright (c) 2018, Joyent, Inc.
27
28 LIBRARY = pkcs11_tpm.a
29 VERS = .1
30
31 RSA_DIR = $(SRC)/common/crypto/rsa
32 RSA_FLAGS = -I$(RSA_DIR)
33
34 BIGNUM_DIR = $(SRC)/common/bignum
35 BIGNUM_FLAGS = -I$(BIGNUM_DIR)
36
37 PADDING_DIR = $(SRC)/common/crypto/padding
38 PADDING_FLAGS = -I$(PADDING_DIR)
39
40 SOFTCRYPTOFLAGS = $(RSA_FLAGS) $(PADDING_FLAGS) $(BIGNUM_FLAGS)
41
42 OBJECTS= api_interface.o \
43 apiutil.o \
44 asn1.o \
45 cert.o \
46 data_obj.o \
47 decr_mgr.o \
80 ROOTLIBDIR64=$(ROOT)/usr/lib/security/$(MACH64)
81
82 LIBS=$(DYNLIB) $(DYNLIB64)
83
84 TSSROOT=$(ADJUNCT_PROTO)
85 TSPILIBDIR=$(TSSROOT)/usr/lib
86 TSPIINCDIR=$(TSSROOT)/usr/include
87 TSSLIB=-L$(TSPILIBDIR)
88 TSSLIB64=-L$(TSPILIBDIR)/$(MACH64)
89 TSSINC=-I$(TSPIINCDIR)
90
91 LDLIBS += $(TSSLIB) -L$(ADJUNCT_PROTO)/lib -lc -luuid -lmd -ltspi -lsoftcrypto
92 CPPFLAGS += -xCC -D_POSIX_PTHREAD_SEMANTICS $(TSSINC) $(SOFTCRYPTOFLAGS)
93 CPPFLAGS64 += $(CPPFLAGS)
94 CSTD= $(CSTD_GNU99)
95
96 CERRWARN += -_gcc=-Wno-parentheses
97 CERRWARN += -_gcc=-Wno-unused-label
98 CERRWARN += -_gcc=-Wno-uninitialized
99
100 # not linted
101 SMATCH=off
102
103 LINTSRC= $(OBJECTS:%.o=$(SRCDIR)/%.c)
104
105 $(LINTLIB):= SRCS = $(SRCDIR)/$(LINTSRC)
106 LINTSRC= $(SRCS)
107
108 CLOBBERFILES += C.ln
109
110 .KEEP_STATE:
111
112 all: $(LIBS)
113
114 lint: $$(LINTSRC)
115 $(LINT.c) $(LINTCHECKFLAGS) $(LINTSRC) $(LDLIBS)
116
117 pics/%.o: $(SRCDIR)/%.c
118 $(COMPILE.c) -o $@ $<
119 $(POST_PROCESS_O)
120
121 include $(SRC)/lib/Makefile.targ
|