xref: /titanic_50/usr/src/lib/libgss/Makefile.com (revision 4c56998a4a895e2885b4848d6753357edccb6436)
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#
22# Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
23# Use is subject to license terms.
24#
25
26LIBRARY = libgss.a
27VERS = .1
28
29GSSOBJECTS	= g_acquire_cred.o \
30	  g_acquire_cred_with_pw.o \
31	  g_store_cred.o \
32	  g_rel_cred.o \
33	  g_init_sec_context.o \
34	  g_accept_sec_context.o \
35	  g_process_context.o \
36	  g_delete_sec_context.o \
37	  g_imp_sec_context.o \
38	  g_exp_sec_context.o \
39	  g_context_time.o \
40	  g_sign.o \
41	  g_verify.o \
42	  g_seal.o \
43	  g_unseal.o \
44	  g_dsp_status.o \
45	  g_compare_name.o \
46	  g_dsp_name.o \
47	  g_imp_name.o \
48	  g_rel_name.o \
49	  g_rel_buffer.o \
50	  g_rel_oid_set.o \
51	  g_oid_ops.o \
52	  g_inquire_cred.o \
53	  g_inquire_context.o \
54	  g_inquire_names.o \
55	  g_initialize.o \
56	  g_glue.o \
57	  gssd_pname_to_uid.o \
58	  oid_ops.o \
59	  g_canon_name.o \
60	  g_dup_name.o \
61	  g_export_name.o \
62	  g_utils.o \
63	  g_userok.o \
64	  g_buffer_set.o \
65	  g_inq_context_oid.o \
66
67
68# defines the duplicate sources we share with gsscred
69GSSCRED_DIR =	$(SRC)/cmd/gss/gsscred
70GSSCREDOBJ =	gsscred_utils.o gsscred_file.o
71# defines the duplicate sources we share with krb5 mech
72KRB5DIR= $(SRC)/lib/gss_mechs/mech_krb5/mech
73KRB5OBJ= rel_buffer.o util_buffer_set.o
74# defines the duplicate sources we share with kernel module
75UTSGSSDIR =	$(SRC)/uts/common/gssapi
76UTSGSSOBJ =	gen_oids.o
77
78SRCS +=		$(GSSCREDOBJ:%.o=$(GSSCRED_DIR)/%.c) \
79		$(KRB5OBJ:%.o=$(KRB5DIR)/%.c) \
80		$(UTSGSSOBJ:%.o=$(UTSGSSDIR)/%.c)
81GSSLINTSRC =	$(GSSOBJECTS:%.o=$(SRCDIR)/%.c) \
82		$(GSSCREDOBJ:%.o=$(GSSCRED_DIR)/%.c) \
83	        $(KRB5OBJ:%.o=$(KRB5DIR)/%.c) \
84		$(UTSGSSOBJ:%.o=$(UTSGSSDIR)/%.c)
85OBJECTS =	$(GSSOBJECTS) $(GSSCREDOBJ) $(KRB5OBJ) $(UTSGSSOBJ)
86
87# include library definitions
88include ../../Makefile.lib
89
90LIBS =	$(DYNLIB) $(LINTLIB)
91
92$(LINTLIB):=	SRCS = $(SRCDIR)/$(LINTSRC)
93LDLIBS += 	-lc
94
95CPPFLAGS += 	-I$(GSSCRED_DIR) -I$(SRC)/uts/common/gssapi/include \
96		 -I$(SRC)/uts/common/gssapi/mechs/krb5/include \
97		 -I$(SRC)/uts/common/gssapi/ \
98		 -I$(SRC)/lib/gss_mechs/mech_krb5/include/ \
99		-DHAVE_STDLIB_H
100
101$(EXPORT_RELEASE_BUILD)include $(CLOSED)/lib/libgss/Makefile.export
102
103.KEEP_STATE:
104
105all: $(LIBS)
106
107lintcheck:=	SRCS= $(GSSLINTSRC)
108
109lint:  lintcheck
110
111$(GSSCREDOBJ:%.o=pics/%.o):
112	$(COMPILE.c) -o $@ $(@:pics/%.o=$(GSSCRED_DIR)/%.c)
113	$(POST_PROCESS_O)
114
115# we need this in libgss so we don't have to link against mech_krb5
116pics/rel_buffer.o: $(SRC)/lib/gss_mechs/mech_krb5/mech/rel_buffer.c
117	$(COMPILE.c) -o $@ $(SRC)/lib/gss_mechs/mech_krb5/mech/rel_buffer.c
118	$(POST_PROCESS_O)
119
120# we need this in libgss so we don't have to link against mech_krb5
121pics/util_buffer_set.o: $(SRC)/lib/gss_mechs/mech_krb5/mech/util_buffer_set.c
122	$(COMPILE.c) -o $@ $(SRC)/lib/gss_mechs/mech_krb5/mech/util_buffer_set.c
123	$(POST_PROCESS_O)
124
125# gen_oids.c is kept in the kernel since the OIDs declared in them are
126# used by rpcsec module
127pics/gen_oids.o: $(SRC)/uts/common/gssapi/gen_oids.c
128	$(COMPILE.c) -o $@ $(SRC)/uts/common/gssapi/gen_oids.c
129	$(POST_PROCESS_O)
130
131# include library targets
132include ../../Makefile.targ
133