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 2008 Sun Microsystems, Inc.  All rights reserved.
23# Use is subject to license terms.
24#
25
26#
27# This make file will build mech_dh.so.1. This shared object
28# contains all the functionality needed to support Diffie-Hellman GSS-API
29# mechanism.
30#
31
32LIBRARY= mech_dh.a
33VERS = .1
34
35MECH =	context.o context_establish.o cred.o crypto.o dhmech.o \
36	MICwrap.o name.o oid.o seq.o token.o support.o validate.o
37
38DERIVED_OBJS = xdr_token.o
39
40CRYPTO = md5.o
41
42OBJECTS= $(MECH) $(CRYPTO) $(DERIVED_OBJS)
43
44# include library definitions
45include ../../../../Makefile.lib
46
47MAKEFILE_EXPORT = $(CLOSED)/lib/gss_mechs/mech_dh/backend/Makefile.export
48$(EXPORT_RELEASE_BUILD)include $(MAKEFILE_EXPORT)
49
50
51CPPFLAGS += -I../mech -I../crypto -I$(SRC)/uts/common/gssapi/include
52
53CERRWARN +=	-_gcc=-Wno-parentheses
54CERRWARN +=	-_gcc=-Wno-unused-variable
55CERRWARN +=	-_gcc=-Wno-uninitialized
56
57$(PICS) := 	CFLAGS += $(XFFLAG)
58$(PICS) := 	CCFLAGS += $(XFFLAG)
59$(PICS) :=	CFLAGS64 += $(XFFLAG)
60$(PICS) :=	CCFLAGS64 += $(XFFLAG)
61
62DYNFLAGS +=	$(ZIGNORE)
63
64LIBS = $(DYNLIB)
65LIBNAME = $(LIBRARY:%.a=%)
66
67MAPFILES =	../mapfile-vers
68$(EXPORT_RELEASE_BUILD)MAPFILES = \
69	$(CLOSED)/lib/gss_mechs/mech_dh/backend/mapfile-vers-export
70
71LDLIBS +=  -lgss -lnsl -lc
72
73RPCGEN += -C
74SED = sed
75
76.KEEP_STATE:
77
78CSRCS= $(MECH:%.o=../mech/%.c) $(CRYPTO:%.o=../crypto/%.c)
79SRCS=	$(CSRCS)
80
81ROOTLIBDIR = $(ROOT)/usr/lib/gss
82ROOTLIBDIR64 = $(ROOT)/usr/lib/$(MACH64)/gss
83
84#LINTFLAGS += -dirout=lint -errfmt=simple
85#LINTFLAGS64 += -dirout=lint -errfmt=simple -errchk all
86LINTOUT =	lint.out
87LINTSRC =	$(LINTLIB:%.ln=%)
88ROOTLINTDIR =	$(ROOTLIBDIR)
89#ROOTLINT = 	$(LINTSRC:%=$(ROOTLINTDIR)/%)
90
91CLEANFILES += $(LINTOUT) $(LINTLIB)
92
93lint: lintcheck
94
95$(ROOTLIBDIR):
96	$(INS.dir)
97
98$(ROOTLIBDIR64):
99	$(INS.dir)
100
101$(OBJS): ../mech/dh_gssapi.h ../mech/token.h ../mech/oid.h
102
103
104objs/%.o pics/%.o: ../crypto/%.c
105	$(COMPILE.c)  -o $@ $<
106	$(POST_PROCESS_O)
107
108objs/%.o pics/%.o: ../mech/%.c
109	$(COMPILE.c)  -o $@ $<
110	$(POST_PROCESS_O)
111
112objs/%.o pics/%.o: ../profile/%.c
113	$(COMPILE.c)  -o $@ $<
114	$(POST_PROCESS_O)
115
116# include library targets
117include ../../../../Makefile.targ
118