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, Version 1.0 only
6# (the "License").  You may not use this file except in compliance
7# with the License.
8#
9# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10# or http://www.opensolaris.org/os/licensing.
11# See the License for the specific language governing permissions
12# and limitations under the License.
13#
14# When distributing Covered Code, include this CDDL HEADER in each
15# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16# If applicable, add the following below this CDDL HEADER, with the
17# fields enclosed by brackets "[]" replaced with your own identifying
18# information: Portions Copyright [yyyy] [name of copyright owner]
19#
20# CDDL HEADER END
21#
22#
23# Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
24# Use is subject to license terms.
25#
26#
27#ident	"%Z%%M%	%I%	%E% SMI"
28# lib/libadt_jni/com/sun/audit/Makefile
29
30include ../Makefile.com
31
32ADT_PKG = com.sun.audit
33
34TOP = $(SRC)/lib/libadt_jni
35CLASSPATH = $(TOP):com/sun/audit
36
37JAVAFLAGS +=	-source 1.4 -target 1.4 -bootclasspath /usr/j2se/jre/lib/rt.jar
38
39SOURCE:sh = ls *.java
40
41CLASSES = $(SOURCE:java=class)
42
43JNIH    = AuditSession.h
44
45JAR_FILE=Audit.jar
46
47INSTALL_JAR = $(ROOTAUDITHOME)/$(JAR_FILE)
48
49CLEAN_FILES = *.class $(JNIH) *.jar
50
51DEFINES=
52
53INCLUDES=	-I${JAVA_HOME}/include	\
54		-I${JAVA_HOME}/include/solaris
55
56.KEEP_STATE:
57
58all:	$(JNIH) $(CLASSES)
59
60install:	$(CLASSES) $(ROOTAUDITHOME)	\
61		$(JAR_FILE) $(INSTALL_JAR)	\
62		$(JNIH)
63
64$(JNIH): $(CLASSES)
65	@for class_name in $(CLASSES) ; do \
66		k=`/bin/basename $$class_name .class`; \
67		class="$$class $(ADT_PKG).$$k"; \
68	done; \
69	JC="$(JAVAH) -classpath $(CLASSPATH) -jni -o $(JNIH) $$class"; \
70	echo $$JC; \
71	$$JC
72
73clean clobber:
74	$(RM) $(CLEAN_FILES)
75
76$(ROOTAUDITHOME):
77	$(INS.dir)
78
79$(ROOTAUDITHOME)/%: %
80	$(INS.file)
81
82$(JAR_FILE): $(CLASSES)
83	cd $(TOP); \
84	pwd; \
85	$(JAR) -cvf $(TOP)/com/sun/audit/$(JAR_FILE) com/sun/audit/*.class
86