summaryrefslogtreecommitdiff
path: root/jpl/Sample/Makefile.PL
diff options
context:
space:
mode:
Diffstat (limited to 'jpl/Sample/Makefile.PL')
-rw-r--r--jpl/Sample/Makefile.PL12
1 files changed, 9 insertions, 3 deletions
diff --git a/jpl/Sample/Makefile.PL b/jpl/Sample/Makefile.PL
index 944c7e180d..cd6b09360f 100644
--- a/jpl/Sample/Makefile.PL
+++ b/jpl/Sample/Makefile.PL
@@ -14,11 +14,16 @@ $WHAT =~ s#.*/##;
if ($^O eq 'linux') {
$flags = "-Dbool=char"; # avoid builtin bool altogether
$libs = "-lc -lm -ldl";
-}
-else {
+} else {
$flags = "";
$libs = "-lc -lm -ldl";
}
+
+# Needed for JNI
+if ($^O eq 'solaris') {
+ $libs .= " -lthread";
+}
+
chop($cwd = `pwd`);
($jpldir = $cwd) =~ s#/[^/]*$##;
@@ -65,7 +70,8 @@ lib$(WHAT)_g.so: $(WHAT).c $(JPL_HOME)/lib/$(ARCHNAME)/libPerlInterpreter_g.so
$(LIBS) \
-o lib$(WHAT)_g.so
-test:
+test: all
+ java $(WHAT)
install: all
cp *.class $(JPL_HOME)/lib