Fix for various nativez changes.
Split library table into per-platform files.
Linux can optionally use the major version number in the .so library name.
- this is enabled by default.
Update java.make.
JAVAFX_HOME ?= /usr/local/javafx-sdk-11.0.2
FFMPEG_HOME ?= /opt/ffmpeg/4.0
-# See also JAVACFLAGS
+# See also JAVACFLAGS --module-path
NATIVEZ_HOME=../nativez/bin/notzed.nativez/$(TARGET)
JAVACFLAGS += --module-path $(JAVAFX_HOME)/lib:../nativez/bin/notzed.nativez
JMOD ?= jmod
# Linux options
+# USE_SO_VERSION adds the major version to the library open name for ffmpeg libs on linux.
linux-amd64_CPPFLAGS = \
- -I$(JAVA_HOME)/include -I$(JAVA_HOME)/include/linux
-linux-amd64_CFLAGS = -fPIC -Wall -Os
+ -I$(JAVA_HOME)/include -I$(JAVA_HOME)/include/linux \
+ -DUSE_SO_VERSION=1
+linux-amd64_CFLAGS = -fPIC -Os -Wall
linux-amd64_CC = cc
linux-amd64_LD = ld
linux-amd64_SO = .so
linux-amd64_LIB = lib
-linux-amd64_JMOD_LIBS = --libs
# Windows options
-windows-amd64_CPPFLAGS= \
+windows-amd64_CPPFLAGS = \
-I$(JAVA_HOME)/include -I$(JAVA_HOME)/include/linux \
-DHAVE_ALIGNED_MALLOC \
-DWIN32
+windows-amd64_CFLAGS = -Os -Wall
windows-amd64_CC = x86_64-w64-mingw32-gcc
windows-amd64_LD = x86_64-w64-mingw32-ld
windows-amd64_LDFLAGS = -Wl,--subsystem,windows
windows-amd64_SO = .dll
windows-amd64_LIB =
-windows-amd64_JMOD_LIBS = --cmds
# <module>_jnidir Location for jni generated files (per target).
# <module>_objdir Location for c objects (per target).
# <module>_incdir Location for output includes, .jmod staging.
-# <module>_libdir Location for output libraries, .jmod staging.
+# <module>_libdir Location for output libraries, .jmod staging. May point to _bindir.
+# <module>_bindir Location for output commands, .jmod staging.
# Define libraries
# ----------------
# <library>_SOURCES .c, .cc, .C - source files for library. Paths are relative to src/<module>/jni.
# <library>_HEADERS header files for jmod
+# <library>_COMMANDS commands/bin/scripts for jmod
# <library>_LDFLAGS link flags
# <library>_LIBADD extra objects to add to link line
$(1)_jnidir:=bin/$(1)/$(TARGET)/jni
$(1)_objdir:=bin/$(1)/$(TARGET)/obj
$(1)_incdir:=bin/$(1)/$(TARGET)/include
-$(1)_libdir:=bin/$(1)/$(TARGET)/lib
+$(1)_libdir:=$$(if $$(filter windows-%,$(TARGET)),bin/$(1)/$(TARGET)/bin,bin/$(1)/$(TARGET)/lib)
+$(1)_bindir:=bin/$(1)/$(TARGET)/bin
ifndef $(1)_JAVA
$(1)_JAVA := $$(shell find src/$(1)/classes -type f -name '*.java')
endif
--class-path bin/modules/$(1) \
$$(if $$(wildcard bin/$(1)/$(TARGET)/include),--header-files bin/$(1)/$(TARGET)/include) \
$$(if $$(wildcard src/$(1)/legal),--legal-notices src/$(1)/legal) \
- $$($(TARGET)_JMOD_LIBS) bin/$(1)/$(TARGET)/lib \
+ $$(if $$(wildcard $$($(1)_bindir)),--cmds $$($(1)_bindir)) \
+ $$(if $$(wildcard $$($(1)_libdir)),--libs $$($(1)_libdir)) \
$$@
# Create an IDE source zip, paths have to match --module-source-path
$($(TARGET)_CPPFLAGS) $($(2)_CPPFLAGS) $$< -o $$@.d 2>/dev/null
@sed 's,\($$*\.o\) *:,\1 $$@ : ,g' $$@.d > $$@ ; rm $$@.d
-bin jni $(1) bin/$(1)/$(TARGET)/$(1).jmod: $($(1)_libdir)/$(LIB)$(2)$(SO) $(addprefix $($(1)_incdir)/,$($(2)_HEADERS))
+bin jni $(1) bin/$(1)/$(TARGET)/$(1).jmod: $($(1)_libdir)/$(LIB)$(2)$(SO) \
+ $(addprefix $($(1)_incdir)/,$($(2)_HEADERS)) \
+ $(addprefix $($(1)_bindir)/,$($(2)_COMMANDS))
$(if $(filter clean dist gen,$(MAKECMDGOALS)),,-include $$($(2)_OBJS:.o=.d))
endef
+++ /dev/null
-#!/usr/bin/perl
-
-$ffmpeg_home = "/opt/ffmpeg/4.0";
-
-$args = "$0 ".join " ", @ARGV;
-
-while ($#ARGV >= 0) {
- my $cmd = shift;
- if ($cmd eq "-f") {
- $ffmpeg_home = shift;
- } else {
- $in = $cmd;
- }
-}
-
-die ("No input file") if ! -f $in;
-
-$header = "";
-$librart = "";
-@functions = ();
-@headers = ();
-%proto = ();
-$last_library = "";
-$mode = "";
-
-open IN,"<$in";
-
-while (<IN>) {
- chop;
-
- if (m/^#/) {
- next;
- } elsif (m/^header (.*) (.*) \{/) {
- $library = $1;
- $header = $2;
- push @headers, $header;
-
- %proto = ();
- open PROTO, "cproto -x -I$ffmpeg_home/include $ffmpeg_home/include/$header|";
-
- while (<PROTO>) {
- chop;
- $cproto = $_;
- if (m/([a-zA-Z0-9_]*)\(/) {
- $func = $1;
- $proto{$func} = $cproto;
- }
- }
- close PROTO;
-
- if ($library ne $last_library) {
- push @functions, "#$library";
- $last_library = $library;
- }
- $mode = "proto";
- } elsif (m/^java (.*) (.*) \{/) {
- # wouldn't it be nice to get this from the .class ...
- $name = $1;
- $class = $2;
- $mode = "java";
- push @classes,"#$name:$class";
- } elsif (m/^}$/) {
- $mode = "";
- } elsif ($mode eq "proto") {
- if (m/\s*([a-zA-Z0-9_]+)/) {
- my $func= $1;
- my $cproto = $proto{$func};
-
- die ("No function $func in $header") if !defined($cproto);
-
- push @functions, $cproto;
- }
- } elsif ($mode eq "java") {
- if (m/(static)? *([\w<>]*) *, *([\[\w<>\(\)\/;]*)/) {
- push @classes,"$1,$2,$3";
- }
- }
-}
-close IN;
-
-$date = `date`;
-chop $date;
-print "/* This file was autogenerated on $date: */\n";
-print "/* $0 $args */\n";
-
-if ($#headers >= 0) {
- # Handle C prototype mappings
- foreach $h (@headers) {
- print "#include <$h>\n";
- }
-
- print "static struct functable {\n";
- foreach $func (@functions) {
- if ($func =~ m/^\#(.+)/) {
- print "\t/* lib$1 */\n";
- } else {
- $dfunc = $func;
- $dfunc =~ s/([a-zA-Z0-9_]*)(\(.*;)/(*\1)\2/;
- print "\t$dfunc\n";
- }
- }
- print "} fn;\n";
- print "static const char *fn_names =\n";
- foreach $func (@functions) {
- if ($func =~ m/^(\#.+)/) {
- print "\t\"$func\\0\"\n";
- } else {
- $func =~ m/([a-zA-Z0-9_]*)\(/;
- print "\t\"$1\\0\"\n";
- }
- }
- print "\t;\n";
-}
-
-if ($#classes >= 0) {
- # Handle java defines
- $name = "";
- $class = "";
- print "static struct {\n";
- foreach $func (@classes) {
- if ($func =~ m/^#(.+):(.+)/) {
- $name = $1;
- $class = $2;
- print "\t// $class\n";
- print "\tjclass $name"."_classid;\n";
- printf "#define $name"."_classid java.$name"."_classid\n";
- } elsif ($func =~ m/(.*),(.+),\((.*)\).*/) {
- my $method = $2;
- my $args = $3;
-
- $args =~ s/L.*?;/l/g;
- $args =~ s/\[/_/g;
- $args =~ tr/A-Z/a-z/;
-
- $method =~ s/<init>/new/;
-
- print "\tjmethodID $name"."_$method"."_$args;\n";
- print "#define $name"."_$method"."_$args java.$name"."_$method"."_$args\n";
- } elsif ($func =~ m/(.*),(.+),(.+)/) {
- my $field = $2;
- my $type = $3;
-
- print "\tjfieldID $name"."_$field;\n";
- print "#define $name"."_$field java.$name"."_$field\n";
- } else {
- die("can't parse java signature $func");
- }
- }
- print "} java;\n";
- print "static const char *java_names =\n";
- foreach $func (@classes) {
- if ($func =~ m/^#(.+):(.+)/) {
- $name = $1;
- $class = $2;
-
- print "\t\"#$class\\0\"\n";
- } elsif ($func =~ m/static,(.*),(.*\(.*\).*)/) {
- print "\t\":$1\\0$2\\0\"\n";
- } elsif ($func =~ m/,(.*),(.*\(.*\).*)/) {
- print "\t\".$1\\0$2\\0\"\n";
- } elsif ($func =~ m/static,(.*),(.*)/) {
- print "\t\";$1\\0$2\\0\"\n";
- } elsif ($func =~ m/,(.*),(.*)/) {
- print "\t\",$1\\0$2\\0\"\n";
- }
- }
- print "\t;\n";
-}
#include "au_notzed_jjmpeg_AVCodec.h"
#include "jjmpeg.h"
-
#include "jj-avcodec.h"
-#undef DLCALL
-#define DLCALL(x) (fn.x)
jint AVCodec_OnLoad(JavaVM *vmi, JNIEnv *env) {
- return jj_ResolveFunctions(env, fn_names, &fn);
+ return nativez_ResolveFunctions(env, jj_libtable, fn_names, &fn);
}
/* ********************************************************************** */
#include "jjmpeg.h"
#include "jj-avcodeccontext.h"
-#undef DLCALL
-#define DLCALL(x) (fn.x)
-
jint AVCodecContext_OnLoad(JavaVM *vmi, JNIEnv *env) {
- return jj_ResolveFunctions(env, fn_names, &fn);
+ return nativez_ResolveFunctions(env, jj_libtable, fn_names, &fn);
}
/* ********************************************************************** */
#include "au_notzed_jjmpeg_AVCodecParameters.h"
#include "jjmpeg.h"
-
#include "jj-avcodecparameters.h"
-#undef DLCALL
-#define DLCALL(x) (fn.x)
jint AVCodecParameters_OnLoad(JavaVM *vmi, JNIEnv *env) {
- return jj_ResolveFunctions(env, fn_names, &fn);
+ return nativez_ResolveFunctions(env, jj_libtable, fn_names, &fn);
}
/* ********************************************************************** */
#include "jj-avdevice.h"
jint AVDevice_OnLoad(JavaVM *vmi, JNIEnv *env) {
- if (jj_ResolveReferences(env, java_names, &java))
+ if (nativez_ResolveReferences(env, java_names, &java))
return -1;
- jj_ResolveFunctions(env, fn_names, &fn);
+ nativez_ResolveFunctions(env, jj_libtable, fn_names, &fn);
return 0;
}
*/
jint AVFormatContext_OnLoad(JavaVM *vmi, JNIEnv *env) {
- return jj_ResolveReferences(env, java_names, &java)
- || jj_ResolveFunctions(env, fn_names, &fn);
+ return nativez_ResolveReferences(env, java_names, &java)
+ || nativez_ResolveFunctions(env, jj_libtable, fn_names, &fn);
}
/* ********************************************************************** */
#include "au_notzed_jjmpeg_AVFrame_SampleReader.h"
#include "jjmpeg.h"
-
#include "jj-avframe.h"
-#undef DLCALL
-#define DLCALL(x) (fn.x)
#define MAX(a, b) ((a)>(b)?(a):(b))
jint AVFrame_OnLoad(JavaVM *vmi, JNIEnv *env) {
- return jj_ResolveFunctions(env, fn_names, &fn);
+ return nativez_ResolveFunctions(env, jj_libtable, fn_names, &fn);
}
/* ********************************************************************** */
#include "au_notzed_jjmpeg_AVIOContext.h"
#include "jjmpeg.h"
-
#include "jj-aviocontext.h"
jint AVIOContext_OnLoad(JavaVM *vmi, JNIEnv *env) {
- return jj_ResolveReferences(env, java_names, &java)
- || jj_ResolveFunctions(env, fn_names, &fn);
+ return nativez_ResolveReferences(env, java_names, &java)
+ || nativez_ResolveFunctions(env, jj_libtable, fn_names, &fn);
}
/* ********************************************************************** */
#include "au_notzed_jjmpeg_AVInputFormat.h"
#include "au_notzed_jjmpeg_AVOutputFormat.h"
#include "au_notzed_jjmpeg_AVRational.h"
-#include "au_notzed_jjmpeg_SwsContext.h"
-
#include "au_notzed_jjmpeg_AVCodecID.h"
#include "au_notzed_jjmpeg_AVPixelFormat.h"
#include "au_notzed_jjmpeg_AVSampleFormat.h"
#include "au_notzed_jjmpeg_AVChannelLayout.h"
#include "au_notzed_jjmpeg_AVMediaType.h"
-
#include "au_notzed_jjmpeg_AVError.h"
+#include "au_notzed_jjmpeg_SwsContext.h"
#include "jjmpeg.h"
-
#include "jj-avmisc.h"
-#undef DLCALL
-#define DLCALL(x) (fn.x)
jint AVMisc_OnLoad(JavaVM *vmi, JNIEnv *env) {
- return jj_ResolveFunctions(env, fn_names, &fn);
+ return nativez_ResolveFunctions(env, jj_libtable, fn_names, &fn);
}
/* ********************************************************************** */
#include "jj-avoptions.h"
jint AVOptions_OnLoad(JavaVM *vmi, JNIEnv *env) {
- return jj_ResolveReferences(env, java_names, &java)
- || jj_ResolveFunctions(env, fn_names, &fn);
+ return nativez_ResolveReferences(env, java_names, &java)
+ || nativez_ResolveFunctions(env, jj_libtable, fn_names, &fn);
}
#define GETP(name) void *name = NativeZ_getP(env, j ## name)
#include "jj-avpacket.h"
jint AVPacket_OnLoad(JavaVM *vmi, JNIEnv *env) {
- return jj_ResolveReferences(env, java_names, &java)
- || jj_ResolveFunctions(env, fn_names, &fn);
+ return nativez_ResolveReferences(env, java_names, &java)
+ || nativez_ResolveFunctions(env, jj_libtable, fn_names, &fn);
}
/* ********************************************************************** */
#include "jj-avstream.h"
jint AVStream_OnLoad(JavaVM *vmi, JNIEnv *env) {
- return jj_ResolveReferences(env, java_names, &java);
+ return nativez_ResolveReferences(env, java_names, &java);
}
/* ********************************************************************** */
#include "jj-avutil.h"
jint AVUtil_OnLoad(JavaVM *vmi, JNIEnv *env) {
- return jj_ResolveReferences(env, java_names, &java)
- || jj_ResolveFunctions(env, fn_names, &fn);
+ return nativez_ResolveReferences(env, java_names, &java)
+ || nativez_ResolveFunctions(env, jj_libtable, fn_names, &fn);
}
static jobject jlogger_ref;
#include <jni.h>
-#include <libavutil/version.h>
-#include <libavcodec/version.h>
-#include <libavformat/version.h>
-#include <libavdevice/version.h>
-#include <libswscale/version.h>
-#include <libswresample/version.h>
-
#include "jjmpeg.h"
#include "jjmpeg-jni.h"
#define D(x)
-static int fail(const char *ctx, const char *what) __attribute__ ((noinline));
-
-#undef DLSO
-#define DLSO(name, v, flags) { #name, v, flags }
-
-static NZLibTable libtable[] = {
- DLSO(avutil, LIBAVUTIL_VERSION_MAJOR, 0),
- DLSO(avcodec, LIBAVCODEC_VERSION_MAJOR, 0),
- DLSO(avformat, LIBAVFORMAT_VERSION_MAJOR, 0),
- DLSO(swscale, LIBSWSCALE_VERSION_MAJOR, 0), // noncore?
- DLSO(swresample, LIBSWRESAMPLE_VERSION_MAJOR, 0), // noncore?
- DLSO(avdevice, LIBAVDEVICE_VERSION_MAJOR, DLSO_NONCORE),
-
- { 0 }
-};
-
typedef jint (*onLoad)(JavaVM *, JNIEnv *);
static onLoad ctors[] = {
if ((*vmi)->GetEnv(vmi, (void *)&env, JNI_VERSION_1_4) < 0)
return 0;
- if (jj_ResolveReferences(env, java_names, &java) != 0
- || jj_ResolveLibraries(env, libtable) != 0
- || jj_ResolveFunctions(env, fn_names, &fn) != 0)
+ if (nativez_ResolveReferences(env, java_names, &java) != 0
+ || nativez_ResolveLibraries(env, jj_libtable) != 0
+ || nativez_ResolveFunctions(env, jj_libtable, fn_names, &fn) != 0)
return -1;
/* Call other onload functions */
/* ********************************************************************** */
-static int fail(const char *ctx, const char *what) {
- fprintf(stderr, "%s: %s\n", ctx, what);
- perror(ctx);
- fflush(stderr);
- return -1;
-}
-
-// temporary
-#include <dlfcn.h>
-
-int jj_ResolveLibraries(JNIEnv *env, NZLibTable *table) {
- char name[64];
-
- for (int i=0;table[i].name;i++) {
- void *lib;
-
- sprintf(name, "lib%s.so", table[i].name);
-
- lib = dlopen(name, RTLD_LAZY | RTLD_GLOBAL);
- if (!lib) {
- return fail("open library", name);
- }
-
- table[i].ptr = lib;
- }
- return 0;
-}
-
-static int jj_ResolveFunctionsX(JNIEnv *env, const NZLibTable *table, const char *fn_names, void *fnp) {
- void *lib = NULL;
- const char *name = fn_names;
- int index = 0;
- const char *lib_name = "";
- void **fn = fnp;
-
- while (*name) {
- const char *next = name + strlen(name) + 1;
-
- if (*name == '#') {
- lib = NULL;
- lib_name = name+1;
- for (int i=0;table[i].name;i++) {
- if (strcmp(table[i].name, lib_name) == 0) {
- lib = table[i].ptr;
- break;
- }
- }
- } else if (lib) {
- void *entry = dlsym(lib, name);
-
- fn[index++] = entry;
- if (!entry) {
- return fail("resolve function", name);
- }
- } else {
- return fail("find function library", lib_name);
- }
-
- name = next;
- }
-
- return 0;
-}
-
-int jj_ResolveFunctions(JNIEnv *env, const char *fn_names, void *fnp) {
- return jj_ResolveFunctionsX(env, libtable, fn_names, fnp);
-}
-
-int jj_ResolveReferences(JNIEnv *env, const char *jn_names, void *jnp) {
- jclass jc = NULL;
-
- const char *name = jn_names;
- int index = 0;
- void **jn = jnp;
- const char *cname = "?";
-
- while (*name) {
- const char *next = name + strlen(name) + 1;
-
- switch (*name) {
- case '#': // class
- jc = (*env)->FindClass(env, name + 1);
- jn[index] = jc = (*env)->NewGlobalRef(env, jc);
- cname = name + 1;
- break;
- case ',': // field
- jn[index] = (*env)->GetFieldID(env, jc, name+1, next);
- break;
- case ';': // static field
- jn[index] = (*env)->GetStaticFieldID(env, jc, name+1, next);
- break;
- case '.': // method
- jn[index] = (*env)->GetMethodID(env, jc, name+1, next);
- break;
- case ':': // static method
- jn[index] = (*env)->GetStaticMethodID(env, jc, name+1, next);
- break;
- default:
- return fail("Invalid table", name);
- }
-
- if (!jn[index])
- return fail(cname, name+1);
-
- if (*name != '#')
- next = next + strlen(next) + 1;
- name = next;
- index += 1;
- }
-
- return 0;
-}
-
-/* ********************************************************************** */
-
void jjthrowAVIOException(JNIEnv *env, int error, const char *msg) {
jvalue jargs[2];
jthrowable jex;
--- /dev/null
+
+#include <libavutil/version.h>
+#include <libavcodec/version.h>
+#include <libavformat/version.h>
+#include <libavdevice/version.h>
+#include <libswscale/version.h>
+#include <libswresample/version.h>
+
+#include "nativez.h"
+
+#if defined(USE_SO_VERSION)
+#define SIFY(n) #n
+#define SO(n, v, f) NZSO(n, "lib" n ".so." SIFY(v), f)
+#else
+#define SO(n, v, f) NZSO(n, "lib" n ".so", f)
+#endif
+
+NZLibTable jj_libtable[] = {
+ SO("avutil", LIBAVUTIL_VERSION_MAJOR, 0),
+ SO("avcodec", LIBAVCODEC_VERSION_MAJOR, 0),
+ SO("avformat", LIBAVFORMAT_VERSION_MAJOR, 0),
+ SO("swscale", LIBSWSCALE_VERSION_MAJOR, 0), // noncore?
+ SO("swresample", LIBSWRESAMPLE_VERSION_MAJOR, 0), // noncore?
+ SO("avdevice", LIBAVDEVICE_VERSION_MAJOR, NZSO_NONCORE),
+ NZSO_END
+};
--- /dev/null
+
+#include <libavutil/version.h>
+#include <libavcodec/version.h>
+#include <libavformat/version.h>
+#include <libavdevice/version.h>
+#include <libswscale/version.h>
+#include <libswresample/version.h>
+
+#include "nativez.h"
+
+#define SIFY(n) #n
+#define SO(n, v, f) NZSO(n, n "-" SIFY(v) ".dll", f)
+
+NZLibTable jj_libtable[] = {
+ SO("avutil", LIBAVUTIL_VERSION_MAJOR, 0),
+ SO("avcodec", LIBAVCODEC_VERSION_MAJOR, 0),
+ SO("avformat", LIBAVFORMAT_VERSION_MAJOR, 0),
+ SO("swscale", LIBSWSCALE_VERSION_MAJOR, 0), // noncore?
+ SO("swresample", LIBSWRESAMPLE_VERSION_MAJOR, 0), // noncore?
+ SO("avdevice", LIBAVDEVICE_VERSION_MAJOR, NZSO_NONCORE),
+ NZSO_END
+};
jint AVUtil_OnLoad(JavaVM *vmi, JNIEnv *env);
-/* temporary */
-int jj_ResolveFunctions(JNIEnv *env, const char *fn_names, void *fnp);
-int jj_ResolveLibraries(JNIEnv *env, NZLibTable *table);
-int jj_ResolveReferences(JNIEnv *env, const char *jn_names, void *jnp);
-#undef DLCALL
+extern NZLibTable jj_libtable[];
+
#define DLCALL(x) (fn.x)
-#undef DLCHECK_RET
#define DLCHECK_RET(env, x, ret) do { if (!nativez_NonNull(env, #x, (void *)fn.x)) { return ret; } } while (0)
#endif
jjmpeg_SOURCES = \
jjmpeg-jni.c \
+ jjmpeg-$(TARGET:-amd64=).c \
jj-avcodec.c \
jj-avcodeccontext.c \
jj-avcodecparameters.c \
jj-avstream.c \
jj-avutil.c
-linux-amd64_jjmpeg_LDFLAGS = -ldl
+linux-amd64_jjmpeg_LDLIBS = -L$(NATIVEZ_HOME)/lib -lnativez -dl
+windows-amd64_jjmpeg_LDLIBS = -L$(NATIVEZ_HOME)/bin -lnativez
-jjmpeg_LDLIBS=-L$(NATIVEZ_HOME)/lib -lnativez $($(TARGET)_jjmpeg_LDFLAGS)
+jjmpeg_LDLIBS=$($(TARGET)_jjmpeg_LDLIBS)
jjmpeg_CPPFLAGS=-I$(FFMPEG_HOME)/include -I$(NATIVEZ_HOME)/include -I$(notzed.jjmpeg_jnidir)
-jjmpeg_CFLAGS=-Wall -Wmissing-prototypes -Wno-pointer-sign
+jjmpeg_CFLAGS=-Wmissing-prototypes -Wno-pointer-sign
jjmpeg_DEFS = \
jjmpeg-jni.def \
$(notzed.jjmpeg_jnidir)/%.h: src/notzed.jjmpeg/jni/%.def
@install -d $(@D)
- src/notzed.jjmpeg/jni/extract-proto.pl -f "$(FFMPEG_HOME)" $< > $@ || ( rm $@ ; exit 1)
+ $(NATIVEZ_HOME)/bin/nativez-gen -J -b "$(FFMPEG_HOME)/include" $< > $@ || ( rm $@ ; exit 1)