compilation is possible to windows-amd64 by installing
gcc-mingw-w64-x86-64.
+First copy config.make.in to config.make and edit as necessary.
+
$ make
$ make TARGET=linux-amd64
$ make TARGET=windows-amd64
The target-specific jmodule:
-`bin/notzed.nativez/<target>/notzed.nativez.jmod'
+`bin/<target>/jmods/notzed.nativez.jmod'
Other files of import which can be used for an IDE, dependent project
compilation, or non-modular use:
-`bin/notzed.nativez/notzed.nativez.jar' - portable modular jar
-`bin/notzed.nativez/<target>/include' - header files
-`bin/notzed.nativez/<target>/include' - header files
-`bin/notzed.nativez/<target>/lib/libnativez.so' - linux shared library
+`bin/<target>/lib/notzed.nativez.jar' - portable modular jar
+`bin/<target>/include' - header files
+`bin/<target>/lib/libnativez.so' - linux shared library
+`bin/<target>/bin/nativez.dll' - microsoft windows dynamic link library
+`bin/<target>/bin/nativez-gen' - table generator
+
`bin/modules/notzed.nativez/' - compiled class files
-`bin/notzed.nativez/<target>/bin/nativez-gen' - table generator
Usage
-----
# <library>_DEPENDENCIES A list of other objects on which this library depends before linking.
+# <library>_DEFS A list of .def files for nativez-gen.
+# <library>_DEFSFLAGS Flags for nativez-gen invocation.
+
# .c files have dependencies automatically generated
# Targets
$($(1)_incdir)/%.h: src/$(1)/jni/%.h
install -DC $$< $$@
+# auto-dependencies for c files
$($(1)_objdir)/%.d: src/$(1)/jni/%.c bin/status/$(1).classes
@install -d $$(@D)
@rm -f $$@
$($(TARGET)_CPPFLAGS) $($(2)_CPPFLAGS) $$< -o $$@.d 2>/dev/null
@sed 's,\($$*\.o\) *:,\1 $$@ : ,g' $$@.d > $$@ ; rm $$@.d
+# .def files for nativez mapping
+$($(1)_jnidir)/%.h: src/$(1)/jni/%.def
+ @install -d $$(@D)
+ $(NATIVEZ_HOME)/bin/nativez-gen -J $($(2)_DEFSFLAGS) $$< > $$@ || ( rm $$@ ; exit 1)
+
bin jni $(1) $(java_jmoddir)/$(1).jmod: \
$($(1)_libdir)/$(LIB)$(2)$(SO) \
$(java_libdir)/$(LIB)$(2)$(SO) \
$(addprefix $(java_incdir)/,$($(2)_HEADERS)) \
$(addprefix $($(1)_bindir)/,$($(2)_COMMANDS)) \
$(addprefix $(java_bindir)/,$($(2)_COMMANDS)) \
- $$(addprefix $($(1)_libdir)/,$$($(2)_LIBRARIES))
+ $(addprefix $($(1)_libdir)/,$($(2)_LIBRARIES))
$(if $(filter clean dist gen,$(MAKECMDGOALS)),,-include $$($(2)_OBJS:.o=.d))
endef
#$(foreach module,$(java_JMODS),$(foreach library,$($(module)_JNI_LIBRARIES),$(info $(call jni_library,$(module),$(library)))))
$(foreach module,$(java_JMODS),$(foreach library,$($(module)_JNI_LIBRARIES),$(eval $(call jni_library,$(module),$(library)))))
+#$(foreach module,$(java_JMODS),$(foreach library,$($(module)_JNI_LIBRARIES),$(foreach def,$($(library)_DEFS),$(info $($(module)_objdir)/$(def:.def=.o): $($(module)_jnidir)/$(def:.def=.h)))))
+$(foreach module,$(java_JMODS),$(foreach library,$($(module)_JNI_LIBRARIES),$(foreach def,$($(library)_DEFS),$(eval $($(module)_objdir)/$(def:.def=.o): $($(module)_jnidir)/$(def:.def=.h)))))
+
# ######################################################################
dist: