xref: /titanic_41/usr/src/lib/libslp/javalib/Makefile (revision 7c2fbfb345896881c631598ee3852ce9ce33fb07)
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#ident	"%Z%%M%	%I%	%E% SMI"
24#
25# Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
26# Use is subject to license terms.
27#
28# Makefile for building SLP API and slpd.
29
30include $(SRC)/Makefile.master
31include Makefile.conf
32
33#Compile and create basic library.
34
35# The most efficient parallelization factor is 2. Any more than this
36# slows the build down. A factor of 1 is more efficient than > 2, so
37# use the PARALELL directive only if you can restrict the factor to 2.
38.NO_PARALLEL:
39
40all:            $(CLASSES) $(ALL_SLP_CLASSES)
41
42clean:
43		-$(RM) $(CLASSES)/$(PKGPATH)/*.class $(CLASSES)/$(PKGPATH)/*.properties
44		-$(RM) $(CLASSES)/manifest*
45		-$(RM) -r $(DOC)/*
46		-$(RM) manifest_slpd.template manifest_slp.template
47
48clobber:	clean
49		-$(RM) $(CLASSES)/*.jar
50		-$(RM) -r $(CLASSES)/META_INF
51
52# Make the class dir, if it doesn't exist
53$(CLASSES):
54		-@mkdir -p $@
55
56#Make docs for the API only.
57docs:
58		-@mkdir -p $(DOC)
59		cd $(SLPJAVASRC); $(JAVADOC) -public -author -version -classpath $(SLPCLASSPATH) -d $(DOC) $(PKGNAME)
60
61$(CLASSES)/$(PKGPATH):
62		$(INS.dir)
63
64message_files:	$(CLASSES)/$(PKGPATH) $(CLASSES)/$(PKGPATH)/$(CLIENT_MSGS) $(CLASSES)/$(PKGPATH)/$(SERVER_MSGS)
65
66$(CLASSES)/$(PKGPATH)/$(CLIENT_MSGS): $(PKGPATH)/$(CLIENT_MSGS)
67	cp -f $? $@
68
69$(CLASSES)/$(PKGPATH)/$(SERVER_MSGS): $(PKGPATH)/$(SERVER_MSGS)
70	cp -f $? $@
71
72_msg:		$(MSGDIRS) $(MSGFILES)
73
74$(MSGDIRS):
75		$(INS.dir)
76
77$(MSGDIR)/%:	$(PKGPATH)/%
78		$(INS.file)
79
80$(CLASSES)/$(SLPDJAR): $(ALL_SLP_CLASSES) $(SLPDMANI)
81		cd $(CLASSES); $(JAR) cmf manifest.slpd $@ $(PKGPATH)
82
83$(CLASSES)/$(SLPJAR): $(ALL_SLP_CLASSES) $(SLPMANI)
84		cd $(CLASSES); $(JAR) cmf manifest.slp $@ $(UA_SA_SUBSET_CLASSES) $(PKGPATH)/$(CLIENT_MSGS)
85
86$(JARDESTDIR):
87		$(INS.dir)
88
89manifests:
90	$(MAKE) -f Makefile.manifest CLASSES=$(CLASSES) PKGPATH=$(PKGPATH)
91
92install:	all message_files manifests $(JARDESTDIR) $(INSJARS)
93
94# empty targets for top-level building compatability
95
96install_h lint:
97
98# jstyle check -- more for developer's convenience since the checks are
99# not automated in the build.
100
101check:
102	$(JSTYLE) -p $(PKGPATH)/*.java
103