Makefile.am 3 KB
Newer Older
1 2 3 4
#######################################################################
# VLC Java Bindings
#######################################################################

5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34
SUBDIRS= src
DIST_SUBDIRS = $(SUBDIRS)

EXTRA_DIST= \
	    FAQ \
	    TODO \
	    README \
	    THANKS \
	    javadoc.xml \
	    VlcClient.java \
	    VLCExample.java


EXTRA_DIST+= \
	org/videolan/jvlc/AudioIntf.java \
	org/videolan/jvlc/Audio.java \
	org/videolan/jvlc/GenericVideoWidget.java \
	org/videolan/jvlc/InputIntf.java \
	org/videolan/jvlc/Input.java \
	org/videolan/jvlc/JLibVLC.java \
	org/videolan/jvlc/JVLCCanvas.java \
	org/videolan/jvlc/JVLC.java \
	org/videolan/jvlc/JVLCPanel.java \
	org/videolan/jvlc/PlaylistIntf.java \
	org/videolan/jvlc/Playlist.java \
	org/videolan/jvlc/VideoIntf.java \
	org/videolan/jvlc/Video.java \
	org/videolan/jvlc/VLCException.java \
	org/videolan/jvlc/VLMIntf.java \
	org/videolan/jvlc/VLM.java 
35

36 37
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

38

39
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
40

41
if BUILD_JAVA
42
# Include some JAVA stuff
43
PROCESSOR_FAMILY = `uname -m | sed -e 's/^i.86/i386/' | sed -e 's/^x86_64/amd64/'`
44

45 46 47 48
if HAVE_WIN32
JINCLUDES = -I${JAVA_HOME}/include -I${JAVA_HOME}/include/win32
LIBJINCLUDES = -L${JAVA_HOME}/lib -ljawt
JCH = javah
49
JAVACXXFLAGS = `top_builddir=../.. ../../vlc-config --cflags pic` -I../../ -I ../../include $(JINCLUDES)
50 51
JAVALDFLAGS = -mno-cygwin -L../../src -lvlc `top_builddir=../.. ../../vlc-config --libs builtin vlc pic` -Wl,--kill-at
else
52 53
JINCLUDES = -I$(JAVA_HOME)/include -I$(JAVA_HOME)/include/linux
LIBJINCLUDES = -L$(JAVA_HOME)/jre/lib/$(PROCESSOR_FAMILY) -ljawt
54
JCH = gcjh -jni
55
JAVACXXFLAGS = `top_builddir=../.. ../../vlc-config --cflags pic` -I../../ -I ../../include $(JINCLUDES)
Filippo Carone's avatar
Filippo Carone committed
56
JAVALDFLAGS = -L../../src -lvlc `top_builddir=../.. ../../vlc-config --libs builtin vlc pic`
57
endif
58

59 60
export JINCLUDES

61
# Build targets
Filippo Carone's avatar
Filippo Carone committed
62
all: libjvlc.so VlcClient VLCExample
63

64
if HAVE_WIN32
65 66 67
libjvlc.so: $(OBJECTS)
	$(MAKE) -C src
	$(CXX) -shared $(COBJECTS) $(LIBJINCLUDES) $(LDFLAGS) $(JAVALDFLAGS) -o jvlc.dll
68
else
69 70 71
libjvlc.so: $(OBJECTS) 	
	$(MAKE) -C src
	$(CXX) -shared $(COBJECTS) $(LIBJINCLUDES) $(LDFLAGS) $(JAVALDFLAGS) -o libjvlc.so
72
endif
73 74

VlcClient: $(OBJECTS)
75
	$(JAVAC) VlcClient.java
76

Filippo Carone's avatar
Filippo Carone committed
77
VLCExample: $(OBJECTS)
78
	$(JAVAC) VLCExample.java
Filippo Carone's avatar
Filippo Carone committed
79

80
.java.class:
81
	$(JAVAC) $?
82
	$(JCH) org/videolan/jvlc/$$(basename $*) -o includes/$$(basename $*).h
83

84
clean-local:
85
	rm -f *.class *~ org/videolan/jvlc/*.class org_videolan*.h *.so *.o *.dll
86

87
endif