diff options
| author | Cyrille Bagard <nocbos@gmail.com> | 2019-02-04 18:45:19 (GMT) | 
|---|---|---|
| committer | Cyrille Bagard <nocbos@gmail.com> | 2019-02-04 18:45:19 (GMT) | 
| commit | ff187d24b7441e88e1f0361d59b0f6f55851791f (patch) | |
| tree | e340d88fb8189ef79f2c2d4193eea97be4fa003e /plugins/arm | |
| parent | 9b35b89fce2499d5352f5323baec53abbf9a4af2 (diff) | |
Added an option to drop Python support at compilation time.
Diffstat (limited to 'plugins/arm')
| -rw-r--r-- | plugins/arm/Makefile.am | 23 | ||||
| -rw-r--r-- | plugins/arm/core.c | 16 | 
2 files changed, 31 insertions, 8 deletions
diff --git a/plugins/arm/Makefile.am b/plugins/arm/Makefile.am index 12e58fd..3091db7 100644 --- a/plugins/arm/Makefile.am +++ b/plugins/arm/Makefile.am @@ -4,6 +4,18 @@ lib_LTLIBRARIES = libarm.la  libdir = $(pluginslibdir) +if BUILD_PYTHON3_BINDINGS + +PYTHON3_LIBADD = python/libarmpython.la + +PYTHON3_LDFLAGS = -Wl,-rpath,$(abs_top_srcdir)/plugins/pychrysalide/.libs \ +					-L$(top_srcdir)/plugins/pychrysalide/.libs -l:pychrysalide.so + +PYTHON3_SUBDIRS = python + +endif + +  libarm_la_SOURCES =						\  	cond.h								\  	context-int.h						\ @@ -18,13 +30,12 @@ libarm_la_SOURCES =						\  	register.h register.c  libarm_la_LIBADD =						\ -	python/libarmpython.la				\ +	$(PYTHON3_LIBADD)					\  	v7/libarmv7.la -libarm_la_LDFLAGS =													\ -	-L$(top_srcdir)/src/.libs -lchrysacore							\ -	-Wl,-rpath,$(abs_top_srcdir)/plugins/pychrysalide/.libs			\ -	-L$(top_srcdir)/plugins/pychrysalide/.libs -l:pychrysalide.so +libarm_la_LDFLAGS =								\ +	-L$(top_srcdir)/src/.libs -lchrysacore		\ +	$(PYTHON3_LDFLAGS)  devdir = $(includedir)/chrysalide-$(subdir) @@ -37,4 +48,4 @@ AM_CPPFLAGS = $(LIBGTK_CFLAGS) $(LIBXML_CFLAGS) -I$(top_srcdir)/src  AM_CFLAGS = $(DEBUG_CFLAGS) $(WARNING_FLAGS) $(COMPLIANCE_FLAGS) -SUBDIRS = v7 python +SUBDIRS = v7 $(PYTHON3_SUBDIRS) diff --git a/plugins/arm/core.c b/plugins/arm/core.c index 07b9b24..3e7aa9a 100644 --- a/plugins/arm/core.c +++ b/plugins/arm/core.c @@ -24,16 +24,26 @@  #include "core.h" +#include <config.h>  #include <plugins/plugin-def.h> -#include "python/module.h" +#ifdef HAVE_PYTHON3_BINDINGS +#   include "python/module.h" +#endif  #include "v7/core.h" +#ifdef HAVE_PYTHON3_BINDINGS +#   define PG_REQ RL("PyChrysalide") +#else +#   define PG_REQ NO_REQ +#endif + +  DEFINE_CHRYSALIDE_PLUGIN("GArmPlugin", "arm", "Add support for the ARM architecture", "0.1.0", -                         RL("PyChrysalide"), AL(PGA_PLUGIN_INIT, PGA_PLUGIN_EXIT)); +                         PG_REQ, AL(PGA_PLUGIN_INIT, PGA_PLUGIN_EXIT)); @@ -55,8 +65,10 @@ G_MODULE_EXPORT bool chrysalide_plugin_init(GPluginModule *plugin)      result = init_armv7_core(); +#ifdef HAVE_PYTHON3_BINDINGS      if (result)          result = add_arch_arm_module_to_python_module(); +#endif      return result;  | 
