summaryrefslogtreecommitdiff
path: root/plugins/pychrysalide/arch
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2022-12-29 11:02:46 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2022-12-29 11:02:46 (GMT)
commit41db261acccf3494aa93b71a181cde9e8605a841 (patch)
tree07a00f88920a8e601268d415131630052ef85988 /plugins/pychrysalide/arch
parentc27f884ec1d18d9cff0d19d6ba8de1dd54d991c4 (diff)
Refactor Makefiles to exclude GTK on demand.
Diffstat (limited to 'plugins/pychrysalide/arch')
-rw-r--r--plugins/pychrysalide/arch/Makefile.am28
-rw-r--r--plugins/pychrysalide/arch/instructions/Makefile.am19
-rw-r--r--plugins/pychrysalide/arch/operand.c14
-rw-r--r--plugins/pychrysalide/arch/operands/Makefile.am33
4 files changed, 43 insertions, 51 deletions
diff --git a/plugins/pychrysalide/arch/Makefile.am b/plugins/pychrysalide/arch/Makefile.am
index b934412..c113f6e 100644
--- a/plugins/pychrysalide/arch/Makefile.am
+++ b/plugins/pychrysalide/arch/Makefile.am
@@ -1,22 +1,23 @@
noinst_LTLIBRARIES = libpychrysaarch.la
-libpychrysaarch_la_SOURCES = \
- constants.h constants.c \
- context.h context.c \
- instriter.h instriter.c \
- instruction.h instruction.c \
- module.h module.c \
- operand.h operand.c \
- processor.h processor.c \
- register.h register.c \
+libpychrysaarch_la_SOURCES = \
+ constants.h constants.c \
+ context.h context.c \
+ instriter.h instriter.c \
+ instruction.h instruction.c \
+ module.h module.c \
+ operand.h operand.c \
+ processor.h processor.c \
+ register.h register.c \
vmpa.h vmpa.c
-libpychrysaarch_la_LIBADD = \
+libpychrysaarch_la_LIBADD = \
instructions/libpychrysaarchinstructions.la \
operands/libpychrysaarchoperands.la
-libpychrysaarch_la_LDFLAGS =
+libpychrysaarch_la_CFLAGS = $(TOOLKIT_CFLAGS) $(LIBXML_CFLAGS) $(LIBPYTHON_INTERPRETER_CFLAGS) $(LIBPYGOBJECT_CFLAGS) \
+ -I$(top_srcdir)/src -DNO_IMPORT_PYGOBJECT
devdir = $(includedir)/chrysalide/$(subdir)
@@ -24,9 +25,4 @@ devdir = $(includedir)/chrysalide/$(subdir)
dev_HEADERS = $(libpychrysaarch_la_SOURCES:%c=)
-AM_CPPFLAGS = $(LIBGTK_CFLAGS) $(LIBXML_CFLAGS) $(LIBPYTHON_INTERPRETER_CFLAGS) $(LIBPYGOBJECT_CFLAGS) \
- -I$(top_srcdir)/src -DNO_IMPORT_PYGOBJECT
-
-AM_CFLAGS = $(DEBUG_CFLAGS) $(WARNING_FLAGS) $(COMPLIANCE_FLAGS)
-
SUBDIRS = instructions operands
diff --git a/plugins/pychrysalide/arch/instructions/Makefile.am b/plugins/pychrysalide/arch/instructions/Makefile.am
index 01c22c4..65efe42 100644
--- a/plugins/pychrysalide/arch/instructions/Makefile.am
+++ b/plugins/pychrysalide/arch/instructions/Makefile.am
@@ -2,24 +2,15 @@
noinst_LTLIBRARIES = libpychrysaarchinstructions.la
libpychrysaarchinstructions_la_SOURCES = \
- constants.h constants.c \
- module.h module.c \
- raw.h raw.c \
+ constants.h constants.c \
+ module.h module.c \
+ raw.h raw.c \
undefined.h undefined.c
-libpychrysaarchinstructions_la_LIBADD =
-
-libpychrysaarchinstructions_la_LDFLAGS =
+libpychrysaarchinstructions_la_CFLAGS = $(TOOLKIT_CFLAGS) $(LIBXML_CFLAGS) $(LIBPYTHON_INTERPRETER_CFLAGS) $(LIBPYGOBJECT_CFLAGS) \
+ -I$(top_srcdir)/src -DNO_IMPORT_PYGOBJECT
devdir = $(includedir)/chrysalide/$(subdir)
dev_HEADERS = $(libpychrysaarchinstructions_la_SOURCES:%c=)
-
-
-AM_CPPFLAGS = $(LIBGTK_CFLAGS) $(LIBXML_CFLAGS) $(LIBPYTHON_INTERPRETER_CFLAGS) $(LIBPYGOBJECT_CFLAGS) \
- -I$(top_srcdir)/src -DNO_IMPORT_PYGOBJECT
-
-AM_CFLAGS = $(DEBUG_CFLAGS) $(WARNING_FLAGS) $(COMPLIANCE_FLAGS)
-
-SUBDIRS =
diff --git a/plugins/pychrysalide/arch/operand.c b/plugins/pychrysalide/arch/operand.c
index 71e7cdc..edddbe6 100644
--- a/plugins/pychrysalide/arch/operand.c
+++ b/plugins/pychrysalide/arch/operand.c
@@ -60,9 +60,13 @@ static GArchOperand *py_arch_operand_get_inner_operand_from_path_wrapper(const G
/* Traduit un opérande en version humainement lisible. */
static void py_arch_operand_print_wrapper(const GArchOperand *, GBufferLine *);
+#ifdef HAVE_GTK_SUPPORT
+
/* Construit un petit résumé concis de l'opérande. */
static char *py_arch_operand_build_tooltip_wrapper(const GArchOperand *, const GLoadedBinary *);
+#endif
+
/* ------------------------ DEFINITION D'OPERANDE QUELCONQUE ------------------------ */
@@ -186,7 +190,9 @@ static void py_arch_operand_init_gclass(GArchOperandClass *class, gpointer unuse
class->get_inner = py_arch_operand_get_inner_operand_from_path_wrapper;
class->print = py_arch_operand_print_wrapper;
+#ifdef HAVE_GTK_SUPPORT
class->build_tooltip = py_arch_operand_build_tooltip_wrapper;
+#endif
}
@@ -456,6 +462,9 @@ static void py_arch_operand_print_wrapper(const GArchOperand *operand, GBufferLi
}
+#ifdef HAVE_GTK_SUPPORT
+
+
/******************************************************************************
* *
* Paramètres : operand = opérande à consulter. *
@@ -522,6 +531,9 @@ static char *py_arch_operand_build_tooltip_wrapper(const GArchOperand *operand,
}
+#endif
+
+
/* ---------------------------------------------------------------------------------- */
/* DEFINITION D'OPERANDE QUELCONQUE */
@@ -709,7 +721,9 @@ PyTypeObject *get_python_arch_operand_type(void)
ARCH_OPERAND_FIND_INNER_OPERAND_PATH_WRAPPER,
ARCH_OPERAND_GET_INNER_OPERAND_FROM_PATH_WRAPPER,
ARCH_OPERAND_PRINT_WRAPPER,
+#ifdef HAVE_GTK_SUPPORT
ARCH_OPERAND_BUILD_TOOLTIP_WRAPPER,
+#endif
ARCH_OPERAND_FIND_INNER_OPERAND_PATH_METHOD,
ARCH_OPERAND_GET_INNER_OPERAND_FROM_PATH_METHOD,
{ NULL }
diff --git a/plugins/pychrysalide/arch/operands/Makefile.am b/plugins/pychrysalide/arch/operands/Makefile.am
index 1dd54a5..a41cbbb 100644
--- a/plugins/pychrysalide/arch/operands/Makefile.am
+++ b/plugins/pychrysalide/arch/operands/Makefile.am
@@ -1,31 +1,22 @@
noinst_LTLIBRARIES = libpychrysaarchoperands.la
-libpychrysaarchoperands_la_SOURCES = \
- constants.h constants.c \
- feeder.h feeder.c \
- immediate.h immediate.c \
- known.h known.c \
- module.h module.c \
- proxy.h proxy.c \
- register.h register.c \
- rename.h rename.c \
- target.h target.c \
+libpychrysaarchoperands_la_SOURCES = \
+ constants.h constants.c \
+ feeder.h feeder.c \
+ immediate.h immediate.c \
+ known.h known.c \
+ module.h module.c \
+ proxy.h proxy.c \
+ register.h register.c \
+ rename.h rename.c \
+ target.h target.c \
targetable.h targetable.c
-libpychrysaarchoperands_la_LIBADD =
-
-libpychrysaarchoperands_la_LDFLAGS =
+libpychrysaarchoperands_la_CFLAGS = $(TOOLKIT_CFLAGS) $(LIBXML_CFLAGS) $(LIBPYTHON_INTERPRETER_CFLAGS) $(LIBPYGOBJECT_CFLAGS) \
+ -I$(top_srcdir)/src -DNO_IMPORT_PYGOBJECT
devdir = $(includedir)/chrysalide/$(subdir)
dev_HEADERS = $(libpychrysaarchoperands_la_SOURCES:%c=)
-
-
-AM_CPPFLAGS = $(LIBGTK_CFLAGS) $(LIBXML_CFLAGS) $(LIBPYTHON_INTERPRETER_CFLAGS) $(LIBPYGOBJECT_CFLAGS) \
- -I$(top_srcdir)/src -DNO_IMPORT_PYGOBJECT
-
-AM_CFLAGS = $(DEBUG_CFLAGS) $(WARNING_FLAGS) $(COMPLIANCE_FLAGS)
-
-SUBDIRS =