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

if BUILD_JAVA

7 8 9
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

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
10 11

# Include some JAVA stuff
12
PROCESSOR_FAMILY = `uname -m | sed -e 's/^i.86/i386/' | sed -e 's/^x86_64/amd64/'`
13

14 15 16 17
if HAVE_WIN32
JINCLUDES = -I${JAVA_HOME}/include -I${JAVA_HOME}/include/win32
LIBJINCLUDES = -L${JAVA_HOME}/lib -ljawt
JCH = javah
18
JAVACXXFLAGS = `top_builddir=../.. ../../vlc-config --cflags pic` -I../../ -I ../../include $(JINCLUDES)
19 20
JAVALDFLAGS = -mno-cygwin -L../../src -lvlc `top_builddir=../.. ../../vlc-config --libs builtin vlc pic` -Wl,--kill-at
else
21 22
JINCLUDES = -I$(JAVA_HOME)/include -I$(JAVA_HOME)/include/linux
LIBJINCLUDES = -L$(JAVA_HOME)/jre/lib/$(PROCESSOR_FAMILY) -ljawt
23
JCH = gcjh -jni
24
JAVACXXFLAGS = `top_builddir=../.. ../../vlc-config --cflags pic` -I../../ -I ../../include $(JINCLUDES)
Filippo Carone's avatar
Filippo Carone committed
25
JAVALDFLAGS = -L../../src -lvlc `top_builddir=../.. ../../vlc-config --libs builtin vlc pic`
26
endif
27

28 29
export JINCLUDES

30
# Build targets
Filippo Carone's avatar
Filippo Carone committed
31
all: libjvlc.so VlcClient VLCExample
32

33
if HAVE_WIN32
34 35 36
libjvlc.so: $(OBJECTS)
	$(MAKE) -C src
	$(CXX) -shared $(COBJECTS) $(LIBJINCLUDES) $(LDFLAGS) $(JAVALDFLAGS) -o jvlc.dll
37
else
38 39 40
libjvlc.so: $(OBJECTS) 	
	$(MAKE) -C src
	$(CXX) -shared $(COBJECTS) $(LIBJINCLUDES) $(LDFLAGS) $(JAVALDFLAGS) -o libjvlc.so
41
endif
42 43

VlcClient: $(OBJECTS)
44
	$(JAVAC) VlcClient.java
45

Filippo Carone's avatar
Filippo Carone committed
46
VLCExample: $(OBJECTS)
47
	$(JAVAC) VLCExample.java
Filippo Carone's avatar
Filippo Carone committed
48

49
.java.class:
50
	$(JAVAC) $?
51
	$(JCH) org/videolan/jvlc/$$(basename $*) -o includes/$$(basename $*).h
52

53
clean-local:
54
	rm -f *.class *~ org/videolan/jvlc/*.class org_videolan*.h *.so *.o *.dll
55

56
endif