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 2009 Sun Microsystems, Inc. All rights reserved. 23# Use is subject to license terms. 24# 25 26# 27# Makefile for Java Print Manager server 28# 29 30LIBRARY = libpmgr.a 31VERS = .1 32 33JNIHDR_FILES = com_sun_admin_pm_server_DoPrinterNS.h 34 35OBJECTS = DoPrinterNS.o NS.o 36 37CLASSFILES = Printer.class \ 38 Host.class \ 39 SysCommand.class \ 40 NameService.class \ 41 PrinterUtil.class \ 42 DoPrinterView.class \ 43 DoPrinterAdd.class \ 44 DoPrinterDelete.class \ 45 DoPrinterUtil.class \ 46 DoPrinterMod.class \ 47 DoPrinterNS.class \ 48 Valid.class \ 49 Test.class \ 50 Debug.class \ 51 PrinterDebug.class \ 52 pmException.class \ 53 pmAuthException.class \ 54 pmAuthRhostException.class \ 55 pmCmdFailedException.class \ 56 pmInternalErrorException.class \ 57 pmHostNotPingableException.class \ 58 pmNSNotConfiguredException.class \ 59 pmMisc.class 60 61JNICLASSFILES = DoPrinterNS.class 62 63include $(SRC)/lib/Makefile.lib 64 65SRCDIR = . 66 67# There should be a mapfile here 68MAPFILES = 69 70CLASSPATH= $(SRC)/cmd/print/printmgr 71 72JAVAFILES = $(CLASSFILES:.class=.java) 73 74ROOTDIRS = $(ROOT)/usr/sadm/admin \ 75 $(ROOT)/usr/sadm/admin/printmgr \ 76 $(ROOT)/usr/sadm/admin/printmgr/lib 77 78# override ROOTLIBDIR and ROOTLINKS 79ROOTLIBDIR = $(ROOT)/usr/sadm/admin/printmgr/lib 80ROOTLIBS= $(LIBS:%=$(ROOTLIBDIR)/%) 81 82 83# Following variables define where to find header files 84CPPFLAGS += -I$(JAVA_ROOT)/include -I$(JAVA_ROOT)/include/solaris -I. 85 86LDLIBS += -lprint -lnsl -lsocket -lc 87 88CLEANFILES= *.class $(LINTLIB) $(LINTOUT) 89CLOBBERFILES= $(JNIHDR_FILES) $(LIBLINKS) 90 91all: $(CLASSFILES) $(JNIHDR_FILES) $(DYNLIB) 92 93install: all $(ROOTDIRS) $(ROOTLINKS) 94 95# 96# Build jni header file 97# Use $@ instead of the "unreliable" $* 98# 99$(JNIHDR_FILES): $(JNICLASSFILES) 100 $(JAVAH) -jni -classpath $(CLASSPATH) \ 101 `echo $@ | sed 's/.h$$//' | tr _ .` 102 103# 104# Build standalone programs for testing 105# 106NS: NS.c 107 $(CC) NS.c -g $(ILDOFF) -o NS -DMAIN=1 $(ENVLDLIBS1) $(ENVLIBS2) \ 108 -lprint -lnsl -lsocket 109 110lint: $(JNIHDR_FILES) lintcheck 111 112cstyle: 113 cstyle $(SRCS) 114 115jstyle: 116 jstyle $(JAVAFILES) 117 118_msg: 119 120$(ROOTDIRS): 121 $(INS.dir) 122 123include $(SRC)/lib/Makefile.targ 124