Makefile revision 99ebb4ca412cb0a19d77a3899a87c055b9c30fa8
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe#
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe# CDDL HEADER START
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe#
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe# The contents of this file are subject to the terms of the
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe# Common Development and Distribution License (the "License").
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe# You may not use this file except in compliance with the License.
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe#
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe# or http://www.opensolaris.org/os/licensing.
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe# See the License for the specific language governing permissions
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe# and limitations under the License.
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe#
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe# When distributing Covered Code, include this CDDL HEADER in each
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe# If applicable, add the following below this CDDL HEADER, with the
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe# fields enclosed by brackets "[]" replaced with your own identifying
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe# information: Portions Copyright [yyyy] [name of copyright owner]
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe#
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe# CDDL HEADER END
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe#
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe#
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe# Copyright 2006 Sun Microsystems, Inc. All rights reserved.
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe# Use is subject to license terms.
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe#
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe# ident "%Z%%M% %I% %E% SMI"
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe#
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe# Makefile for policy testing code
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe#
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe
c10c16dec587a0662068f6e2991c29ed3a9db943Richard LowePROG = kmfcfg
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe
c10c16dec587a0662068f6e2991c29ed3a9db943Richard LoweOBJS = kmfcfg.o \
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe list.o \
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe delete.o \
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe util.o \
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe create.o \
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe modify.o \
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe export.o \
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe import.o
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Loweinclude ../../Makefile.cmd
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe
c10c16dec587a0662068f6e2991c29ed3a9db943Richard LoweKMFDIR = $(SRC)/lib/libkmf
c10c16dec587a0662068f6e2991c29ed3a9db943Richard LoweSRCS = $(OBJS:%.o=%.c)
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe
c10c16dec587a0662068f6e2991c29ed3a9db943Richard LowePOFILES = $(OBJS:%.o=%.po)
c10c16dec587a0662068f6e2991c29ed3a9db943Richard LowePOFILE = $(PROG)_msg.po
c10c16dec587a0662068f6e2991c29ed3a9db943Richard LoweMSGFILES = $(SRCS:%.c=%.i)
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe
c10c16dec587a0662068f6e2991c29ed3a9db943Richard LoweCPPFLAGS += -I/usr/include/libxml2 -I$(KMFDIR)/include -I.
c10c16dec587a0662068f6e2991c29ed3a9db943Richard LoweLDLIBS += -L$(ROOT)/usr/lib -lkmf -lcryptoutil
c10c16dec587a0662068f6e2991c29ed3a9db943Richard LoweXMLLIB = -lxml2
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe.KEEP_STATE:
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe
c10c16dec587a0662068f6e2991c29ed3a9db943Richard LoweXMLDIR= $(ROOT)/etc/security
c10c16dec587a0662068f6e2991c29ed3a9db943Richard LoweDTDDIR= $(ROOT)/usr/share/lib/xml/dtd
c10c16dec587a0662068f6e2991c29ed3a9db943Richard LoweROOTDTDS= $(DTDDIR)/kmfpolicy.dtd
c10c16dec587a0662068f6e2991c29ed3a9db943Richard LoweROOTXML= $(XMLDIR)/kmfpolicy.xml
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe$(ROOTDTDS) := FILEMODE = 444
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe$(ROOTDTDS) := OWNER = root
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe$(ROOTDTDS) := GROUP = bin
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe$(ROOTXML) := FILEMODE = 644
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe$(ROOTXML) := OWNER = root
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe$(ROOTXML) := GROUP = bin
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Loweall: $(PROG) $(ROOTDTDS)
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe$(PROG): $(OBJS)
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe $(LINK.c) -o $@ $(OBJS) $(LDLIBS) $(XMLLIB)
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe $(POST_PROCESS)
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe$(POFILE): $(POFILES)
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe $(BUILDPO.pofiles)
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Loweinstall: all $(ROOTDTDS) $(ROOTXML) $(ROOTPROG)
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe$(XMLDIR)/%: %
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe $(INS.file)
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe$(DTDDIR)/%: %
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe $(INS.file)
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Loweclean:
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe $(RM) $(OBJS)
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowelint : lint_SRCS
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Loweinclude ../../Makefile.targ
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe