xref: /illumos-gate/usr/src/lib/libslp/javalib/Makefile (revision 241c90a0)
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, Version 1.0 only
6# (the "License").  You may not use this file except in compliance
7# with the License.
8#
9# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10# or http://www.opensolaris.org/os/licensing.
11# See the License for the specific language governing permissions
12# and limitations under the License.
13#
14# When distributing Covered Code, include this CDDL HEADER in each
15# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16# If applicable, add the following below this CDDL HEADER, with the
17# fields enclosed by brackets "[]" replaced with your own identifying
18# information: Portions Copyright [yyyy] [name of copyright owner]
19#
20# CDDL HEADER END
21#
22#
23# Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
24# Use is subject to license terms.
25#
26# Makefile for building SLP API and slpd.
27
28include $(SRC)/Makefile.master
29include Makefile.conf
30
31#Compile and create basic library.
32
33# The most efficient parallelization factor is 2. Any more than this
34# slows the build down. A factor of 1 is more efficient than > 2, so
35# use the PARALELL directive only if you can restrict the factor to 2.
36.NO_PARALLEL:
37
38all:            $(CLASSES) $(ALL_SLP_CLASSES)
39
40clean:
41		-$(RM) $(CLASSES)/$(PKGPATH)/*.class $(CLASSES)/$(PKGPATH)/*.properties
42		-$(RM) $(CLASSES)/manifest*
43		-$(RM) -r $(DOC)/*
44		-$(RM) manifest_slpd.template manifest_slp.template
45
46clobber:	clean
47		-$(RM) $(CLASSES)/*.jar
48		-$(RM) -r $(CLASSES)/META_INF
49
50# Make the class dir, if it doesn't exist
51$(CLASSES):
52		-@mkdir -p $@
53
54#Make docs for the API only.
55docs:
56		-@mkdir -p $(DOC)
57		cd $(SLPJAVASRC); $(JAVADOC) -public -author -version -classpath $(SLPCLASSPATH) -d $(DOC) $(PKGNAME)
58
59$(CLASSES)/$(PKGPATH):
60		$(INS.dir)
61
62message_files:	$(CLASSES)/$(PKGPATH) $(CLASSES)/$(PKGPATH)/$(CLIENT_MSGS) $(CLASSES)/$(PKGPATH)/$(SERVER_MSGS)
63
64$(CLASSES)/$(PKGPATH)/$(CLIENT_MSGS): $(PKGPATH)/$(CLIENT_MSGS)
65	cp -f $? $@
66
67$(CLASSES)/$(PKGPATH)/$(SERVER_MSGS): $(PKGPATH)/$(SERVER_MSGS)
68	cp -f $? $@
69
70_msg:		$(MSGDIRS) $(MSGFILES)
71
72$(MSGDIRS):
73		$(INS.dir)
74
75$(MSGDIR)/%:	$(PKGPATH)/%
76		$(INS.file)
77
78$(CLASSES)/$(SLPDJAR): $(ALL_SLP_CLASSES) $(SLPDMANI)
79		cd $(CLASSES); $(JAR) cmf manifest.slpd $@ $(PKGPATH)
80
81$(CLASSES)/$(SLPJAR): $(ALL_SLP_CLASSES) $(SLPMANI)
82		cd $(CLASSES); $(JAR) cmf manifest.slp $@ $(UA_SA_SUBSET_CLASSES) $(PKGPATH)/$(CLIENT_MSGS)
83
84$(JARDESTDIR):
85		$(INS.dir)
86
87manifests:
88	$(MAKE) -f Makefile.manifest CLASSES=$(CLASSES) PKGPATH=$(PKGPATH)
89
90install:	all message_files manifests $(JARDESTDIR) $(INSJARS)
91
92# empty targets for top-level building compatability
93install_h:
94
95# jstyle check -- more for developer's convenience since the checks are
96# not automated in the build.
97check:
98	$(JSTYLE) -p $(PKGPATH)/*.java
99