xref: /titanic_50/usr/src/cmd/cmd-crypto/kmfcfg/Makefile (revision bfed486ad8de8b8ebc6345a8e10accae08bf2f45)
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 2007 Sun Microsystems, Inc.  All rights reserved.
23# Use is subject to license terms.
24#
25# ident	"%Z%%M%	%I%	%E% SMI"
26#
27# Makefile for policy testing code
28#
29
30PROG =	kmfcfg
31
32OBJS =	kmfcfg.o \
33	list.o \
34	delete.o \
35	util.o \
36	create.o \
37	modify.o \
38	export.o \
39	import.o \
40	install.o \
41	uninstall.o
42
43include ../../Makefile.cmd
44
45KMFDIR		= $(SRC)/lib/libkmf
46SRCS		= $(OBJS:%.o=%.c)
47
48POFILES		= $(OBJS:%.o=%.po)
49POFILE		= $(PROG)_msg.po
50MSGFILES	= $(SRCS:%.c=%.i)
51
52CPPFLAGS	+= -I/usr/include/libxml2 -I$(KMFDIR)/include -I.
53LDLIBS		+= -L$(ROOT)/usr/lib -lkmf -lcryptoutil
54XMLLIB		= -lxml2
55
56.KEEP_STATE:
57
58XMLDIR=		$(ROOT)/etc/security
59DTDDIR=		$(ROOT)/usr/share/lib/xml/dtd
60ROOTDTDS=	$(DTDDIR)/kmfpolicy.dtd
61ROOTXML=	$(XMLDIR)/kmfpolicy.xml
62
63$(ROOTDTDS) :=	FILEMODE = 444
64$(ROOTDTDS) :=	OWNER = root
65$(ROOTDTDS) :=	GROUP = bin
66
67$(ROOTXML)  :=	FILEMODE = 644
68$(ROOTXML)  :=	OWNER = root
69$(ROOTXML)  :=	GROUP = bin
70
71all:	$(PROG) $(ROOTDTDS)
72
73$(PROG): $(OBJS)
74	$(LINK.c) -o $@ $(OBJS) $(LDLIBS) $(XMLLIB)
75	$(POST_PROCESS)
76
77$(POFILE):	$(POFILES)
78	$(RM) $@; $(CAT) $(POFILES) > $@
79
80install:	all $(ROOTDTDS) $(ROOTXML) $(ROOTPROG)
81
82$(XMLDIR)/%: %
83	$(INS.file)
84
85$(DTDDIR)/%: %
86	$(INS.file)
87
88clean:
89	$(RM) $(OBJS)
90
91lint : lint_SRCS
92
93include ../../Makefile.targ
94