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 86CERRWARN += -_gcc=-Wno-unused-variable 87CERRWARN += -_gcc=-Wno-uninitialized 88 89LDLIBS += -lprint -lnsl -lsocket -lc 90 91CLEANFILES= *.class $(LINTLIB) $(LINTOUT) 92CLOBBERFILES= $(JNIHDR_FILES) $(LIBLINKS) 93 94all: $(CLASSFILES) $(JNIHDR_FILES) $(DYNLIB) 95 96install: all $(ROOTDIRS) $(ROOTLINKS) 97 98# 99# Build jni header file 100# Use $@ instead of the "unreliable" $* 101# 102$(JNIHDR_FILES): $(JNICLASSFILES) 103 $(JAVAH) -jni -classpath $(CLASSPATH) \ 104 `echo $@ | sed 's/.h$$//' | tr _ .` 105 106# 107# Build standalone programs for testing 108# 109NS: NS.c 110 $(CC) NS.c -g $(ILDOFF) -o NS -DMAIN=1 $(ENVLDLIBS1) $(ENVLIBS2) \ 111 -lprint -lnsl -lsocket 112 113lint: $(JNIHDR_FILES) lintcheck 114 115cstyle: 116 cstyle $(SRCS) 117 118jstyle: 119 jstyle $(JAVAFILES) 120 121_msg: 122 123$(ROOTDIRS): 124 $(INS.dir) 125 126include $(SRC)/lib/Makefile.targ 127