author | David Powell <david.e.powell@oracle.com> |
Thu, 11 Aug 2011 15:41:42 -0700 | |
changeset 764 | ebb25c1dac73 |
parent 754 | d0a995fd0c9c |
child 846 | 0a2af4721353 |
permissions | -rw-r--r-- |
0 | 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 |
# |
|
711
1ffc0db7d2e5
18444 lint libraries and lintlibraries
David Powell <david.e.powell@oracle.com>
parents:
589
diff
changeset
|
23 |
# Copyright (c) 2007, 2011, Oracle and/or its affiliates. All rights reserved. |
0 | 24 |
# |
25 |
||
711
1ffc0db7d2e5
18444 lint libraries and lintlibraries
David Powell <david.e.powell@oracle.com>
parents:
589
diff
changeset
|
26 |
LIBRARY = libUnixDomainSocket_jni.a |
1ffc0db7d2e5
18444 lint libraries and lintlibraries
David Powell <david.e.powell@oracle.com>
parents:
589
diff
changeset
|
27 |
VERS = .1 |
1ffc0db7d2e5
18444 lint libraries and lintlibraries
David Powell <david.e.powell@oracle.com>
parents:
589
diff
changeset
|
28 |
|
1ffc0db7d2e5
18444 lint libraries and lintlibraries
David Powell <david.e.powell@oracle.com>
parents:
589
diff
changeset
|
29 |
# Jars that must be built prior (added automatically to CLASSPATH) |
1ffc0db7d2e5
18444 lint libraries and lintlibraries
David Powell <david.e.powell@oracle.com>
parents:
589
diff
changeset
|
30 |
DEPENDENCY_JARS = \ |
754
d0a995fd0c9c
15126 debug setting not inherited by slave daemons
David Powell <david.e.powell@oracle.com>
parents:
717
diff
changeset
|
31 |
$(SRC)/java/afunix/afunix.jar |
711
1ffc0db7d2e5
18444 lint libraries and lintlibraries
David Powell <david.e.powell@oracle.com>
parents:
589
diff
changeset
|
32 |
|
1ffc0db7d2e5
18444 lint libraries and lintlibraries
David Powell <david.e.powell@oracle.com>
parents:
589
diff
changeset
|
33 |
NATIVES = \ |
1ffc0db7d2e5
18444 lint libraries and lintlibraries
David Powell <david.e.powell@oracle.com>
parents:
589
diff
changeset
|
34 |
UnixSocket \ |
1ffc0db7d2e5
18444 lint libraries and lintlibraries
David Powell <david.e.powell@oracle.com>
parents:
589
diff
changeset
|
35 |
UnixSocketServer \ |
1ffc0db7d2e5
18444 lint libraries and lintlibraries
David Powell <david.e.powell@oracle.com>
parents:
589
diff
changeset
|
36 |
UnixDomainSocket |
1ffc0db7d2e5
18444 lint libraries and lintlibraries
David Powell <david.e.powell@oracle.com>
parents:
589
diff
changeset
|
37 |
JHEADERS = $(NATIVES:%=%.h) |
1ffc0db7d2e5
18444 lint libraries and lintlibraries
David Powell <david.e.powell@oracle.com>
parents:
589
diff
changeset
|
38 |
|
1ffc0db7d2e5
18444 lint libraries and lintlibraries
David Powell <david.e.powell@oracle.com>
parents:
589
diff
changeset
|
39 |
SRCDIR = .. |
0 | 40 |
OBJS = $(NATIVES:%=%.o) |
711
1ffc0db7d2e5
18444 lint libraries and lintlibraries
David Powell <david.e.powell@oracle.com>
parents:
589
diff
changeset
|
41 |
SRCS = $(OBJS:%.o=$(SRCDIR)/%.c) |
0 | 42 |
|
711
1ffc0db7d2e5
18444 lint libraries and lintlibraries
David Powell <david.e.powell@oracle.com>
parents:
589
diff
changeset
|
43 |
CPPFLAGS += -D_REENTRANT -I. -I$(ROOT)/usr/include -I/usr/java/include \ |
1ffc0db7d2e5
18444 lint libraries and lintlibraries
David Powell <david.e.powell@oracle.com>
parents:
589
diff
changeset
|
44 |
-I/usr/java/include/solaris |
717
7f7fc966a88f
18481 More rigorous module build
David Powell <david.e.powell@oracle.com>
parents:
711
diff
changeset
|
45 |
LDLIBS += -L$(ROOTLIBDIR) -ljniutil -lsocket -lbsm |
711
1ffc0db7d2e5
18444 lint libraries and lintlibraries
David Powell <david.e.powell@oracle.com>
parents:
589
diff
changeset
|
46 |
LIBS = $(DYNLIB) |
0 | 47 |
|
711
1ffc0db7d2e5
18444 lint libraries and lintlibraries
David Powell <david.e.powell@oracle.com>
parents:
589
diff
changeset
|
48 |
CLEAN_FILES += $(JHEADERS) $(OBJS) |
1ffc0db7d2e5
18444 lint libraries and lintlibraries
David Powell <david.e.powell@oracle.com>
parents:
589
diff
changeset
|
49 |
CLOBBER_FILES += $(DYNLIB) |
1ffc0db7d2e5
18444 lint libraries and lintlibraries
David Powell <david.e.powell@oracle.com>
parents:
589
diff
changeset
|
50 |
|
1ffc0db7d2e5
18444 lint libraries and lintlibraries
David Powell <david.e.powell@oracle.com>
parents:
589
diff
changeset
|
51 |
all: $(CLASSES) $(DYNLIB) |
0 | 52 |
|
717
7f7fc966a88f
18481 More rigorous module build
David Powell <david.e.powell@oracle.com>
parents:
711
diff
changeset
|
53 |
$(LNFILES) $(OBJS): $(JHEADERS) |
711
1ffc0db7d2e5
18444 lint libraries and lintlibraries
David Powell <david.e.powell@oracle.com>
parents:
589
diff
changeset
|
54 |
|
1ffc0db7d2e5
18444 lint libraries and lintlibraries
David Powell <david.e.powell@oracle.com>
parents:
589
diff
changeset
|
55 |
lint: lintcheck |
1ffc0db7d2e5
18444 lint libraries and lintlibraries
David Powell <david.e.powell@oracle.com>
parents:
589
diff
changeset
|
56 |
|
1ffc0db7d2e5
18444 lint libraries and lintlibraries
David Powell <david.e.powell@oracle.com>
parents:
589
diff
changeset
|
57 |
install: $(ROOTLIBS) |
0 | 58 |
|
711
1ffc0db7d2e5
18444 lint libraries and lintlibraries
David Powell <david.e.powell@oracle.com>
parents:
589
diff
changeset
|
59 |
$(JHEADERS): $(DEPENDENCY_JARS) |
1ffc0db7d2e5
18444 lint libraries and lintlibraries
David Powell <david.e.powell@oracle.com>
parents:
589
diff
changeset
|
60 |
@for f in $(DEPENDENCY_JARS); \ |
1ffc0db7d2e5
18444 lint libraries and lintlibraries
David Powell <david.e.powell@oracle.com>
parents:
589
diff
changeset
|
61 |
do \ |
1ffc0db7d2e5
18444 lint libraries and lintlibraries
David Powell <david.e.powell@oracle.com>
parents:
589
diff
changeset
|
62 |
jar tf "$$f"; \ |
1ffc0db7d2e5
18444 lint libraries and lintlibraries
David Powell <david.e.powell@oracle.com>
parents:
589
diff
changeset
|
63 |
done | $(GREP) '/$(@:%.h=%).class' | \ |
1ffc0db7d2e5
18444 lint libraries and lintlibraries
David Powell <david.e.powell@oracle.com>
parents:
589
diff
changeset
|
64 |
$(SED) 's/\.class$$//; s#/#.#g' | \ |
764
ebb25c1dac73
18812 Support building with alternate java implementations
David Powell <david.e.powell@oracle.com>
parents:
754
diff
changeset
|
65 |
$(XARGS) echo $(JAVAH) -classpath $(CLASS_PATH) -o $@ | \ |
711
1ffc0db7d2e5
18444 lint libraries and lintlibraries
David Powell <david.e.powell@oracle.com>
parents:
589
diff
changeset
|
66 |
while read line; \ |
1ffc0db7d2e5
18444 lint libraries and lintlibraries
David Powell <david.e.powell@oracle.com>
parents:
589
diff
changeset
|
67 |
do \ |
1ffc0db7d2e5
18444 lint libraries and lintlibraries
David Powell <david.e.powell@oracle.com>
parents:
589
diff
changeset
|
68 |
echo "$$line"; \ |
1ffc0db7d2e5
18444 lint libraries and lintlibraries
David Powell <david.e.powell@oracle.com>
parents:
589
diff
changeset
|
69 |
$$line; \ |
1ffc0db7d2e5
18444 lint libraries and lintlibraries
David Powell <david.e.powell@oracle.com>
parents:
589
diff
changeset
|
70 |
done |