199ebb4caSwyllys#
299ebb4caSwyllys# CDDL HEADER START
399ebb4caSwyllys#
499ebb4caSwyllys# The contents of this file are subject to the terms of the
599ebb4caSwyllys# Common Development and Distribution License (the "License").
699ebb4caSwyllys# You may not use this file except in compliance with the License.
799ebb4caSwyllys#
899ebb4caSwyllys# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
999ebb4caSwyllys# or http://www.opensolaris.org/os/licensing.
1099ebb4caSwyllys# See the License for the specific language governing permissions
1199ebb4caSwyllys# and limitations under the License.
1299ebb4caSwyllys#
1399ebb4caSwyllys# When distributing Covered Code, include this CDDL HEADER in each
1499ebb4caSwyllys# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
1599ebb4caSwyllys# If applicable, add the following below this CDDL HEADER, with the
1699ebb4caSwyllys# fields enclosed by brackets "[]" replaced with your own identifying
1799ebb4caSwyllys# information: Portions Copyright [yyyy] [name of copyright owner]
1899ebb4caSwyllys#
1999ebb4caSwyllys# CDDL HEADER END
2099ebb4caSwyllys#
2199ebb4caSwyllys#
2224fe0b3bSjmcp# Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
2399ebb4caSwyllys# Use is subject to license terms.
2499ebb4caSwyllys#
2599ebb4caSwyllys# Makefile for policy testing code
2699ebb4caSwyllys#
2799ebb4caSwyllys
2899ebb4caSwyllysPROG =	kmfcfg
2999ebb4caSwyllys
3099ebb4caSwyllysOBJS =	kmfcfg.o \
3199ebb4caSwyllys	list.o \
3299ebb4caSwyllys	delete.o \
3399ebb4caSwyllys	util.o \
3499ebb4caSwyllys	create.o \
3599ebb4caSwyllys	modify.o \
3699ebb4caSwyllys	export.o \
37431deaa0Shylee	import.o \
38431deaa0Shylee	install.o \
39431deaa0Shylee	uninstall.o
4099ebb4caSwyllys
4199ebb4caSwyllysinclude ../../Makefile.cmd
4299ebb4caSwyllys
4399ebb4caSwyllysKMFDIR		= $(SRC)/lib/libkmf
4499ebb4caSwyllysSRCS		= $(OBJS:%.o=%.c)
4599ebb4caSwyllys
4699ebb4caSwyllysPOFILES		= $(OBJS:%.o=%.po)
4799ebb4caSwyllysPOFILE		= $(PROG)_msg.po
4899ebb4caSwyllysMSGFILES	= $(SRCS:%.c=%.i)
4999ebb4caSwyllys
50494f7e12SKeith M WesolowskiCPPFLAGS	+= -I$(ADJUNCT_PROTO)/usr/include/libxml2 \
51494f7e12SKeith M Wesolowski		-I$(KMFDIR)/include -I.
5299ebb4caSwyllysLDLIBS		+= -L$(ROOT)/usr/lib -lkmf -lcryptoutil
5399ebb4caSwyllysXMLLIB		= -lxml2
54*5801b0f0SToomas SoomeNATIVE_LIBS +=	libxml2.so
5599ebb4caSwyllys
5699ebb4caSwyllys.KEEP_STATE:
5799ebb4caSwyllys
5899ebb4caSwyllysXMLDIR=		$(ROOT)/etc/security
5999ebb4caSwyllysDTDDIR=		$(ROOT)/usr/share/lib/xml/dtd
6099ebb4caSwyllysROOTDTDS=	$(DTDDIR)/kmfpolicy.dtd
6199ebb4caSwyllysROOTXML=	$(XMLDIR)/kmfpolicy.xml
6299ebb4caSwyllys
6399ebb4caSwyllys$(ROOTDTDS) :=	FILEMODE = 444
6499ebb4caSwyllys
6599ebb4caSwyllys$(ROOTXML)  :=	FILEMODE = 644
6699ebb4caSwyllys
6799ebb4caSwyllysall:	$(PROG) $(ROOTDTDS)
6899ebb4caSwyllys
6999ebb4caSwyllys$(PROG): $(OBJS)
7099ebb4caSwyllys	$(LINK.c) -o $@ $(OBJS) $(LDLIBS) $(XMLLIB)
7199ebb4caSwyllys	$(POST_PROCESS)
7299ebb4caSwyllys
7399ebb4caSwyllys$(POFILE):	$(POFILES)
7446e62cfaSwyllys	$(RM) $@; $(CAT) $(POFILES) > $@
7599ebb4caSwyllys
7699ebb4caSwyllysinstall:	all $(ROOTDTDS) $(ROOTXML) $(ROOTPROG)
7799ebb4caSwyllys
7899ebb4caSwyllys$(XMLDIR)/%: %
7999ebb4caSwyllys	$(INS.file)
8099ebb4caSwyllys
8199ebb4caSwyllys$(DTDDIR)/%: %
8299ebb4caSwyllys	$(INS.file)
8399ebb4caSwyllys
8499ebb4caSwyllysclean:
8599ebb4caSwyllys	$(RM) $(OBJS)
8699ebb4caSwyllys
8799ebb4caSwyllysinclude ../../Makefile.targ
88