summaryrefslogtreecommitdiff
path: root/plugins/pychrysalide/analysis
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/analysis
parentc27f884ec1d18d9cff0d19d6ba8de1dd54d991c4 (diff)
Refactor Makefiles to exclude GTK on demand.
Diffstat (limited to 'plugins/pychrysalide/analysis')
-rw-r--r--plugins/pychrysalide/analysis/Makefile.am32
-rw-r--r--plugins/pychrysalide/analysis/contents/Makefile.am19
-rw-r--r--plugins/pychrysalide/analysis/db/Makefile.am28
-rw-r--r--plugins/pychrysalide/analysis/db/items/Makefile.am19
-rw-r--r--plugins/pychrysalide/analysis/disass/Makefile.am15
-rw-r--r--plugins/pychrysalide/analysis/loaded.c26
-rw-r--r--plugins/pychrysalide/analysis/storage/Makefile.am13
-rw-r--r--plugins/pychrysalide/analysis/types/Makefile.am33
8 files changed, 85 insertions, 100 deletions
diff --git a/plugins/pychrysalide/analysis/Makefile.am b/plugins/pychrysalide/analysis/Makefile.am
index 66a2524..67cf373 100644
--- a/plugins/pychrysalide/analysis/Makefile.am
+++ b/plugins/pychrysalide/analysis/Makefile.am
@@ -1,18 +1,18 @@
noinst_LTLIBRARIES = libpychrysaanalysis.la
-libpychrysaanalysis_la_SOURCES = \
- binary.h binary.c \
- block.h block.c \
- cattribs.h cattribs.c \
- constants.h constants.c \
- content.h content.c \
- loaded.h loaded.c \
- loading.h loading.c \
- module.h module.c \
- project.h project.c \
- routine.h routine.c \
- type.h type.c \
+libpychrysaanalysis_la_SOURCES = \
+ binary.h binary.c \
+ block.h block.c \
+ cattribs.h cattribs.c \
+ constants.h constants.c \
+ content.h content.c \
+ loaded.h loaded.c \
+ loading.h loading.c \
+ module.h module.c \
+ project.h project.c \
+ routine.h routine.c \
+ type.h type.c \
variable.h variable.c
libpychrysaanalysis_la_LIBADD = \
@@ -22,7 +22,8 @@ libpychrysaanalysis_la_LIBADD = \
storage/libpychrysaanalysisstorage.la \
types/libpychrysaanalysistypes.la
-libpychrysaanalysis_la_LDFLAGS =
+libpychrysaanalysis_la_CFLAGS = $(TOOLKIT_CFLAGS) $(LIBXML_CFLAGS) $(LIBPYTHON_INTERPRETER_CFLAGS) $(LIBPYGOBJECT_CFLAGS) \
+ -I$(top_srcdir)/src -DNO_IMPORT_PYGOBJECT
devdir = $(includedir)/chrysalide/$(subdir)
@@ -30,9 +31,4 @@ devdir = $(includedir)/chrysalide/$(subdir)
dev_HEADERS = $(libpychrysaanalysis_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 = contents db disass storage types
diff --git a/plugins/pychrysalide/analysis/contents/Makefile.am b/plugins/pychrysalide/analysis/contents/Makefile.am
index 5014d47..9238a58 100644
--- a/plugins/pychrysalide/analysis/contents/Makefile.am
+++ b/plugins/pychrysalide/analysis/contents/Makefile.am
@@ -1,22 +1,17 @@
noinst_LTLIBRARIES = libpychrysaanalysiscontents.la
-libpychrysaanalysiscontents_la_SOURCES = \
- encapsulated.h encapsulated.c \
- file.h file.c \
- memory.h memory.c \
- module.h module.c \
+libpychrysaanalysiscontents_la_SOURCES = \
+ encapsulated.h encapsulated.c \
+ file.h file.c \
+ memory.h memory.c \
+ module.h module.c \
restricted.h restricted.c
-libpychrysaanalysiscontents_la_LDFLAGS =
+libpychrysaanalysiscontents_la_CFLAGS = $(TOOLKIT_CFLAGS) $(LIBXML_CFLAGS) $(LIBPYTHON_INTERPRETER_CFLAGS) $(LIBPYGOBJECT_CFLAGS) \
+ -I$(top_srcdir)/src -DNO_IMPORT_PYGOBJECT
devdir = $(includedir)/chrysalide/$(subdir)
dev_HEADERS = $(libpychrysaanalysiscontents_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)
diff --git a/plugins/pychrysalide/analysis/db/Makefile.am b/plugins/pychrysalide/analysis/db/Makefile.am
index 94d4c43..a0dcc0d 100644
--- a/plugins/pychrysalide/analysis/db/Makefile.am
+++ b/plugins/pychrysalide/analysis/db/Makefile.am
@@ -1,21 +1,22 @@
noinst_LTLIBRARIES = libpychrysaanalysisdb.la
-libpychrysaanalysisdb_la_SOURCES = \
- admin.h admin.c \
- analyst.h analyst.c \
- certs.h certs.c \
- client.h client.c \
- collection.h collection.c \
- constants.h constants.c \
- item.h item.c \
- module.h module.c \
+libpychrysaanalysisdb_la_SOURCES = \
+ admin.h admin.c \
+ analyst.h analyst.c \
+ certs.h certs.c \
+ client.h client.c \
+ collection.h collection.c \
+ constants.h constants.c \
+ item.h item.c \
+ module.h module.c \
server.h server.c
-libpychrysaanalysisdb_la_LIBADD = \
+libpychrysaanalysisdb_la_LIBADD = \
items/libpychrysaanalysisdbitems.la
-libpychrysaanalysisdb_la_LDFLAGS =
+libpychrysaanalysisdb_la_CFLAGS = $(TOOLKIT_CFLAGS) $(LIBXML_CFLAGS) $(LIBPYTHON_INTERPRETER_CFLAGS) $(LIBPYGOBJECT_CFLAGS) \
+ -I$(top_srcdir)/src -DNO_IMPORT_PYGOBJECT
devdir = $(includedir)/chrysalide/$(subdir)
@@ -23,9 +24,4 @@ devdir = $(includedir)/chrysalide/$(subdir)
dev_HEADERS = $(libpychrysaanalysisdb_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 = items
diff --git a/plugins/pychrysalide/analysis/db/items/Makefile.am b/plugins/pychrysalide/analysis/db/items/Makefile.am
index 2bac8ba..201aed7 100644
--- a/plugins/pychrysalide/analysis/db/items/Makefile.am
+++ b/plugins/pychrysalide/analysis/db/items/Makefile.am
@@ -1,22 +1,17 @@
noinst_LTLIBRARIES = libpychrysaanalysisdbitems.la
-libpychrysaanalysisdbitems_la_SOURCES = \
- bookmark.h bookmark.c \
- comment.h comment.c \
- constants.h constants.c \
- module.h module.c \
+libpychrysaanalysisdbitems_la_SOURCES = \
+ bookmark.h bookmark.c \
+ comment.h comment.c \
+ constants.h constants.c \
+ module.h module.c \
switcher.h switcher.c
-libpychrysaanalysisdbitems_la_LDFLAGS =
+libpychrysaanalysisdbitems_la_CFLAGS = $(TOOLKIT_CFLAGS) $(LIBXML_CFLAGS) $(LIBPYTHON_INTERPRETER_CFLAGS) $(LIBPYGOBJECT_CFLAGS) \
+ -I$(top_srcdir)/src -DNO_IMPORT_PYGOBJECT
devdir = $(includedir)/chrysalide/$(subdir)
dev_HEADERS = $(libpychrysaanalysisdbitems_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)
diff --git a/plugins/pychrysalide/analysis/disass/Makefile.am b/plugins/pychrysalide/analysis/disass/Makefile.am
index 1aa34ea..0daa930 100644
--- a/plugins/pychrysalide/analysis/disass/Makefile.am
+++ b/plugins/pychrysalide/analysis/disass/Makefile.am
@@ -1,21 +1,14 @@
noinst_LTLIBRARIES = libpychrysaanalysisdisass.la
-libpychrysaanalysisdisass_la_SOURCES = \
- block.h block.c \
+libpychrysaanalysisdisass_la_SOURCES = \
+ block.h block.c \
module.h module.c
-libpychrysaanalysisdisass_la_LDFLAGS =
+libpychrysaanalysisdisass_la_CFLAGS = $(TOOLKIT_CFLAGS) $(LIBXML_CFLAGS) $(LIBPYTHON_INTERPRETER_CFLAGS) $(LIBPYGOBJECT_CFLAGS) \
+ -I$(top_srcdir)/src -DNO_IMPORT_PYGOBJECT
devdir = $(includedir)/chrysalide/$(subdir)
dev_HEADERS = $(libpychrysaanalysisdisass_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/analysis/loaded.c b/plugins/pychrysalide/analysis/loaded.c
index c8674a5..4a5d8f9 100644
--- a/plugins/pychrysalide/analysis/loaded.c
+++ b/plugins/pychrysalide/analysis/loaded.c
@@ -66,6 +66,8 @@ static bool py_loaded_content_analyze_wrapper(GLoadedContent *, bool, bool, wgro
/* Fournit le désignation associée à l'élément chargé. */
static char *py_loaded_content_describe_wrapper(const GLoadedContent *, bool);
+#ifdef HAVE_GTK_SUPPORT
+
/* Détermine le nombre de vues disponibles pour un contenu. */
static unsigned int py_loaded_content_count_views_wrapper(const GLoadedContent *);
@@ -81,6 +83,8 @@ static GtkWidget *py_loaded_content_build_view_wrapper(GLoadedContent *, unsigne
/* Retrouve l'indice correspondant à la vue donnée d'un contenu. */
static unsigned int py_loaded_content_get_view_index_wrapper(GLoadedContent *, GtkWidget *);
+#endif
+
/* ------------------------- CONNEXION AVEC L'API DE PYTHON ------------------------- */
@@ -98,6 +102,8 @@ static PyObject *py_loaded_content_describe(PyObject *, PyObject *);
/* Etablit une liste d'obscurcissements présents. */
static PyObject *py_loaded_content_detect_obfuscators(PyObject *, PyObject *);
+#ifdef HAVE_GTK_SUPPORT
+
/* Détermine le nombre de vues disponibles pour un contenu. */
static PyObject *py_loaded_content_count_views(PyObject *, PyObject *);
@@ -110,6 +116,8 @@ static PyObject *py_loaded_content_build_default_view(PyObject *, PyObject *);
/* Met en place la vue initiale pour un contenu chargé. */
static PyObject *py_loaded_content_build_view(PyObject *, PyObject *);
+#endif
+
/* Fournit le contenu représenté de l'élément chargé. */
static PyObject *py_loaded_content_get_content(PyObject *, void *);
@@ -234,11 +242,13 @@ static void py_loaded_content_init_gclass(GLoadedContentClass *class, gpointer u
class->describe = py_loaded_content_describe_wrapper;
+#ifdef HAVE_GTK_SUPPORT
class->count_views = py_loaded_content_count_views_wrapper;
class->get_view_name = py_loaded_content_get_view_name_wrapper;
class->build_def_view = py_loaded_content_build_default_view_wrapper;
class->build_view = py_loaded_content_build_view_wrapper;
class->get_view_index = py_loaded_content_get_view_index_wrapper;
+#endif
}
@@ -538,6 +548,9 @@ static char *py_loaded_content_describe_wrapper(const GLoadedContent *content, b
}
+#ifdef HAVE_GTK_SUPPORT
+
+
/******************************************************************************
* *
* Paramètres : content = contenu chargé à consulter. *
@@ -874,6 +887,9 @@ static unsigned int py_loaded_content_get_view_index_wrapper(GLoadedContent *con
}
+#endif
+
+
/* ---------------------------------------------------------------------------------- */
/* CONNEXION AVEC L'API DE PYTHON */
@@ -1107,6 +1123,9 @@ static PyObject *py_loaded_content_detect_obfuscators(PyObject *self, PyObject *
}
+#ifdef HAVE_GTK_SUPPORT
+
+
/******************************************************************************
* *
* Paramètres : self = contenu chargé à manipuler. *
@@ -1348,6 +1367,9 @@ static PyObject *py_loaded_content_get_view_index(PyObject *self, PyObject *args
}
+#endif
+
+
/******************************************************************************
* *
* Paramètres : self = objet Python concerné par l'appel. *
@@ -1487,20 +1509,24 @@ PyTypeObject *get_python_loaded_content_type(void)
LOADED_CONTENT_GET_CONTENT_CLASS_WRAPPER,
LOADED_CONTENT_ANALYZE_WRAPPER,
LOADED_CONTENT_DESCRIBE_WRAPPER,
+#ifdef HAVE_GTK_SUPPORT
LOADED_CONTENT_COUNT_VIEWS_WRAPPER,
LOADED_CONTENT_GET_VIEW_NAME_WRAPPER,
LOADED_CONTENT_BUILD_DEFAULT_VIEW_WRAPPER,
LOADED_CONTENT_BUILD_VIEW_WRAPPER,
LOADED_CONTENT_GET_VIEW_INDEX_WRAPPER,
+#endif
LOADED_CONTENT_ANALYZE_METHOD,
LOADED_CONTENT_ANALYZE_AND_WAIT_METHOD,
LOADED_CONTENT_DESCRIBE_METHOD,
LOADED_CONTENT_DETECT_OBFUSCATORS_METHOD,
+#ifdef HAVE_GTK_SUPPORT
LOADED_CONTENT_COUNT_VIEWS_METHOD,
LOADED_CONTENT_GET_VIEW_NAME_METHOD,
LOADED_CONTENT_BUILD_DEFAULT_VIEW_METHOD,
LOADED_CONTENT_BUILD_VIEW_METHOD,
LOADED_CONTENT_GET_VIEW_INDEX_METHOD,
+#endif
{ NULL }
};
diff --git a/plugins/pychrysalide/analysis/storage/Makefile.am b/plugins/pychrysalide/analysis/storage/Makefile.am
index fdf2666..d0a4df4 100644
--- a/plugins/pychrysalide/analysis/storage/Makefile.am
+++ b/plugins/pychrysalide/analysis/storage/Makefile.am
@@ -9,19 +9,10 @@ libpychrysaanalysisstorage_la_SOURCES = \
storage.h storage.c \
tpmem.h tpmem.c
-libpychrysaanalysisstorage_la_LIBADD =
-
-libpychrysaanalysisstorage_la_LDFLAGS =
+libpychrysaanalysisstorage_la_CFLAGS = $(TOOLKIT_CFLAGS) $(LIBXML_CFLAGS) $(LIBPYTHON_INTERPRETER_CFLAGS) $(LIBPYGOBJECT_CFLAGS) \
+ -I$(top_srcdir)/src -DNO_IMPORT_PYGOBJECT
devdir = $(includedir)/chrysalide/$(subdir)
dev_HEADERS = $(libpychrysaanalysisstorage_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/analysis/types/Makefile.am b/plugins/pychrysalide/analysis/types/Makefile.am
index d13fe0c..697c998 100644
--- a/plugins/pychrysalide/analysis/types/Makefile.am
+++ b/plugins/pychrysalide/analysis/types/Makefile.am
@@ -1,30 +1,23 @@
noinst_LTLIBRARIES = libpychrysaanalysistypes.la
-libpychrysaanalysistypes_la_SOURCES = \
- array.h array.c \
- basic.h basic.c \
- constants.h constants.c \
- cse.h cse.c \
- encaps.h encaps.c \
- expr.h expr.c \
- literal.h literal.c \
- module.h module.c \
- override.h override.c \
- proto.h proto.c \
+libpychrysaanalysistypes_la_SOURCES = \
+ array.h array.c \
+ basic.h basic.c \
+ constants.h constants.c \
+ cse.h cse.c \
+ encaps.h encaps.c \
+ expr.h expr.c \
+ literal.h literal.c \
+ module.h module.c \
+ override.h override.c \
+ proto.h proto.c \
template.h template.c
-libpychrysaanalysistypes_la_LDFLAGS =
+libpychrysaanalysistypes_la_CFLAGS = $(TOOLKIT_CFLAGS) $(LIBXML_CFLAGS) $(LIBPYTHON_INTERPRETER_CFLAGS) $(LIBPYGOBJECT_CFLAGS) \
+ -I$(top_srcdir)/src -DNO_IMPORT_PYGOBJECT
devdir = $(includedir)/chrysalide/$(subdir)
dev_HEADERS = $(libpychrysaanalysistypes_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 =