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# Copyright (c) 2018, Joyent, Inc.
26# Copyright 2020 Peter Tribble
27#
28
29#
30# Makefile for Java Print Manager server
31#
32
33LIBRARY =	libpmgr.a
34VERS =		.1
35
36OBJECTS =	DoPrinterNS.o NS.o
37
38CLASSFILES =	Printer.class \
39		Host.class \
40		SysCommand.class \
41		NameService.class \
42		PrinterUtil.class \
43		DoPrinterView.class \
44		DoPrinterAdd.class \
45		DoPrinterDelete.class \
46		DoPrinterUtil.class \
47		DoPrinterMod.class \
48		DoPrinterNS.class \
49		Valid.class \
50		Test.class \
51		Debug.class \
52		PrinterDebug.class \
53		pmException.class \
54		pmAuthException.class \
55		pmAuthRhostException.class \
56		pmCmdFailedException.class \
57		pmInternalErrorException.class \
58		pmHostNotPingableException.class \
59		pmNSNotConfiguredException.class \
60		pmMisc.class
61
62include		$(SRC)/lib/Makefile.lib
63
64SRCDIR =	.
65
66# There should be a mapfile here
67MAPFILES =
68
69CLASSPATH=	$(SRC)/cmd/print/printmgr
70
71JAVAFILES =	$(CLASSFILES:.class=.java)
72
73ROOTDIRS =	$(ROOT)/usr/sadm/admin \
74		$(ROOT)/usr/sadm/admin/printmgr \
75		$(ROOT)/usr/sadm/admin/printmgr/lib
76
77# override ROOTLIBDIR and ROOTLINKS
78ROOTLIBDIR =	$(ROOT)/usr/sadm/admin/printmgr/lib
79ROOTLIBS=       $(LIBS:%=$(ROOTLIBDIR)/%)
80
81
82# Following variables define where to find header files
83CPPFLAGS +=	-I$(JAVA_ROOT)/include -I$(JAVA_ROOT)/include/solaris -I.
84
85CERRWARN +=	-_gcc=-Wno-unused-variable
86CERRWARN +=	$(CNOWARN_UNINIT)
87
88# not linted
89SMATCH=off
90
91LDLIBS +=	-lprint -lnsl -lsocket -lc
92
93CLEANFILES=	*.class
94CLOBBERFILES=	$(LIBLINKS)
95
96all: $(CLASSFILES) $(DYNLIB)
97
98install: all $(ROOTDIRS) $(ROOTLINKS)
99
100#
101# Build standalone programs for testing
102#
103NS: NS.c
104	$(CC) NS.c $(CCGDEBUG) $(ILDOFF) -o NS -DMAIN=1 $(ENVLDLIBS1) $(ENVLIBS2) \
105	    -lprint -lnsl -lsocket
106
107cstyle:
108	cstyle $(SRCS)
109
110jstyle:
111	jstyle $(JAVAFILES)
112
113_msg:
114
115$(ROOTDIRS):
116	$(INS.dir)
117
118include $(SRC)/lib/Makefile.targ
119