Makefile revision c0c79a3f09914f35651895ffc111883455b7f62d
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.
a9478106a12424322498e53cf7cd75bd8a4d6004Yuri Pankov#
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe# When distributing Covered Code, include this CDDL HEADER in each
a9478106a12424322498e53cf7cd75bd8a4d6004Yuri Pankov# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
a9478106a12424322498e53cf7cd75bd8a4d6004Yuri Pankov# If applicable, add the following below this CDDL HEADER, with the
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe# fields enclosed by brackets "[]" replaced with your own identifying
a9478106a12424322498e53cf7cd75bd8a4d6004Yuri Pankov# information: Portions Copyright [yyyy] [name of copyright owner]
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe#
a9478106a12424322498e53cf7cd75bd8a4d6004Yuri Pankov# CDDL HEADER END
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe#
a9478106a12424322498e53cf7cd75bd8a4d6004Yuri Pankov#
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe# Copyright 2007 Sun Microsystems, Inc. All rights reserved.
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe# Use is subject to license terms.
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe#
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe#
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe#ident "%Z%%M% %I% %E% SMI"
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe# lib/libadt_jni/com/sun/audit/Makefile
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Loweinclude ../Makefile.com
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe
c10c16dec587a0662068f6e2991c29ed3a9db943Richard LoweADT_PKG = com.sun.audit
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe
c10c16dec587a0662068f6e2991c29ed3a9db943Richard LoweTOP = $(SRC)/lib/libadt_jni
c10c16dec587a0662068f6e2991c29ed3a9db943Richard LoweCLASSPATH = $(TOP):com/sun/audit
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe
c10c16dec587a0662068f6e2991c29ed3a9db943Richard LoweJAVAFLAGS += -source 1.4 -target 1.4
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe
c10c16dec587a0662068f6e2991c29ed3a9db943Richard LoweSOURCE:sh = ls *.java
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe
c10c16dec587a0662068f6e2991c29ed3a9db943Richard LoweCLASSES = $(SOURCE:java=class)
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe
c10c16dec587a0662068f6e2991c29ed3a9db943Richard LoweJNIH = AuditSession.h
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe
c10c16dec587a0662068f6e2991c29ed3a9db943Richard LoweJAR_FILE=Audit.jar
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe
c10c16dec587a0662068f6e2991c29ed3a9db943Richard LoweINSTALL_JAR = $(ROOTAUDITHOME)/$(JAR_FILE)
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe
c10c16dec587a0662068f6e2991c29ed3a9db943Richard LoweCLEAN_FILES = *.class $(JNIH) *.jar AuditEvent*.java
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe
c10c16dec587a0662068f6e2991c29ed3a9db943Richard LoweDEFINES=
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe
c10c16dec587a0662068f6e2991c29ed3a9db943Richard LoweINCLUDES= -I${JAVA_HOME}/include \
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe -I${JAVA_HOME}/include/solaris
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe.KEEP_STATE:
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Loweall: $(JNIH) $(CLASSES)
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Loweinstall: $(CLASSES) $(ROOTAUDITHOME) \
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe $(JAR_FILE) $(INSTALL_JAR) \
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe $(JNIH)
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe
a9478106a12424322498e53cf7cd75bd8a4d6004Yuri Pankov$(JNIH): $(CLASSES)
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe @for class_name in $(CLASSES) ; do \
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe k=`/bin/basename $$class_name .class`; \
a9478106a12424322498e53cf7cd75bd8a4d6004Yuri Pankov class="$$class $(ADT_PKG).$$k"; \
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe done; \
a9478106a12424322498e53cf7cd75bd8a4d6004Yuri Pankov JC="$(JAVAH) -classpath $(CLASSPATH) -jni -o $(JNIH) $$class"; \
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe echo $$JC; \
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe $$JC
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe
a9478106a12424322498e53cf7cd75bd8a4d6004Yuri Pankovclean clobber:
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe $(RM) $(CLEAN_FILES)
a9478106a12424322498e53cf7cd75bd8a4d6004Yuri Pankov
$(ROOTAUDITHOME):
$(INS.dir)
$(ROOTAUDITHOME)/%: %
$(INS.file)
$(JAR_FILE): $(CLASSES)
cd $(TOP); \
pwd; \
$(JAR) -cvf $(TOP)/com/sun/audit/$(JAR_FILE) com/sun/audit/*.class