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 2014 PALO, Richard. All rights reserved.
26 #
27 # Makefile configuration for SLP.
28
29 # The SLP Java package
30
31 PKGPATH=com/sun/slp
32 PKGNAME=com.sun.slp
33
34 # The SLP directories.
35
36 SLPDIR=$(SRC)/lib/libslp
37 DOC=$(SLPDIR)/javadoc
38 CLASSES=$(SLPDIR)/classes
39 SLPJAVASRC=$(SLPDIR)/javalib
40
41 # SLP jar file, its ultimate destination, and packaging details
42 SLPJAR=slp.jar
43 SLPDJAR=slpd.jar
44 JARDESTDIR=$(ROOT)/usr/share/lib/slp
45 INSJARS=$(JARDESTDIR)/$(SLPJAR) $(JARDESTDIR)/$(SLPDJAR)
46
47 $(JARDESTDIR)/%: $(CLASSES)/%
48 $(INS.file)
49
50 # Manifest files
51 SLPMANI= $(CLASSES)/manifest.slp
52 SLPDMANI= $(CLASSES)/manifest.slpd
53
54 MANIFESTS= $(SLPMANI) $(SLPDMANI)
55
56 # Controlled CLASSPATH for making
57 SLPCLASSPATH=$(CLASSES):$(SLPJAVASRC)
58
59 # javac flags
60 JFLAGS= -O -d $(CLASSES) -sourcepath $(SLPCLASSPATH)
61 JFLAGS += -source 1.6 -target 1.6 -Xlint:deprecation,-options
62
63 # The default make rule for Java files
64 COMPILE.java=$(JAVAC) $(JFLAGS)
65
66 $(CLASSES)/$(PKGPATH)/%.class: $(SLPJAVASRC)/$(PKGPATH)/%.java
67 $(COMPILE.java) $<
68
69 # Where to put the message files
70 MSGDIR = $(ROOT)/usr/share/lib/locale/$(PKGPATH)
71 MSGDIRS = $(ROOT)/usr/share/lib/locale \
72 $(ROOT)/usr/share/lib/locale/com \
73 $(ROOT)/usr/share/lib/locale/com/sun \
74 $(MSGDIR)
75 CLIENT_MSGS=ClientLib_en.properties
76 SERVER_MSGS=Server_en.properties
77 MSGFILES=$(MSGDIR)/$(CLIENT_MSGS) $(MSGDIR)/$(SERVER_MSGS)
78
79 $(JARDESTDIR)/$(SLPDJAR) := FILEMODE = 600
80
81
82 # All SLP classes, not including internal classes (since these are
83 # generated and packaged automatically buy this Makefile). Since
84 # we take advantage of -Xdepend, the strategy is to place trigger
85 # classes at the beginning of the list; these will trigger javac to
86 # compile all other classes.
87 SLP_CLASSES=\
88 UARequester.class SARequester.class slpd.class \
89 SunServerDATable.class AttributeVerifier.class \
90 SunDATable.class SLPHeaderV2.class SLPServerHeaderV2.class \
91 SLPHeaderV1.class SLPV1Manager.class Syslog.class \
92 StderrLog.class SLPDgui.class \
93 ServiceLocationException.class ServiceLocationEnumeration.class \
94 ServiceLocationEnumerator.class Assert.class \
95 ServiceType.class ServiceURL.class \
96 ServiceLocationAttribute.class ServerAttribute.class \
97 AttributeString.class AttributePattern.class \
98 Opaque.class AuthBlock.class \
99 Defaults.class SLPConfig.class \
100 SrvLocMsg.class SrvLocHeader.class\
101 SrvLocMsgImpl.class CAttrMsg.class \
102 SAttrMsg.class CDAAdvert.class \
103 SDAAdvert.class CSAAdvert.class \
104 SSAAdvert.class CSrvMsg.class \
105 SSrvMsg.class CSrvTypeMsg.class \
106 SSrvTypeMsg.class CSrvReg.class \
107 SSrvReg.class CSrvDereg.class \
108 SSrvDereg.class DATable.class \
109 ServiceStore.class ServiceStoreFactory.class \
110 ServiceTable.class ServiceStoreInMemory.class \
111 Advertiser.class Locator.class \
112 ServiceLocationManager.class PermSARegTable.class \
113 DAAdvertiser.class ServerDATable.class \
114 Listener.class StreamListener.class \
115 RequestHandler.class Transact.class \
116 SLPV1SAttrMsg.class SLPV1SDAAdvert.class \
117 SLPV1SSrvDereg.class SLPV1SSrvMsg.class \
118 SLPV1SSrvReg.class SLPV1SSrvTypeMsg.class \
119 ServiceLocationAttributeV1.class ServiceURLV1.class \
120 SLPTemplateRegistry.class ActiveDiscoverer.class \
121 AttributeDescriptor.class ClientMsgManager.class \
122 IANACharCode.class Parser.class \
123 ServiceLocationAttributeVerifier.class SLPV1CDAAdvert.class \
124 URLAttributeVerifier.class TemplateRegistry.class \
125 ServiceLocationAttributeDescriptor.class \
126 SLPTokenizer.class
127
128 # This is a hand-crafted subset of classes that are needed for slp.jar.
129 # We take the extra effort here so that customers don't need to pull
130 # in slpd.jar, which is more than double the size of slp.jar, when
131 # they will only need these classes.
132 UA_SA_SUBSET_CLASSES_ORIG=\
133 Advertiser.class Assert.class AttributeString.class \
134 AuthBlock.class CAttrMsg.class CDAAdvert.class \
135 CSAAdvert.class CSrvDereg.class CSrvMsg.class \
136 CSrvReg.class CSrvTypeMsg.class DATable\$$DARecord.class \
137 SLPHeaderV2.class SrvLocHeader.class SrvLocMsgImpl.class \
138 DATable.class Defaults.class \
139 Locator.class Opaque.class PermSARegTable.class \
140 SARequester.class SLPConfig.class Syslog.class \
141 ServiceURL.class SrvLocMsg.class Transact.class \
142 ServerAttribute.class ServiceLocationAttribute.class \
143 ServiceLocationEnumeration.class ServiceLocationEnumerator.class \
144 ServiceLocationException.class ServiceType.class \
145 UARequester.class ServiceLocationManager.class \
146 SunDATable.class TemplateRegistry.class SLPTemplateRegistry.class \
147 ServiceLocationAttributeVerifier.class AttributeVerifier.class \
148 ServiceLocationAttributeDescriptor.class AttributeDescriptor.class \
149 URLAttributeVerifier.class StderrLog.class \
150 StderrLog.class SLPConfig\$$SLPProperties.class \
151 SLPHeaderV2\$$OptionParser.class SLPHeaderV2\$$SLPOption.class \
152 SLPTokenizer.class
153
154 ALL_SLP_CLASSES=${SLP_CLASSES:%=$(CLASSES)/$(PKGPATH)/%}
155 UA_SA_SUBSET_CLASSES=${UA_SA_SUBSET_CLASSES_ORIG:%=$(PKGPATH)/%}