Tony Anecito suggestions to make java bindings compile in cygwin integrated - needs...
[vlc/bindings/jvlc.git] / src / Makefile.am
1 libjvlc_la_SOURCES = \
2         audio-jni.cc \
3         core-jni.cc \
4         graphics-jni.cc \
5         input-jni.cc \
6         playlist-jni.cc \
7         utils.cc \
8         utils.h \
9         video-jni.cc \
10         vlm-jni.cc \
11         callback-jni.cc
12
13 libjvlc_la_CPPFLAGS = `$(VLC_CONFIG) --cflags pic` $(JINCLUDES)
14 libjvlc_la_LIBADD = ../../../src/libvlc-control.la $(LIBJINCLUDES)
15
16 if BUILD_JAVA
17
18 lib_LTLIBRARIES = libjvlc.la
19
20 if HAVE_WIN32
21 DATA_noinst_libjvlc = jvlc$(LIBEXT) libjvlc$(LIBEXT).a
22 LIBRARIES_libvlc = $(top_builddir)/src/.libs/libvlc.dll.a $(abs_top_srcdir)/src/.libs/libvlc-control.dll.a
23 LDFLAGS_jvlc = `$(VLC_CONFIG) --libs libvlc`
24 libjvlc_DATA = libjvlc.def libjvlc.dll.a jvlc$(LIBEXT) 
25
26 libjvlcdir=$(srcdir)
27
28 libjvlc.dll.a libjvlc.def:
29         $(DLLTOOL) -z libjvlc.def -l libjvlc.dll.a -D jvlc.dll $< $(libjvlc_a_OBJECTS)
30
31 jvlc$(LIBEXT): $(libjvlc_a_OBJECTS) \
32                       $(libjvlc_a_DEPENDENCIES)
33                   $(CXXLINK) $(libjvlc_a_OBJECTS) -Wl,--kill-at \
34                         $(srcdir)/libjvlc.def \
35                         $(LIBRARIES_libvlc) -shared $(LIBRARIES_libvlc) $(LIBJINCLUDES) \
36                                 $(LDFLAGS_jvlc) $(LTLIBINTL)
37 # Cygwin work-around, copied by other makefiles
38                         @if test -f "$@.exe"; then mv -f "$@.exe" "$@"; fi
39
40
41 all: libjvlc.dll.a
42
43 endif
44
45 .PHONY: clean-local
46
47 clean-local:
48         rm -f *.o *~ *.def *.dll
49
50 endif