Commit 94a01b81 authored by Filippo Carone's avatar Filippo Carone

Make java bindings compile with libtool

parent 8d8e8f1c
......@@ -2,9 +2,7 @@
# VLC Java Bindings
#######################################################################
#SUBDIRS= src
DIST_SUBDIRS = src
SUBDIRS= . src
EXTRA_DIST= \
FAQ \
......@@ -15,7 +13,6 @@ EXTRA_DIST= \
VlcClient.java \
VLCExample.java
EXTRA_DIST+= \
org/videolan/jvlc/AudioIntf.java \
org/videolan/jvlc/Audio.java \
......@@ -38,10 +35,6 @@ if BUILD_JAVA
OBJECTS = org/videolan/jvlc/VLCException.class org/videolan/jvlc/Playlist.class org/videolan/jvlc/AudioIntf.class org/videolan/jvlc/Audio.class org/videolan/jvlc/InputIntf.class org/videolan/jvlc/Input.class org/videolan/jvlc/PlaylistIntf.class org/videolan/jvlc/VideoIntf.class org/videolan/jvlc/Video.class org/videolan/jvlc/JLibVLC.class org/videolan/jvlc/JVLC.class org/videolan/jvlc/JVLCCanvas.class org/videolan/jvlc/JVLCPanel.class org/videolan/jvlc/VLMIntf.class org/videolan/jvlc/VLM.class org/videolan/jvlc/GenericVideoWidget.class
OBJECTS_HEADER = src/../includes/VLCException.h src/../includes/Playlist.h src/../includes/AudioIntf.h src/../includes/Audio.h src/../includes/InputIntf.h src/../includes/Input.h src/../includes/PlaylistIntf.h src/../includes/VideoIntf.h src/../includes/Video.h src/../includes/JLibVLC.h src/../includes/JVLC.h src/../includes/JVLCCanvas.h src/../includes/JVLCPanel.h src/../includes/VLMIntf.h src/../includes/VLM.h src/../includes/GenericVideoWidget.h
COBJECTS = src/utils.o src/video-jni.o src/audio-jni.o src/input-jni.o src/playlist-jni.o src/vlm-jni.o src/core-jni.o src/graphics-jni.o
PROCESSOR_FAMILY = `uname -m | sed -e 's/^i.86/i386/' | sed -e 's/^x86_64/amd64/'`
if HAVE_WIN32
......@@ -54,63 +47,10 @@ LIBJINCLUDES = -L$(JAVA_HOME)/jre/lib/$(PROCESSOR_FAMILY) -ljawt
JCH = gcjh -jni
endif
if USE_LIBTOOL
jvlcdir = $(libdir)
jvlc_LTLIBRARIES = libjvlc.la
libjvlc_la_SOURCES = \
src/audio-jni.cc \
src/core-jni.cc \
src/graphics-jni.cc \
src/input-jni.cc \
src/playlist-jni.cc \
src/utils.cc \
src/utils.h \
src/video-jni.cc \
src/vlm-jni.cc
libjvlc_la_LIBADD = ../../src/libvlc-control.la $(LIBJINCLUDES)
if HAVE_WIN32
libjvlc_la_JAVACXXFLAGS = `top_builddir=../.. ../../vlc-config --cflags pic` -I../../ -I ../../include $(JINCLUDES)
libjvlc_la_JAVALDFLAGS = -mno-cygwin -L../../src -L../../src/.libs -lvlc-control `top_builddir=../.. ../../vlc-config --libs builtin vlc pic external` -Wl,--kill-at
else
libjvlc_la_JAVACXXFLAGS = `top_builddir=../.. ../../vlc-config --cflags pic` -I../../ -I ../../include $(JINCLUDES)
libjvlc_la_JAVALDFLAGS = -L../../src -L../../src/.libs -lvlc-control `top_builddir=../.. ../../vlc-config --libs builtin vlc pic external`
endif
else
if HAVE_WIN32
JAVACXXFLAGS = `top_builddir=../.. ../../vlc-config --cflags pic` -I../../ -I ../../include $(JINCLUDES)
JAVALDFLAGS = -mno-cygwin -L../../src -L../../src/.libs -lvlc-control `top_builddir=../.. ../../vlc-config --libs builtin vlc pic external` -Wl,--kill-at
else
JAVACXXFLAGS = `top_builddir=../.. ../../vlc-config --cflags pic` -I../../ -I ../../include $(JINCLUDES)
JAVALDFLAGS = -L../../src -L../../src/.libs -lvlc-control `top_builddir=../.. ../../vlc-config --libs builtin vlc pic external`
endif
endif
export JINCLUDES
export LIBJINCLUDES
# Build targets
all: VlcClient VLCExample
if HAVE_WIN32
libjvlc.so: $(OBJECTS)
$(MAKE) -C src
$(CXX) -shared $(COBJECTS) $(LIBJINCLUDES) $(LDFLAGS) $(JAVALDFLAGS) -o jvlc.dll
else
libjvlc.so: $(OBJECTS)
$(MAKE) -C src
$(CXX) -shared $(COBJECTS) $(LIBJINCLUDES) $(LDFLAGS) $(JAVALDFLAGS) -o libjvlc.so
endif
VlcClient: $(OBJECTS)
$(JAVAC) VlcClient.java
VLCExample: $(OBJECTS)
$(JAVAC) VLCExample.java
if HAVE_WIN32
%.class: %.java
......@@ -122,7 +62,13 @@ else
$(JCH) $(@D)/$(*F) -o includes/$(*F).h
endif
$(OBJECTS_HEADER): $(OBJECTS)
VlcClient: $(OBJECTS)
$(JAVAC) VlcClient.java
VLCExample: $(OBJECTS)
$(JAVAC) VLCExample.java
all-am: VlcClient VLCExample
clean-local:
rm -f *.class *~ org/videolan/jvlc/*.class org_videolan*.h includes/*.h src/*.o *.so *.o *.dll
......
EXTRA_DIST= \
audio-jni.cc \
core-jni.cc \
graphics-jni.cc \
input-jni.cc \
playlist-jni.cc \
utils.cc \
utils.h \
video-jni.cc \
vlm-jni.cc
if BUILD_JAVA
if USE_LIBTOOL
jvlcdir = $(libdir)
jvlc_LTLIBRARIES = libjvlc.la
libjvlc_la_SOURCES = \
audio-jni.cc \
core-jni.cc \
graphics-jni.cc \
input-jni.cc \
playlist-jni.cc \
utils.cc \
utils.h \
video-jni.cc \
vlm-jni.cc
libjvlc_la_LIBADD = ../../../src/libvlc-control.la $(LIBJINCLUDES)
else
COBJECTS = utils.o video-jni.o audio-jni.o input-jni.o playlist-jni.o vlm-jni.o core-jni.o graphics-jni.o
JAVACXXFLAGS = -I. -Isrc -I../../ -I ../../include -I../../../include $(JINCLUDES) `top_builddir=../../.. ../../../vlc-config --cflags pic` -c
.cc.o:
$(CXX) $? $(CXXFLAGS) $(JAVACXXFLAGS) -o $@
all-am: $(COBJECTS)
endif
.PHONY: clean-local
clean-local:
rm -f *.o *~
endif
......@@ -5564,6 +5564,7 @@ AC_CONFIG_FILES([
activex/axvlc.inf
bindings/Makefile
bindings/java/Makefile
bindings/java/src/Makefile
bindings/python/Makefile
doc/Makefile
intl/Makefile
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment