From 41db261acccf3494aa93b71a181cde9e8605a841 Mon Sep 17 00:00:00 2001 From: Cyrille Bagard Date: Thu, 29 Dec 2022 12:02:46 +0100 Subject: Refactor Makefiles to exclude GTK on demand. --- configure.ac | 131 +++++++++++----- plugins/Makefile.am | 8 +- plugins/arm/Makefile.am | 33 ++-- plugins/arm/python/Makefile.am | 16 +- plugins/arm/python/v7/Makefile.am | 15 +- plugins/arm/v7/Makefile.am | 45 +++--- plugins/arm/v7/opcodes/Makefile.am | 7 +- plugins/arm/v7/operands/Makefile.am | 27 ++-- plugins/arm/v7/operands/estate.c | 2 +- plugins/arm/v7/operands/iflags.c | 2 +- plugins/arm/v7/operands/it.c | 2 +- plugins/arm/v7/operands/limitation.c | 2 +- plugins/arm/v7/operands/maccess.c | 2 +- plugins/arm/v7/operands/offset.c | 2 +- plugins/arm/v7/operands/register.c | 2 +- plugins/arm/v7/operands/reglist.c | 2 +- plugins/arm/v7/operands/rotation.c | 2 +- plugins/arm/v7/operands/shift.c | 2 +- plugins/arm/v7/registers/Makefile.am | 17 +-- plugins/arm/v7/registers/banked.c | 2 +- plugins/arm/v7/registers/basic.c | 2 +- plugins/arm/v7/registers/coproc.c | 2 +- plugins/arm/v7/registers/simd.c | 2 +- plugins/arm/v7/registers/special.c | 2 +- plugins/bhash/Makefile.am | 8 +- plugins/bhash/python/Makefile.am | 17 +-- plugins/bootimg/Makefile.am | 16 +- plugins/bootimg/python/Makefile.am | 15 +- plugins/dalvik/Makefile.am | 39 +++-- plugins/dalvik/operands/Makefile.am | 16 +- plugins/dalvik/operands/args.c | 2 +- plugins/dalvik/operands/pool.c | 2 +- plugins/dalvik/pseudo/Makefile.am | 13 +- plugins/dalvik/python/Makefile.am | 16 +- plugins/dalvik/python/v35/Makefile.am | 15 +- plugins/dalvik/register.c | 2 +- plugins/dalvik/v35/Makefile.am | 17 +-- plugins/dalvik/v35/opcodes/Makefile.am | 7 +- plugins/devdbg/Makefile.am | 9 +- plugins/dex/Makefile.am | 28 ++-- plugins/dex/loading.h | 4 +- plugins/dex/python/Makefile.am | 27 ++-- plugins/dexbnf/Makefile.am | 20 ++- plugins/dexbnf/python/Makefile.am | 13 +- plugins/dwarf/Makefile.am | 30 ++-- plugins/dwarf/info.h | 1 + plugins/dwarf/v2/Makefile.am | 9 +- plugins/dwarf/v3/Makefile.am | 9 +- plugins/dwarf/v4/Makefile.am | 9 +- plugins/elf/Makefile.am | 32 ++-- plugins/elf/loading.h | 2 +- plugins/elf/python/Makefile.am | 25 ++- plugins/elf/strings.h | 2 +- plugins/elf/symbols.h | 2 +- plugins/fmtp/Makefile.am | 11 +- plugins/itanium/Makefile.am | 20 ++- plugins/itanium/python/Makefile.am | 13 +- plugins/java/Makefile.am | 7 +- plugins/javadesc/Makefile.am | 18 +-- plugins/javadesc/python/Makefile.am | 13 +- plugins/libcsem/Makefile.am | 11 +- plugins/lnxsyscalls/Makefile.am | 25 ++- plugins/lnxsyscalls/hunter.h | 2 +- plugins/mobicore/Makefile.am | 17 +-- plugins/pe/Makefile.am | 24 ++- plugins/pe/python/Makefile.am | 20 +-- plugins/pe/symbols.h | 2 +- plugins/pychrysalide/Makefile.am | 68 +++++---- plugins/pychrysalide/analysis/Makefile.am | 32 ++-- plugins/pychrysalide/analysis/contents/Makefile.am | 19 +-- plugins/pychrysalide/analysis/db/Makefile.am | 28 ++-- plugins/pychrysalide/analysis/db/items/Makefile.am | 19 +-- plugins/pychrysalide/analysis/disass/Makefile.am | 15 +- plugins/pychrysalide/analysis/loaded.c | 26 ++++ plugins/pychrysalide/analysis/storage/Makefile.am | 13 +- plugins/pychrysalide/analysis/types/Makefile.am | 33 ++-- plugins/pychrysalide/arch/Makefile.am | 28 ++-- plugins/pychrysalide/arch/instructions/Makefile.am | 19 +-- plugins/pychrysalide/arch/operand.c | 14 ++ plugins/pychrysalide/arch/operands/Makefile.am | 33 ++-- plugins/pychrysalide/common/Makefile.am | 25 ++- plugins/pychrysalide/core/Makefile.am | 25 ++- plugins/pychrysalide/debug/Makefile.am | 17 +-- plugins/pychrysalide/format/Makefile.am | 31 ++-- plugins/pychrysalide/glibext/Makefile.am | 39 ++--- plugins/pychrysalide/glibext/buffercache.c | 12 ++ plugins/pychrysalide/glibext/constants.c | 10 +- plugins/pychrysalide/glibext/constants.h | 4 + plugins/pychrysalide/gtkext/Makefile.am | 25 ++- plugins/pychrysalide/gtkext/graph/Makefile.am | 17 +-- plugins/pychrysalide/gui/Makefile.am | 22 ++- plugins/pychrysalide/gui/core/Makefile.am | 17 +-- plugins/pychrysalide/gui/panels/Makefile.am | 13 +- plugins/pychrysalide/helpers.c | 10 +- plugins/pychrysalide/helpers.h | 28 +++- plugins/pychrysalide/mangling/Makefile.am | 17 +-- plugins/pychrysalide/plugins/Makefile.am | 21 +-- plugins/pychrysalide/plugins/plugin.c | 14 ++ plugins/pychrysalide/weak.h | 6 +- plugins/readdex/Makefile.am | 17 +-- plugins/readdex/class.h | 2 +- plugins/readdex/ids.h | 2 +- plugins/readelf/Makefile.am | 18 +-- plugins/readmc/Makefile.am | 19 +-- plugins/ropgadgets/Makefile.am | 7 +- plugins/winordinals/Makefile.am | 6 +- plugins/winordinals/assign.h | 2 +- plugins/winordinals/python/Makefile.am | 9 +- plugins/yaml/Makefile.am | 6 +- plugins/yaml/python/Makefile.am | 9 +- src/Makefile.am | 60 +++++--- src/analysis/Makefile.am | 8 +- src/analysis/binary.c | 33 +++- src/analysis/block-int.h | 8 + src/analysis/block.c | 10 ++ src/analysis/block.h | 8 +- src/analysis/contents/Makefile.am | 11 +- src/analysis/db/Makefile.am | 8 +- src/analysis/db/items/Makefile.am | 11 +- src/analysis/db/items/comment.c | 2 +- src/analysis/db/items/move.c | 12 +- src/analysis/db/misc/Makefile.am | 11 -- src/analysis/disass/Makefile.am | 7 +- src/analysis/disass/area.h | 2 +- src/analysis/disass/block.c | 14 +- src/analysis/disass/disassembler.c | 6 +- src/analysis/disass/fetch.h | 2 +- src/analysis/disass/instructions.h | 2 +- src/analysis/disass/limit.c | 2 +- src/analysis/disass/output.h | 2 +- src/analysis/disass/routines.h | 2 +- src/analysis/human/Makefile.am | 8 +- src/analysis/human/asm/Makefile.am | 11 +- src/analysis/loaded-int.h | 8 + src/analysis/loaded.c | 32 +++- src/analysis/loaded.h | 16 +- src/analysis/project.c | 6 + src/analysis/project.h | 8 +- src/analysis/routine.c | 7 +- src/analysis/routine.h | 3 + src/analysis/storage/Makefile.am | 11 +- src/analysis/types/Makefile.am | 11 +- src/arch/Makefile.am | 45 +++--- src/arch/instruction.c | 14 +- src/arch/instructions/Makefile.am | 18 +-- src/arch/instructions/raw.c | 2 +- src/arch/instructions/undefined.c | 2 +- src/arch/operand-int.h | 6 + src/arch/operand.c | 6 + src/arch/operand.h | 4 + src/arch/operands/Makefile.am | 12 +- src/arch/operands/immediate.c | 14 +- src/arch/operands/known.c | 2 +- src/arch/operands/target.c | 14 +- src/common/Makefile.am | 9 +- src/core/Makefile.am | 10 +- src/core/collections.h | 2 +- src/core/columns.h | 59 ++++++++ src/core/logs.c | 13 +- src/debug/Makefile.am | 11 +- src/format/Makefile.am | 11 +- src/format/format-int.h | 1 - src/format/format.h | 1 + src/format/known.h | 1 + src/format/strsym.c | 2 +- src/format/symbol.c | 18 ++- src/glibext/Makefile.am | 75 ++++----- src/glibext/buffercache-int.h | 2 + src/glibext/buffercache.c | 168 ++++++++++++++------- src/glibext/buffercache.h | 28 +++- src/glibext/bufferline.c | 15 +- src/glibext/bufferline.h | 8 +- src/glibext/configuration.h | 23 ++- src/glibext/delayed-int.h | 2 +- src/glibext/delayed.c | 8 +- src/glibext/delayed.h | 5 - src/glibext/gbinarycursor.c | 1 + src/glibext/gbinportion-int.h | 2 + src/glibext/gbinportion.c | 113 +++++++++++++- src/glibext/gbinportion.h | 22 ++- src/glibext/generators/Makefile.am | 20 +-- src/glibext/generators/hex.c | 31 ++++ src/glibext/generators/prologue.c | 37 ++++- src/glibext/generators/rborder.c | 37 ++++- src/glibext/glinecursor-int.h | 2 +- src/glibext/glinecursor.h | 6 +- src/glibext/linecolumn.c | 20 +++ src/glibext/linecolumn.h | 14 +- src/glibext/linesegment.c | 67 +++++++- src/glibext/linesegment.h | 26 +++- src/glibext/notifier.h | 74 +++++++++ src/glibext/seq.h | 2 +- src/gtkext/Makefile.am | 6 +- src/gtkext/graph/Makefile.am | 11 +- src/gtkext/gtkblockdisplay.h | 16 -- src/gtkext/gtkstatusstack.c | 2 +- src/gtkext/hexdisplay.h | 13 -- src/gtkext/rendering.h | 2 +- src/gui/Makefile.am | 6 +- src/gui/core/Makefile.am | 9 +- src/gui/dialogs/Makefile.am | 9 +- src/gui/menus/Makefile.am | 11 +- src/gui/panels/Makefile.am | 9 +- src/gui/panels/strings.c | 2 +- src/gui/tb/Makefile.am | 9 +- src/hub.c | 6 +- src/main.c | 66 +++++++- src/mangling/Makefile.am | 11 +- src/plugins/Makefile.am | 11 +- src/plugins/pglist.h | 4 +- src/plugins/plugin-int.h | 6 + src/plugins/plugin.c | 12 ++ src/plugins/plugin.h | 8 +- 213 files changed, 1963 insertions(+), 1409 deletions(-) create mode 100644 src/core/columns.h create mode 100644 src/glibext/notifier.h diff --git a/configure.ac b/configure.ac index 32a9c05..62ccef5 100644 --- a/configure.ac +++ b/configure.ac @@ -214,6 +214,10 @@ AC_ARG_ENABLE([debug], AS_HELP_STRING([--enable-debug], [compile with debugging support [default=no]]), [], [enable_debug=no]) +AC_ARG_ENABLE([gtk-support], + AS_HELP_STRING([--disable-gtk-support], [disable GTK support [default=no]]), + [], [enable_gtk_support=yes]) + AC_ARG_ENABLE([python-bindings], AS_HELP_STRING([--disable-python-bindings], [disable Python bindings [default=no]]), [], [enable_python_bindings=yes]) @@ -249,52 +253,69 @@ if test "x$enable_rpath" = "xno"; then fi -#--- Small enumerations +#--- Small enumerations and other basic flags -CFLAGS="$CFLAGS -fshort-enums -D_LARGEFILE64_SOURCE" +CPPFLAGS="$CPPFLAGS -D_LARGEFILE64_SOURCE" +CFLAGS="$CFLAGS -fshort-enums" -#--- Is debug mode needed ? -if test "x$with_gobject_leak_tracker" = "xyes"; then - enable_debug="yes" +#--- Build binaries for Python package only? + +if test "x$build_python_package" = "xyes"; then + CPPFLAGS="$CPPFLAGS -DPYTHON_PACKAGE" fi -if test "x$enable_debug" = "xyes"; then - DEBUG_CFLAGS="$DEBUG_CFLAGS -O0 -ggdb -gdwarf-2 -DDEBUG" -else - DEBUG_CFLAGS="$DEBUG_CFLAGS -DNDEBUG" + +#--- Discard local sources when looking for resources? + +if test "x$with_local_resources" = "xno"; then + CPPFLAGS="$CPPFLAGS -DDISCARD_LOCAL" fi -AC_SUBST(DEBUG_CFLAGS) + +#--- Is debug mode needed? AM_CONDITIONAL([TRACK_GOBJECT_LEAKS], [test "x$with_gobject_leak_tracker" = "xyes"]) if test "x$with_gobject_leak_tracker" = "xyes"; then AC_DEFINE(TRACK_GOBJECT_LEAKS, 1, [Define to 1 to enable code for dumping remaining GObject instances at exit.]) + enable_debug="yes" fi +if test "x$enable_debug" = "xyes"; then + DEBUG_CPPFLAGS="-DDEBUG" + DEBUG_CFLAGS="-O0 -ggdb -gdwarf-2" +else + DEBUG_CPPFLAGS="-DNDEBUG" +fi -#--- Discard local sources when looking for resources ? -if test "x$build_python_package" = "xyes"; then - CFLAGS="$CFLAGS -DPYTHON_PACKAGE" -fi +#--- Compilation warnings -AC_SUBST(CFLAGS) +WARNING_CFLAGS="-Wall -Wimplicit -Wreturn-type -Wunused -Wswitch -Wcomment -Wuninitialized -Wparentheses -Wpointer-arith -Wmissing-prototypes" + +#-Wcast-qual -Wconversion -Wsign-compare -Wdisabled-optimization + +# _BSD_SOURCE: htobe64, be64toh +# _XOPEN_SOURCE: strdup, snprintf +# _ISOC99_SOURCE: INFINITY; NAN +# GTK_DISABLE_DEPRECATED: on reste conforme au C99 +#COMPLIANCE_FLAGS="-D_BSD_SOURCE -D_GNU_SOURCE -DGTK_DISABLE_DEPRECATED" +COMPLIANCE_CPPFLAGS="-D_DEFAULT_SOURCE -D_GNU_SOURCE" -#--- Discard local sources when looking for resources ? +#--- Final exports -if test "x$with_local_resources" = "xno"; then - CFLAGS="$CFLAGS -DDISCARD_LOCAL" -fi +CPPFLAGS="$CPPFLAGS $DEBUG_CPPFLAGS $COMPLIANCE_CPPFLAGS" +CFLAGS="$CFLAGS $DEBUG_CFLAGS $WARNING_CFLAGS" +AC_SUBST(CPPFLAGS) AC_SUBST(CFLAGS) -#--- Custom destination for desktop resources ? +#--- Custom destination for desktop resources? if test "x$with_desktop_dir" != x; then DESKTOP_DATADIR=$with_desktop_dir @@ -306,26 +327,40 @@ AM_CONDITIONAL(DESKTOP_DATADIR, test "x$with_desktop_dir" != xno) AC_SUBST(DESKTOP_DATADIR) -#--- Compilation warnings +#--- Checks for GTK 3.0 / GObject 2.0 -#-Wall -Wimplicit -Wreturn-type -Wunused -Wswitch -Wcomment -Wuninitialized -Wparentheses -Wpointer-arith -Wmissing-prototypes +AM_CONDITIONAL([BUILD_GTK_SUPPORT], [test "x$enable_gtk_support" = "xyes"]) -WARNING_FLAGS="-Wall -Wimplicit -Wreturn-type -Wunused -Wswitch -Wcomment -Wuninitialized -Wparentheses -Wpointer-arith -Wmissing-prototypes" +if test "x$BUILD_GTK_SUPPORT_TRUE" = "x"; then + AC_DEFINE(HAVE_GTK_SUPPORT, 1, + [Define to 1 if the GTK support is available and enabled.]) +fi -#-Wcast-qual -Wconversion -Wsign-compare -Wdisabled-optimization -AC_SUBST(WARNING_FLAGS) +PKG_CHECK_MODULES(LIBGOBJ,gobject-2.0 >= 2.66.8,[libgobj_found=yes],[libgobj_found=no]) -# _BSD_SOURCE: htobe64, be64toh -# _XOPEN_SOURCE: strdup, snprintf -# _ISOC99_SOURCE: INFINITY; NAN -# GTK_DISABLE_DEPRECATED: on reste conforme au C99 -#COMPLIANCE_FLAGS="-D_BSD_SOURCE -D_GNU_SOURCE -DGTK_DISABLE_DEPRECATED" -COMPLIANCE_FLAGS="-D_DEFAULT_SOURCE -D_GNU_SOURCE" +if test "$libgobj_found" = "yes"; then + libgobj_version=`pkg-config gobject-2.0 --modversion` +else + libgobj_version='-' +fi -AC_SUBST(COMPLIANCE_FLAGS) +PKG_CHECK_MODULES(LIBGTHREAD,gthread-2.0 >= 2.66.8,[libgthread_found=yes],[libgthread_found=no]) + +if test "$libgthread_found" = "yes"; then + libgthread_version=`pkg-config gthread-2.0 --modversion` +else + libgthread_version='-' +fi + +PKG_CHECK_MODULES(LIBGMOD,gmodule-2.0 >= 2.66.8,[libgmod_found=yes],[libgmod_found=no]) + +if test "$libgmod_found" = "yes"; then + libgmod_version=`pkg-config gmodule-2.0 --modversion` +else + libgmod_version='-' +fi -#--- Checks for GTK 2.0 PKG_CHECK_MODULES(LIBGTK,gtk+-3.0 >= 3.8.6,[libgtk_found=yes],[libgtk_found=no]) @@ -335,8 +370,24 @@ else libgtk_version='-' fi -AC_SUBST(LIBGTK_CFLAGS) -AC_SUBST(LIBGTK_LIBS) + +if test "x$enable_gtk_support" = "xyes"; then + + TOOLKIT_CFLAGS="$LIBGTK_CFLAGS $LIBGTHREAD_CFLAGS $LIBGMOD_CFLAGS" + TOOLKIT_LIBS="$LIBGTK_LIBS $LIBGTHREAD_LIBS $LIBGMOD_LIBS" + + AC_SUBST(TOOLKIT_CFLAGS) + AC_SUBST(TOOLKIT_LIBS) + +else + + TOOLKIT_CFLAGS="$LIBGOBJ_CFLAGS $LIBGTHREAD_CFLAGS $LIBGMOD_CFLAGS" + TOOLKIT_LIBS="$LIBGOBJ_LIBS $LIBGTHREAD_LIBS $LIBGMOD_LIBS" + + AC_SUBST(TOOLKIT_CFLAGS) + AC_SUBST(TOOLKIT_LIBS) + +fi #--- Checks for libxml2 @@ -640,6 +691,9 @@ echo -n $PACKAGE r echo AC_PACKAGE_VERSION echo +echo The GLib and object library.................. : $libgobj_version +echo The thread support for GLib.................. : $libgthread_version +echo The dynamic module loader for GLib........... : $libgmod_version echo The GNU Image Manipulation Program Toolkit... : $libgtk_version echo The XML C parser and toolkit of Gnome........ : $libxml_version echo The flexible interface for archives I/O...... : $libarchive_version @@ -655,6 +709,12 @@ echo echo Found lexical analyzer generator............. : $LEX_INST echo Found general-purpose parser generator....... : $YACC_INST +if test "x$enable_gtk_support" = "xyes"; then + disable_gtk_support="no" +else + disable_gtk_support="yes" +fi + if test "x$enable_python_bindings" = "xyes"; then disable_python_bindings="no" else @@ -664,6 +724,7 @@ fi echo echo Print debugging messages..................... : $enable_debug echo Consider local resources..................... : $with_local_resources +echo Disable GTK support.......................... : $disable_gtk_support echo Disable Python bindings...................... : $disable_python_bindings echo Build a Python binary distribution........... : $build_python_package diff --git a/plugins/Makefile.am b/plugins/Makefile.am index 8d39c37..be0bd88 100644 --- a/plugins/Makefile.am +++ b/plugins/Makefile.am @@ -5,6 +5,12 @@ PYTHON3_SUBDIRS = pychrysalide python endif +if BUILD_GTK_SUPPORT + +ROPGADGETS_SUBDIRS = ropgadgets + +endif + # androhelpers SUBDIRS = \ $(PYTHON3_SUBDIRS) \ @@ -28,5 +34,5 @@ SUBDIRS = \ readdex \ readelf \ readmc \ - ropgadgets \ + $(ROPGADGETS_SUBDIRS) \ winordinals diff --git a/plugins/arm/Makefile.am b/plugins/arm/Makefile.am index a37cbbd..3470256 100644 --- a/plugins/arm/Makefile.am +++ b/plugins/arm/Makefile.am @@ -35,23 +35,25 @@ PYTHON3_SUBDIRS = python endif -libarm_la_SOURCES = \ - cond.h \ - context-int.h \ - context.h context.c \ - core.h core.c \ - instruction-int.h \ - instruction.h instruction.c \ - link.h link.c \ - processor-int.h \ - processor.h processor.c \ - register-int.h \ +libarm_la_SOURCES = \ + cond.h \ + context-int.h \ + context.h context.c \ + core.h core.c \ + instruction-int.h \ + instruction.h instruction.c \ + link.h link.c \ + processor-int.h \ + processor.h processor.c \ + register-int.h \ register.h register.c -libarm_la_LIBADD = \ - $(PYTHON3_LIBADD) \ +libarm_la_LIBADD = \ + $(PYTHON3_LIBADD) \ v7/libarmv7.la +libarm_la_CFLAGS = $(TOOLKIT_CFLAGS) $(LIBXML_CFLAGS) -I$(top_srcdir)/src + libarm_la_LDFLAGS = \ -avoid-version \ -L$(top_srcdir)/src/.libs -lchrysacore \ @@ -63,9 +65,4 @@ devdir = $(includedir)/chrysalide/$(subdir) dev_HEADERS = $(libarm_la_SOURCES:%c=) -AM_CPPFLAGS = $(LIBGTK_CFLAGS) $(LIBXML_CFLAGS) -I$(top_srcdir)/src - -AM_CFLAGS = $(DEBUG_CFLAGS) $(WARNING_FLAGS) $(COMPLIANCE_FLAGS) - - SUBDIRS = v7 $(PYTHON3_SUBDIRS) diff --git a/plugins/arm/python/Makefile.am b/plugins/arm/python/Makefile.am index f09baee..931b2b9 100644 --- a/plugins/arm/python/Makefile.am +++ b/plugins/arm/python/Makefile.am @@ -1,15 +1,16 @@ noinst_LTLIBRARIES = libarmpython.la -libarmpython_la_SOURCES = \ - instruction.h instruction.c \ - module.h module.c \ +libarmpython_la_SOURCES = \ + instruction.h instruction.c \ + module.h module.c \ processor.h processor.c -libarmpython_la_LIBADD = \ +libarmpython_la_LIBADD = \ v7/libarmpythonv7.la -libarmpython_la_LDFLAGS = +libarmpython_la_CFLAGS = $(TOOLKIT_CFLAGS) $(LIBXML_CFLAGS) $(LIBPYTHON_CFLAGS) $(LIBPYGOBJECT_CFLAGS) \ + -I$(top_srcdir)/src -DNO_IMPORT_PYGOBJECT devdir = $(includedir)/chrysalide/$(subdir) @@ -17,9 +18,4 @@ devdir = $(includedir)/chrysalide/$(subdir) dev_HEADERS = $(libarmpython_la_SOURCES:%c=) -AM_CPPFLAGS = $(LIBGTK_CFLAGS) $(LIBXML_CFLAGS) $(LIBPYTHON_CFLAGS) $(LIBPYGOBJECT_CFLAGS) \ - -I$(top_srcdir)/src -DNO_IMPORT_PYGOBJECT - -AM_CFLAGS = $(DEBUG_CFLAGS) $(WARNING_FLAGS) $(COMPLIANCE_FLAGS) - SUBDIRS = v7 diff --git a/plugins/arm/python/v7/Makefile.am b/plugins/arm/python/v7/Makefile.am index 06dc4af..a350d90 100644 --- a/plugins/arm/python/v7/Makefile.am +++ b/plugins/arm/python/v7/Makefile.am @@ -1,20 +1,15 @@ noinst_LTLIBRARIES = libarmpythonv7.la -libarmpythonv7_la_SOURCES = \ - instruction.h instruction.c \ - module.h module.c \ +libarmpythonv7_la_SOURCES = \ + instruction.h instruction.c \ + module.h module.c \ processor.h processor.c -libarmpythonv7_la_LDFLAGS = +libarmpythonv7_la_CFLAGS = $(TOOLKIT_CFLAGS) $(LIBXML_CFLAGS) $(LIBPYTHON_CFLAGS) $(LIBPYGOBJECT_CFLAGS) \ + -I$(top_srcdir)/src -DNO_IMPORT_PYGOBJECT devdir = $(includedir)/chrysalide/$(subdir) dev_HEADERS = $(libarmpythonv7_la_SOURCES:%c=) - - -AM_CPPFLAGS = $(LIBGTK_CFLAGS) $(LIBXML_CFLAGS) $(LIBPYTHON_CFLAGS) $(LIBPYGOBJECT_CFLAGS) \ - -I$(top_srcdir)/src -DNO_IMPORT_PYGOBJECT - -AM_CFLAGS = $(DEBUG_CFLAGS) $(WARNING_FLAGS) $(COMPLIANCE_FLAGS) diff --git a/plugins/arm/v7/Makefile.am b/plugins/arm/v7/Makefile.am index f75e9b3..d87373a 100644 --- a/plugins/arm/v7/Makefile.am +++ b/plugins/arm/v7/Makefile.am @@ -1,38 +1,35 @@ noinst_LTLIBRARIES = libarmv7.la -libarmv7_la_SOURCES = \ - arm.h arm.c \ - context.h context.c \ - core.h core.c \ - fetch.h fetch.c \ - helpers.h \ - instruction.h instruction.c \ - link.h link.c \ - operand-int.h \ - operand.h operand.c \ - post.h post.c \ - processor.h processor.c \ - pseudo.h pseudo.c \ - register-int.h \ - register.h register.c \ - thumb_16.h thumb_16.c \ +libarmv7_la_SOURCES = \ + arm.h arm.c \ + context.h context.c \ + core.h core.c \ + fetch.h fetch.c \ + helpers.h \ + instruction.h instruction.c \ + link.h link.c \ + operand-int.h \ + operand.h operand.c \ + post.h post.c \ + processor.h processor.c \ + pseudo.h pseudo.c \ + register-int.h \ + register.h register.c \ + thumb_16.h thumb_16.c \ thumb_32.h thumb_32.c -libarmv7_la_LIBADD = \ - opcodes/libarmv7opcodes.la \ - operands/libarmv7operands.la \ +libarmv7_la_LIBADD = \ + opcodes/libarmv7opcodes.la \ + operands/libarmv7operands.la \ registers/libarmv7registers.la +libarmv7_la_CFLAGS = $(TOOLKIT_CFLAGS) $(LIBXML_CFLAGS) -I$(top_srcdir)/src + devdir = $(includedir)/chrysalide/$(subdir) dev_HEADERS = $(libarmv7_la_SOURCES:%c=) -AM_CPPFLAGS = $(LIBGTK_CFLAGS) $(LIBXML_CFLAGS) -I$(top_srcdir)/src - -AM_CFLAGS = $(DEBUG_CFLAGS) $(WARNING_FLAGS) $(COMPLIANCE_FLAGS) - - SUBDIRS = opdefs opcodes operands registers diff --git a/plugins/arm/v7/opcodes/Makefile.am b/plugins/arm/v7/opcodes/Makefile.am index 7a35ff9..c7fa4cc 100644 --- a/plugins/arm/v7/opcodes/Makefile.am +++ b/plugins/arm/v7/opcodes/Makefile.am @@ -13,7 +13,7 @@ noinst_LTLIBRARIES = libarmv7opcodes.la libarmv7opcodes_la_SOURCES = $(GENERATED_FILES) -libarmv7opcodes_la_LIBADD = +libarmv7opcodes_la_CFLAGS = $(TOOLKIT_CFLAGS) $(LIBXML_CFLAGS) -I$(top_srcdir)/src devdir = $(includedir)/chrysalide/$(subdir) @@ -21,11 +21,6 @@ devdir = $(includedir)/chrysalide/$(subdir) dev_HEADERS = $(libarmv7opcodes_la_SOURCES:%c=) -AM_CPPFLAGS = $(LIBGTK_CFLAGS) $(LIBXML_CFLAGS) - -AM_CFLAGS = $(DEBUG_CFLAGS) $(WARNING_FLAGS) $(COMPLIANCE_FLAGS) -I$(top_srcdir)/src - - CLEANFILES = $(GENERATED_FILES) dist-hook: diff --git a/plugins/arm/v7/operands/Makefile.am b/plugins/arm/v7/operands/Makefile.am index 31f6a8a..fa7ab8b 100644 --- a/plugins/arm/v7/operands/Makefile.am +++ b/plugins/arm/v7/operands/Makefile.am @@ -1,26 +1,21 @@ noinst_LTLIBRARIES = libarmv7operands.la -libarmv7operands_la_SOURCES = \ - estate.h estate.c \ - iflags.h iflags.c \ - it.h it.c \ - limitation.h limitation.c \ - maccess.h maccess.c \ - offset.h offset.c \ - register.h register.c \ - reglist.h reglist.c \ - rotation.h rotation.c \ +libarmv7operands_la_SOURCES = \ + estate.h estate.c \ + iflags.h iflags.c \ + it.h it.c \ + limitation.h limitation.c \ + maccess.h maccess.c \ + offset.h offset.c \ + register.h register.c \ + reglist.h reglist.c \ + rotation.h rotation.c \ shift.h shift.c -libarmv7operands_la_LIBADD = +libarmv7operands_la_CFLAGS = $(TOOLKIT_CFLAGS) $(LIBXML_CFLAGS) -I$(top_srcdir)/src devdir = $(includedir)/chrysalide/$(subdir) dev_HEADERS = $(libarmv7operands_la_SOURCES:%c=) - - -AM_CPPFLAGS = $(LIBGTK_CFLAGS) $(LIBXML_CFLAGS) -I$(top_srcdir)/src - -AM_CFLAGS = $(DEBUG_CFLAGS) $(WARNING_FLAGS) $(COMPLIANCE_FLAGS) diff --git a/plugins/arm/v7/operands/estate.c b/plugins/arm/v7/operands/estate.c index d82ffa1..accde6d 100644 --- a/plugins/arm/v7/operands/estate.c +++ b/plugins/arm/v7/operands/estate.c @@ -24,7 +24,7 @@ #include "estate.h" -#include +#include #include "../operand-int.h" diff --git a/plugins/arm/v7/operands/iflags.c b/plugins/arm/v7/operands/iflags.c index 2e26810..f0a5e07 100644 --- a/plugins/arm/v7/operands/iflags.c +++ b/plugins/arm/v7/operands/iflags.c @@ -24,7 +24,7 @@ #include "iflags.h" -#include +#include #include "../operand-int.h" diff --git a/plugins/arm/v7/operands/it.c b/plugins/arm/v7/operands/it.c index 0286e06..46e1b4c 100644 --- a/plugins/arm/v7/operands/it.c +++ b/plugins/arm/v7/operands/it.c @@ -28,7 +28,7 @@ #include -#include +#include #include "../operand-int.h" diff --git a/plugins/arm/v7/operands/limitation.c b/plugins/arm/v7/operands/limitation.c index fe8d9fb..d9e11cf 100644 --- a/plugins/arm/v7/operands/limitation.c +++ b/plugins/arm/v7/operands/limitation.c @@ -26,7 +26,7 @@ #include #include -#include +#include #include "../operand-int.h" diff --git a/plugins/arm/v7/operands/maccess.c b/plugins/arm/v7/operands/maccess.c index b67b65a..77d031f 100644 --- a/plugins/arm/v7/operands/maccess.c +++ b/plugins/arm/v7/operands/maccess.c @@ -30,8 +30,8 @@ #include +#include #include -#include #include "../operand-int.h" diff --git a/plugins/arm/v7/operands/offset.c b/plugins/arm/v7/operands/offset.c index 79c5cf9..724523d 100644 --- a/plugins/arm/v7/operands/offset.c +++ b/plugins/arm/v7/operands/offset.c @@ -29,7 +29,7 @@ #include -#include +#include #include "../operand-int.h" diff --git a/plugins/arm/v7/operands/register.c b/plugins/arm/v7/operands/register.c index 21dc129..fa5b887 100644 --- a/plugins/arm/v7/operands/register.c +++ b/plugins/arm/v7/operands/register.c @@ -26,7 +26,7 @@ #include #include -#include +#include diff --git a/plugins/arm/v7/operands/reglist.c b/plugins/arm/v7/operands/reglist.c index df93f77..b525f28 100644 --- a/plugins/arm/v7/operands/reglist.c +++ b/plugins/arm/v7/operands/reglist.c @@ -31,7 +31,7 @@ #include #include #include -#include +#include #include "../operand-int.h" diff --git a/plugins/arm/v7/operands/rotation.c b/plugins/arm/v7/operands/rotation.c index 8136401..418e5a4 100644 --- a/plugins/arm/v7/operands/rotation.c +++ b/plugins/arm/v7/operands/rotation.c @@ -29,8 +29,8 @@ #include +#include #include -#include #include "../operand-int.h" diff --git a/plugins/arm/v7/operands/shift.c b/plugins/arm/v7/operands/shift.c index 1e1a8ab..ee18cf0 100644 --- a/plugins/arm/v7/operands/shift.c +++ b/plugins/arm/v7/operands/shift.c @@ -30,7 +30,7 @@ #include -#include +#include #include "../operand-int.h" diff --git a/plugins/arm/v7/registers/Makefile.am b/plugins/arm/v7/registers/Makefile.am index 94edf09..5f731f9 100644 --- a/plugins/arm/v7/registers/Makefile.am +++ b/plugins/arm/v7/registers/Makefile.am @@ -1,21 +1,16 @@ noinst_LTLIBRARIES = libarmv7registers.la -libarmv7registers_la_SOURCES = \ - banked.h banked.c \ - basic.h basic.c \ - coproc.h coproc.c \ - simd.h simd.c \ +libarmv7registers_la_SOURCES = \ + banked.h banked.c \ + basic.h basic.c \ + coproc.h coproc.c \ + simd.h simd.c \ special.h special.c -libarmv7registers_la_LIBADD = +libarmv7registers_la_CFLAGS = $(TOOLKIT_CFLAGS) $(LIBXML_CFLAGS) -I$(top_srcdir)/src devdir = $(includedir)/chrysalide/$(subdir) dev_HEADERS = $(libarmv7registers_la_SOURCES:%c=) - - -AM_CPPFLAGS = $(LIBGTK_CFLAGS) $(LIBXML_CFLAGS) -I$(top_srcdir)/src - -AM_CFLAGS = $(DEBUG_CFLAGS) $(WARNING_FLAGS) $(COMPLIANCE_FLAGS) diff --git a/plugins/arm/v7/registers/banked.c b/plugins/arm/v7/registers/banked.c index d565f95..6e9fbf3 100644 --- a/plugins/arm/v7/registers/banked.c +++ b/plugins/arm/v7/registers/banked.c @@ -27,7 +27,7 @@ #include -#include +#include #include "../register-int.h" diff --git a/plugins/arm/v7/registers/basic.c b/plugins/arm/v7/registers/basic.c index 60ef821..358135b 100644 --- a/plugins/arm/v7/registers/basic.c +++ b/plugins/arm/v7/registers/basic.c @@ -27,7 +27,7 @@ #include -#include +#include #include "../register-int.h" diff --git a/plugins/arm/v7/registers/coproc.c b/plugins/arm/v7/registers/coproc.c index 3d4ee8e..5c256a7 100644 --- a/plugins/arm/v7/registers/coproc.c +++ b/plugins/arm/v7/registers/coproc.c @@ -27,7 +27,7 @@ #include -#include +#include #include "../register-int.h" diff --git a/plugins/arm/v7/registers/simd.c b/plugins/arm/v7/registers/simd.c index e38de0c..8c8c653 100644 --- a/plugins/arm/v7/registers/simd.c +++ b/plugins/arm/v7/registers/simd.c @@ -28,7 +28,7 @@ #include -#include +#include #include "../register-int.h" diff --git a/plugins/arm/v7/registers/special.c b/plugins/arm/v7/registers/special.c index d0bfb67..1fc9eb5 100644 --- a/plugins/arm/v7/registers/special.c +++ b/plugins/arm/v7/registers/special.c @@ -27,7 +27,7 @@ #include -#include +#include #include "../register-int.h" diff --git a/plugins/bhash/Makefile.am b/plugins/bhash/Makefile.am index 45c5ee0..31daeb1 100644 --- a/plugins/bhash/Makefile.am +++ b/plugins/bhash/Makefile.am @@ -45,9 +45,11 @@ libbhash_la_SOURCES = \ tlsh.h tlsh.c \ rich.h rich.c -libbhash_la_LIBADD = \ +libbhash_la_LIBADD = \ $(PYTHON3_LIBADD) +libbhash_la_CFLAGS = $(TOOLKIT_CFLAGS) $(LIBXML_CFLAGS) -I$(top_srcdir)/src + libbhash_la_LDFLAGS = \ -avoid-version \ -L$(top_srcdir)/src/.libs -lchrysacore \ @@ -60,8 +62,4 @@ devdir = $(includedir)/chrysalide/$(subdir) dev_HEADERS = $(libbhash_la_SOURCES:%c=) -AM_CPPFLAGS = $(LIBGTK_CFLAGS) $(LIBXML_CFLAGS) -I$(top_srcdir)/src - -AM_CFLAGS = $(DEBUG_CFLAGS) $(WARNING_FLAGS) $(COMPLIANCE_FLAGS) - SUBDIRS = $(PYTHON3_SUBDIRS) diff --git a/plugins/bhash/python/Makefile.am b/plugins/bhash/python/Makefile.am index 822a716..6dd127c 100644 --- a/plugins/bhash/python/Makefile.am +++ b/plugins/bhash/python/Makefile.am @@ -1,21 +1,16 @@ noinst_LTLIBRARIES = libbhashpython.la -libbhashpython_la_SOURCES = \ - imphash.h imphash.c \ - module.h module.c \ - tlsh.h tlsh.c \ +libbhashpython_la_SOURCES = \ + imphash.h imphash.c \ + module.h module.c \ + tlsh.h tlsh.c \ rich.h rich.c -libbhashpython_la_LDFLAGS = +libbhashpython_la_CFLAGS = $(TOOLKIT_CFLAGS) $(LIBXML_CFLAGS) $(LIBPYTHON_CFLAGS) $(LIBPYGOBJECT_CFLAGS) \ + -I$(top_srcdir)/src -DNO_IMPORT_PYGOBJECT devdir = $(includedir)/chrysalide/$(subdir) dev_HEADERS = $(libbhashpython_la_SOURCES:%c=) - - -AM_CPPFLAGS = $(LIBGTK_CFLAGS) $(LIBXML_CFLAGS) $(LIBPYTHON_CFLAGS) $(LIBPYGOBJECT_CFLAGS) \ - -I$(top_srcdir)/src -DNO_IMPORT_PYGOBJECT - -AM_CFLAGS = $(DEBUG_CFLAGS) $(WARNING_FLAGS) $(COMPLIANCE_FLAGS) diff --git a/plugins/bootimg/Makefile.am b/plugins/bootimg/Makefile.am index ada1e4e..623c555 100644 --- a/plugins/bootimg/Makefile.am +++ b/plugins/bootimg/Makefile.am @@ -35,15 +35,17 @@ PYTHON3_SUBDIRS = python endif -libbootimg_la_SOURCES = \ - core.h core.c \ - bootimg-def.h \ - format-int.h format-int.c \ +libbootimg_la_SOURCES = \ + core.h core.c \ + bootimg-def.h \ + format-int.h format-int.c \ format.h format.c -libbootimg_la_LIBADD = \ +libbootimg_la_LIBADD = \ $(PYTHON3_LIBADD) +libbootimg_la_CFLAGS = $(TOOLKIT_CFLAGS) $(LIBXML_CFLAGS) -I$(top_srcdir)/src + libbootimg_la_LDFLAGS = \ -avoid-version \ -L$(top_srcdir)/src/.libs -lchrysacore \ @@ -55,8 +57,4 @@ devdir = $(includedir)/chrysalide/$(subdir) dev_HEADERS = $(libbootimg_la_SOURCES:%c=) -AM_CPPFLAGS = $(LIBGTK_CFLAGS) $(LIBXML_CFLAGS) -I$(top_srcdir)/src - -AM_CFLAGS = $(DEBUG_CFLAGS) $(WARNING_FLAGS) $(COMPLIANCE_FLAGS) - SUBDIRS = $(PYTHON3_SUBDIRS) diff --git a/plugins/bootimg/python/Makefile.am b/plugins/bootimg/python/Makefile.am index 1f11581..d39a521 100644 --- a/plugins/bootimg/python/Makefile.am +++ b/plugins/bootimg/python/Makefile.am @@ -1,20 +1,15 @@ noinst_LTLIBRARIES = libbootimgpython.la -libbootimgpython_la_SOURCES = \ - format.h format.c \ - module.h module.c \ +libbootimgpython_la_SOURCES = \ + format.h format.c \ + module.h module.c \ translate.h translate.c -libbootimgpython_la_LDFLAGS = +libbootimgpython_la_CFLAGS = $(TOOLKIT_CFLAGS) $(LIBXML_CFLAGS) $(LIBPYTHON_CFLAGS) $(LIBPYGOBJECT_CFLAGS) \ + -I$(top_srcdir)/src -DNO_IMPORT_PYGOBJECT devdir = $(includedir)/chrysalide/$(subdir) dev_HEADERS = $(libbootimgpython_la_SOURCES:%c=) - - -AM_CPPFLAGS = $(LIBGTK_CFLAGS) $(LIBXML_CFLAGS) $(LIBPYTHON_CFLAGS) $(LIBPYGOBJECT_CFLAGS) \ - -I$(top_srcdir)/src -DNO_IMPORT_PYGOBJECT - -AM_CFLAGS = $(DEBUG_CFLAGS) $(WARNING_FLAGS) $(COMPLIANCE_FLAGS) diff --git a/plugins/dalvik/Makefile.am b/plugins/dalvik/Makefile.am index 644c38a..62ee8a6 100644 --- a/plugins/dalvik/Makefile.am +++ b/plugins/dalvik/Makefile.am @@ -39,26 +39,28 @@ PYTHON3_SUBDIRS = python endif -libdalvik_la_SOURCES = \ - context.h context.c \ - core.h core.c \ - fetch.h fetch.c \ - helpers.h \ - instruction-int.h \ - instruction.h instruction.c \ - link.h link.c \ - operand.h operand.c \ - post.h post.c \ - processor-int.h \ - processor.h processor.c \ +libdalvik_la_SOURCES = \ + context.h context.c \ + core.h core.c \ + fetch.h fetch.c \ + helpers.h \ + instruction-int.h \ + instruction.h instruction.c \ + link.h link.c \ + operand.h operand.c \ + post.h post.c \ + processor-int.h \ + processor.h processor.c \ register.h register.c -libdalvik_la_LIBADD = \ - operands/libdalvikoperands.la \ - pseudo/libdalvikpseudo.la \ - $(PYTHON3_LIBADD) \ +libdalvik_la_LIBADD = \ + operands/libdalvikoperands.la \ + pseudo/libdalvikpseudo.la \ + $(PYTHON3_LIBADD) \ v35/libdalvik35.la +libdalvik_la_CFLAGS = $(TOOLKIT_CFLAGS) $(LIBXML_CFLAGS) -I$(top_srcdir)/src + libdalvik_la_LDFLAGS = \ -avoid-version \ -L$(top_srcdir)/src/.libs -lchrysacore \ @@ -71,9 +73,4 @@ devdir = $(includedir)/chrysalide/$(subdir) dev_HEADERS = $(libdalvik_la_SOURCES:%c=) -AM_CPPFLAGS = $(LIBGTK_CFLAGS) $(LIBXML_CFLAGS) -I$(top_srcdir)/src - -AM_CFLAGS = $(DEBUG_CFLAGS) $(WARNING_FLAGS) $(COMPLIANCE_FLAGS) - - SUBDIRS = operands pseudo $(PYTHON3_SUBDIRS) v35 diff --git a/plugins/dalvik/operands/Makefile.am b/plugins/dalvik/operands/Makefile.am index 4ce597a..3a4ddc1 100644 --- a/plugins/dalvik/operands/Makefile.am +++ b/plugins/dalvik/operands/Makefile.am @@ -1,20 +1,14 @@ noinst_LTLIBRARIES = libdalvikoperands.la -libdalvikoperands_la_SOURCES = \ - args.h args.c \ - pool.h pool.c \ +libdalvikoperands_la_SOURCES = \ + args.h args.c \ + pool.h pool.c \ register.h register.c +libdalvikoperands_la_CFLAGS = $(TOOLKIT_CFLAGS) $(LIBXML_CFLAGS) -I$(top_srcdir)/src + devdir = $(includedir)/chrysalide/$(subdir) dev_HEADERS = $(libdalvikoperands_la_SOURCES:%c=) - - -AM_CPPFLAGS = $(LIBGTK_CFLAGS) $(LIBXML_CFLAGS) -I$(top_srcdir)/src - -AM_CFLAGS = $(DEBUG_CFLAGS) $(WARNING_FLAGS) $(COMPLIANCE_FLAGS) - - -SUBDIRS = diff --git a/plugins/dalvik/operands/args.c b/plugins/dalvik/operands/args.c index 01ed122..64f8eea 100644 --- a/plugins/dalvik/operands/args.c +++ b/plugins/dalvik/operands/args.c @@ -32,8 +32,8 @@ #include #include +#include #include -#include diff --git a/plugins/dalvik/operands/pool.c b/plugins/dalvik/operands/pool.c index a07b3e0..5b99b45 100644 --- a/plugins/dalvik/operands/pool.c +++ b/plugins/dalvik/operands/pool.c @@ -34,7 +34,7 @@ #include #include #include -#include +#include #include diff --git a/plugins/dalvik/pseudo/Makefile.am b/plugins/dalvik/pseudo/Makefile.am index 687aa72..74cc574 100644 --- a/plugins/dalvik/pseudo/Makefile.am +++ b/plugins/dalvik/pseudo/Makefile.am @@ -1,19 +1,14 @@ noinst_LTLIBRARIES = libdalvikpseudo.la -libdalvikpseudo_la_SOURCES = \ - fill.h fill.c \ - identifiers.h \ +libdalvikpseudo_la_SOURCES = \ + fill.h fill.c \ + identifiers.h \ switch.h switch.c -libdalvikpseudo_la_LIBADD = +libdalvikpseudo_la_CFLAGS = $(TOOLKIT_CFLAGS) $(LIBXML_CFLAGS) -I$(top_srcdir)/src devdir = $(includedir)/chrysalide/$(subdir) dev_HEADERS = $(libdalvikpseudo_la_SOURCES:%c=) - - -AM_CPPFLAGS = $(LIBGTK_CFLAGS) $(LIBXML_CFLAGS) -I$(top_srcdir)/src - -AM_CFLAGS = $(DEBUG_CFLAGS) $(WARNING_FLAGS) $(COMPLIANCE_FLAGS) diff --git a/plugins/dalvik/python/Makefile.am b/plugins/dalvik/python/Makefile.am index 90c8924..74fe00d 100644 --- a/plugins/dalvik/python/Makefile.am +++ b/plugins/dalvik/python/Makefile.am @@ -1,15 +1,16 @@ noinst_LTLIBRARIES = libdalvikpython.la -libdalvikpython_la_SOURCES = \ - instruction.h instruction.c \ - module.h module.c \ +libdalvikpython_la_SOURCES = \ + instruction.h instruction.c \ + module.h module.c \ processor.h processor.c -libdalvikpython_la_LIBADD = \ +libdalvikpython_la_LIBADD = \ v35/libdalvikpythonv35.la -libdalvikpython_la_LDFLAGS = +libdalvikpython_la_CFLAGS = $(TOOLKIT_CFLAGS) $(LIBXML_CFLAGS) $(LIBPYTHON_CFLAGS) $(LIBPYGOBJECT_CFLAGS) \ + -I$(top_srcdir)/src -DNO_IMPORT_PYGOBJECT devdir = $(includedir)/chrysalide/$(subdir) @@ -17,9 +18,4 @@ devdir = $(includedir)/chrysalide/$(subdir) dev_HEADERS = $(libdalvikpython_la_SOURCES:%c=) -AM_CPPFLAGS = $(LIBGTK_CFLAGS) $(LIBXML_CFLAGS) $(LIBPYTHON_CFLAGS) $(LIBPYGOBJECT_CFLAGS) \ - -I$(top_srcdir)/src -DNO_IMPORT_PYGOBJECT - -AM_CFLAGS = $(DEBUG_CFLAGS) $(WARNING_FLAGS) $(COMPLIANCE_FLAGS) - SUBDIRS = v35 diff --git a/plugins/dalvik/python/v35/Makefile.am b/plugins/dalvik/python/v35/Makefile.am index 3dda5c1..4464dcc 100644 --- a/plugins/dalvik/python/v35/Makefile.am +++ b/plugins/dalvik/python/v35/Makefile.am @@ -1,20 +1,15 @@ noinst_LTLIBRARIES = libdalvikpythonv35.la -libdalvikpythonv35_la_SOURCES = \ - instruction.h instruction.c \ - module.h module.c \ +libdalvikpythonv35_la_SOURCES = \ + instruction.h instruction.c \ + module.h module.c \ processor.h processor.c -libdalvikpythonv35_la_LDFLAGS = +libdalvikpythonv35_la_CFLAGS = $(TOOLKIT_CFLAGS) $(LIBXML_CFLAGS) $(LIBPYTHON_CFLAGS) $(LIBPYGOBJECT_CFLAGS) \ + -I$(top_srcdir)/src -DNO_IMPORT_PYGOBJECT devdir = $(includedir)/chrysalide/$(subdir) dev_HEADERS = $(libdalvikpythonv35_la_SOURCES:%c=) - - -AM_CPPFLAGS = $(LIBGTK_CFLAGS) $(LIBXML_CFLAGS) $(LIBPYTHON_CFLAGS) $(LIBPYGOBJECT_CFLAGS) \ - -I$(top_srcdir)/src -DNO_IMPORT_PYGOBJECT - -AM_CFLAGS = $(DEBUG_CFLAGS) $(WARNING_FLAGS) $(COMPLIANCE_FLAGS) diff --git a/plugins/dalvik/register.c b/plugins/dalvik/register.c index b350b04..8413108 100644 --- a/plugins/dalvik/register.c +++ b/plugins/dalvik/register.c @@ -30,7 +30,7 @@ #include #include -#include +#include diff --git a/plugins/dalvik/v35/Makefile.am b/plugins/dalvik/v35/Makefile.am index 8a7be09..73e09a0 100644 --- a/plugins/dalvik/v35/Makefile.am +++ b/plugins/dalvik/v35/Makefile.am @@ -1,13 +1,15 @@ noinst_LTLIBRARIES = libdalvik35.la -libdalvik35_la_SOURCES = \ - core.h core.c \ - instruction.h instruction.c \ - operand.h \ +libdalvik35_la_SOURCES = \ + core.h core.c \ + instruction.h instruction.c \ + operand.h \ processor.h processor.c -libdalvik35_la_LIBADD = \ +libdalvik35_la_CFLAGS = $(TOOLKIT_CFLAGS) $(LIBXML_CFLAGS) -I$(top_srcdir)/src + +libdalvik35_la_LIBADD = \ opcodes/libdalvik35opcodes.la @@ -16,9 +18,4 @@ devdir = $(includedir)/chrysalide/$(subdir) dev_HEADERS = $(libdalvik35_la_SOURCES:%c=) -AM_CPPFLAGS = $(LIBGTK_CFLAGS) $(LIBXML_CFLAGS) -I$(top_srcdir)/src - -AM_CFLAGS = $(DEBUG_CFLAGS) $(WARNING_FLAGS) $(COMPLIANCE_FLAGS) - - SUBDIRS = opdefs opcodes diff --git a/plugins/dalvik/v35/opcodes/Makefile.am b/plugins/dalvik/v35/opcodes/Makefile.am index fd26224..8a766f9 100644 --- a/plugins/dalvik/v35/opcodes/Makefile.am +++ b/plugins/dalvik/v35/opcodes/Makefile.am @@ -13,7 +13,7 @@ noinst_LTLIBRARIES = libdalvik35opcodes.la libdalvik35opcodes_la_SOURCES = $(GENERATED_FILES) -libdalvik35opcodes_la_LIBADD = +libdalvik35opcodes_la_CFLAGS = $(TOOLKIT_CFLAGS) $(LIBXML_CFLAGS) -I$(top_srcdir)/src devdir = $(includedir)/chrysalide/$(subdir) @@ -21,11 +21,6 @@ devdir = $(includedir)/chrysalide/$(subdir) dev_HEADERS = $(libdalvik35opcodes_la_SOURCES:%c=) -AM_CPPFLAGS = $(LIBGTK_CFLAGS) $(LIBXML_CFLAGS) -I$(top_srcdir)/src - -AM_CFLAGS = $(DEBUG_CFLAGS) $(WARNING_FLAGS) $(COMPLIANCE_FLAGS) - - CLEANFILES = $(GENERATED_FILES) dist-hook: diff --git a/plugins/devdbg/Makefile.am b/plugins/devdbg/Makefile.am index a92744d..0bf81c6 100644 --- a/plugins/devdbg/Makefile.am +++ b/plugins/devdbg/Makefile.am @@ -11,9 +11,11 @@ RUN_PATH = -Wl,-rpath,'$$ORIGIN/../chrysalide-libs' endif -libspeed_la_SOURCES = \ +libspeed_la_SOURCES = \ speed.h speed.c +libspeed_la_CFLAGS = $(TOOLKIT_CFLAGS) $(LIBXML_CFLAGS) -I$(top_srcdir)/src + libspeed_la_LDFLAGS = \ -avoid-version \ -L$(top_srcdir)/src/.libs -lchrysacore \ @@ -23,8 +25,3 @@ libspeed_la_LDFLAGS = \ devdir = $(includedir)/chrysalide/$(subdir) dev_HEADERS = $(libspeed_la_SOURCES:%c=) - - -AM_CPPFLAGS = $(LIBGTK_CFLAGS) $(LIBXML_CFLAGS) -I$(top_srcdir)/src - -AM_CFLAGS = $(DEBUG_CFLAGS) $(WARNING_FLAGS) $(COMPLIANCE_FLAGS) diff --git a/plugins/dex/Makefile.am b/plugins/dex/Makefile.am index 8eb7bde..a587fe2 100644 --- a/plugins/dex/Makefile.am +++ b/plugins/dex/Makefile.am @@ -35,21 +35,23 @@ PYTHON3_SUBDIRS = python endif -libdex_la_SOURCES = \ - core.h core.c \ - class.h class.c \ - dex-int.h dex-int.c \ - dex_def.h \ - field.h field.c \ - format.h format.c \ - loading.h loading.c \ - method.h method.c \ - pool.h pool.c \ +libdex_la_SOURCES = \ + core.h core.c \ + class.h class.c \ + dex-int.h dex-int.c \ + dex_def.h \ + field.h field.c \ + format.h format.c \ + loading.h loading.c \ + method.h method.c \ + pool.h pool.c \ routine.h routine.c -libdex_la_LIBADD = \ +libdex_la_LIBADD = \ $(PYTHON3_LIBADD) +libdex_la_CFLAGS = $(TOOLKIT_CFLAGS) $(LIBXML_CFLAGS) -I$(top_srcdir)/src + libdex_la_LDFLAGS = \ -avoid-version \ -L$(top_srcdir)/src/.libs -lchrysacore \ @@ -61,8 +63,4 @@ devdir = $(includedir)/chrysalide/$(subdir) dev_HEADERS = $(libdex_la_SOURCES:%c=) -AM_CPPFLAGS = $(LIBGTK_CFLAGS) $(LIBXML_CFLAGS) -I$(top_srcdir)/src - -AM_CFLAGS = $(DEBUG_CFLAGS) $(WARNING_FLAGS) $(COMPLIANCE_FLAGS) - SUBDIRS = $(PYTHON3_SUBDIRS) diff --git a/plugins/dex/loading.h b/plugins/dex/loading.h index 5560e4e..4de6df1 100644 --- a/plugins/dex/loading.h +++ b/plugins/dex/loading.h @@ -26,9 +26,11 @@ #include +#include +#include -#include +#include diff --git a/plugins/dex/python/Makefile.am b/plugins/dex/python/Makefile.am index e91630e..b627157 100644 --- a/plugins/dex/python/Makefile.am +++ b/plugins/dex/python/Makefile.am @@ -1,26 +1,21 @@ noinst_LTLIBRARIES = libdexpython.la -libdexpython_la_SOURCES = \ - class.h class.c \ - constants.h constants.c \ - field.h field.c \ - format.h format.c \ - method.h method.c \ - module.h module.c \ - pool.h pool.c \ - routine.h routine.c \ +libdexpython_la_SOURCES = \ + class.h class.c \ + constants.h constants.c \ + field.h field.c \ + format.h format.c \ + method.h method.c \ + module.h module.c \ + pool.h pool.c \ + routine.h routine.c \ translate.h translate.c -libdexpython_la_LDFLAGS = +libdexpython_la_CFLAGS = $(TOOLKIT_CFLAGS) $(LIBXML_CFLAGS) $(LIBPYTHON_CFLAGS) $(LIBPYGOBJECT_CFLAGS) \ + -I$(top_srcdir)/src -DNO_IMPORT_PYGOBJECT devdir = $(includedir)/chrysalide/$(subdir) dev_HEADERS = $(libdexpython_la_SOURCES:%c=) - - -AM_CPPFLAGS = $(LIBGTK_CFLAGS) $(LIBXML_CFLAGS) $(LIBPYTHON_CFLAGS) $(LIBPYGOBJECT_CFLAGS) \ - -I$(top_srcdir)/src -DNO_IMPORT_PYGOBJECT - -AM_CFLAGS = $(DEBUG_CFLAGS) $(WARNING_FLAGS) $(COMPLIANCE_FLAGS) diff --git a/plugins/dexbnf/Makefile.am b/plugins/dexbnf/Makefile.am index 51598ce..222cc35 100644 --- a/plugins/dexbnf/Makefile.am +++ b/plugins/dexbnf/Makefile.am @@ -34,17 +34,19 @@ PYTHON3_SUBDIRS = python endif -libdexbnf_la_SOURCES = \ - context.h context.c \ - core.h core.c \ - demangler.h demangler.c \ - simple.h simple.c \ - shorty.h shorty.c \ +libdexbnf_la_SOURCES = \ + context.h context.c \ + core.h core.c \ + demangler.h demangler.c \ + simple.h simple.c \ + shorty.h shorty.c \ type.h type.c -libdexbnf_la_LIBADD = \ +libdexbnf_la_LIBADD = \ $(PYTHON3_LIBADD) +libdexbnf_la_CFLAGS = $(TOOLKIT_CFLAGS) $(LIBXML_CFLAGS) -I$(top_srcdir)/src + libdexbnf_la_LDFLAGS = \ -avoid-version \ -L$(top_srcdir)/src/.libs -lchrysacore \ @@ -56,8 +58,4 @@ devdir = $(includedir)/chrysalide/$(subdir) dev_HEADERS = $(libdexbnf_la_SOURCES:%c=) -AM_CPPFLAGS = $(LIBGTK_CFLAGS) $(LIBXML_CFLAGS) -I$(top_srcdir)/src - -AM_CFLAGS = $(DEBUG_CFLAGS) $(WARNING_FLAGS) $(COMPLIANCE_FLAGS) - SUBDIRS = $(PYTHON3_SUBDIRS) diff --git a/plugins/dexbnf/python/Makefile.am b/plugins/dexbnf/python/Makefile.am index 59668eb..95a8b0c 100644 --- a/plugins/dexbnf/python/Makefile.am +++ b/plugins/dexbnf/python/Makefile.am @@ -1,19 +1,14 @@ noinst_LTLIBRARIES = libdexbnfpython.la -libdexbnfpython_la_SOURCES = \ - demangler.h demangler.c \ +libdexbnfpython_la_SOURCES = \ + demangler.h demangler.c \ module.h module.c -libdexbnfpython_la_LDFLAGS = +libdexbnfpython_la_CFLAGS = $(TOOLKIT_CFLAGS) $(LIBXML_CFLAGS) $(LIBPYTHON_CFLAGS) $(LIBPYGOBJECT_CFLAGS) \ + -I$(top_srcdir)/src -DNO_IMPORT_PYGOBJECT devdir = $(includedir)/chrysalide/$(subdir) dev_HEADERS = $(libdexbnfpython_la_SOURCES:%c=) - - -AM_CPPFLAGS = $(LIBGTK_CFLAGS) $(LIBXML_CFLAGS) $(LIBPYTHON_CFLAGS) $(LIBPYGOBJECT_CFLAGS) \ - -I$(top_srcdir)/src -DNO_IMPORT_PYGOBJECT - -AM_CFLAGS = $(DEBUG_CFLAGS) $(WARNING_FLAGS) $(COMPLIANCE_FLAGS) diff --git a/plugins/dwarf/Makefile.am b/plugins/dwarf/Makefile.am index 5a8c9c9..c93e302 100644 --- a/plugins/dwarf/Makefile.am +++ b/plugins/dwarf/Makefile.am @@ -11,15 +11,15 @@ RUN_PATH = -Wl,-rpath,'$$ORIGIN/../chrysalide-libs' endif -libdwarf_la_SOURCES = \ - abbrev.h abbrev.c \ - checks.h checks.c \ - core.h core.c \ - def.h \ - die.h die.c \ - form.h form.c \ - format.h format.c \ - info.h info.c \ +libdwarf_la_SOURCES = \ + abbrev.h abbrev.c \ + checks.h checks.c \ + core.h core.c \ + def.h \ + die.h die.c \ + form.h form.c \ + format.h format.c \ + info.h info.c \ utils.h utils.c @@ -33,11 +33,13 @@ libdwarf_la_SOURCES = \ # info.h info.c \ # symbols.h symbols.c -libdwarf_la_LIBADD = \ - v2/libdwarfv2.la \ - v3/libdwarfv3.la \ +libdwarf_la_LIBADD = \ + v2/libdwarfv2.la \ + v3/libdwarfv3.la \ v4/libdwarfv4.la +libdwarf_la_CFLAGS = $(TOOLKIT_CFLAGS) $(LIBXML_CFLAGS) -I$(top_srcdir)/src + libdwarf_la_LDFLAGS = \ -avoid-version \ -L$(top_srcdir)/src/.libs -lchrysacore \ @@ -49,8 +51,4 @@ devdir = $(includedir)/chrysalide/$(subdir) dev_HEADERS = $(libdwarf_la_SOURCES:%c=) -AM_CPPFLAGS = $(LIBGTK_CFLAGS) $(LIBXML_CFLAGS) -I$(top_srcdir)/src - -AM_CFLAGS = $(DEBUG_CFLAGS) $(WARNING_FLAGS) $(COMPLIANCE_FLAGS) - SUBDIRS = v2 v3 v4 diff --git a/plugins/dwarf/info.h b/plugins/dwarf/info.h index a2fd961..6ce3e9a 100644 --- a/plugins/dwarf/info.h +++ b/plugins/dwarf/info.h @@ -29,6 +29,7 @@ #include +#include #include "format.h" diff --git a/plugins/dwarf/v2/Makefile.am b/plugins/dwarf/v2/Makefile.am index 1683ded..5664927 100644 --- a/plugins/dwarf/v2/Makefile.am +++ b/plugins/dwarf/v2/Makefile.am @@ -1,17 +1,12 @@ noinst_LTLIBRARIES = libdwarfv2.la -libdwarfv2_la_SOURCES = \ +libdwarfv2_la_SOURCES = \ checks.h checks.c -libdwarfv2_la_LDFLAGS = $(LIBGTK_LIBS) +libdwarfv2_la_CFLAGS = $(TOOLKIT_CFLAGS) $(LIBXML_CFLAGS) -I$(top_srcdir)/src devdir = $(includedir)/chrysalide/$(subdir) dev_HEADERS = $(libdwarfv2_la_SOURCES:%c=) - - -AM_CPPFLAGS = $(LIBGTK_CFLAGS) $(LIBXML_CFLAGS) -I$(top_srcdir)/src - -AM_CFLAGS = $(DEBUG_CFLAGS) $(WARNING_FLAGS) $(COMPLIANCE_FLAGS) diff --git a/plugins/dwarf/v3/Makefile.am b/plugins/dwarf/v3/Makefile.am index b821d2a..2078058 100644 --- a/plugins/dwarf/v3/Makefile.am +++ b/plugins/dwarf/v3/Makefile.am @@ -1,17 +1,12 @@ noinst_LTLIBRARIES = libdwarfv3.la -libdwarfv3_la_SOURCES = \ +libdwarfv3_la_SOURCES = \ checks.h checks.c -libdwarfv3_la_LDFLAGS = $(LIBGTK_LIBS) +libdwarfv3_la_CFLAGS = $(TOOLKIT_CFLAGS) $(LIBXML_CFLAGS) -I$(top_srcdir)/src devdir = $(includedir)/chrysalide/$(subdir) dev_HEADERS = $(libdwarfv3_la_SOURCES:%c=) - - -AM_CPPFLAGS = $(LIBGTK_CFLAGS) $(LIBXML_CFLAGS) -I$(top_srcdir)/src - -AM_CFLAGS = $(DEBUG_CFLAGS) $(WARNING_FLAGS) $(COMPLIANCE_FLAGS) diff --git a/plugins/dwarf/v4/Makefile.am b/plugins/dwarf/v4/Makefile.am index e06e8f5..ef13b2c 100644 --- a/plugins/dwarf/v4/Makefile.am +++ b/plugins/dwarf/v4/Makefile.am @@ -1,17 +1,12 @@ noinst_LTLIBRARIES = libdwarfv4.la -libdwarfv4_la_SOURCES = \ +libdwarfv4_la_SOURCES = \ checks.h checks.c -libdwarfv4_la_LDFLAGS = $(LIBGTK_LIBS) +libdwarfv4_la_CFLAGS = $(TOOLKIT_CFLAGS) $(LIBXML_CFLAGS) -I$(top_srcdir)/src devdir = $(includedir)/chrysalide/$(subdir) dev_HEADERS = $(libdwarfv4_la_SOURCES:%c=) - - -AM_CPPFLAGS = $(LIBGTK_CFLAGS) $(LIBXML_CFLAGS) -I$(top_srcdir)/src - -AM_CFLAGS = $(DEBUG_CFLAGS) $(WARNING_FLAGS) $(COMPLIANCE_FLAGS) diff --git a/plugins/elf/Makefile.am b/plugins/elf/Makefile.am index 880ae78..677cf93 100644 --- a/plugins/elf/Makefile.am +++ b/plugins/elf/Makefile.am @@ -37,23 +37,25 @@ PYTHON3_SUBDIRS = python endif -libelf_la_SOURCES = \ - core.h core.c \ - elf-int.h elf-int.c \ - elf_def.h \ - elf_def_arm.h \ - format.h format.c \ - dynamic.h dynamic.c \ - helper_arm.h helper_arm.c \ - loading.h loading.c \ - program.h program.c \ - section.h section.c \ - strings.h strings.c \ +libelf_la_SOURCES = \ + core.h core.c \ + elf-int.h elf-int.c \ + elf_def.h \ + elf_def_arm.h \ + format.h format.c \ + dynamic.h dynamic.c \ + helper_arm.h helper_arm.c \ + loading.h loading.c \ + program.h program.c \ + section.h section.c \ + strings.h strings.c \ symbols.h symbols.c -libelf_la_LIBADD = \ +libelf_la_LIBADD = \ $(PYTHON3_LIBADD) +libelf_la_CFLAGS = $(TOOLKIT_CFLAGS) $(LIBXML_CFLAGS) -I$(top_srcdir)/src + libelf_la_LDFLAGS = \ -avoid-version \ -L$(top_srcdir)/src/.libs -lchrysacore \ @@ -65,8 +67,4 @@ devdir = $(includedir)/chrysalide/$(subdir) dev_HEADERS = $(libelf_la_SOURCES:%c=) -AM_CPPFLAGS = $(LIBGTK_CFLAGS) $(LIBXML_CFLAGS) -I$(top_srcdir)/src - -AM_CFLAGS = $(DEBUG_CFLAGS) $(WARNING_FLAGS) $(COMPLIANCE_FLAGS) - SUBDIRS = $(PYTHON3_SUBDIRS) diff --git a/plugins/elf/loading.h b/plugins/elf/loading.h index e3016d4..270bb0b 100644 --- a/plugins/elf/loading.h +++ b/plugins/elf/loading.h @@ -26,7 +26,7 @@ #include -#include +#include #include "format.h" diff --git a/plugins/elf/python/Makefile.am b/plugins/elf/python/Makefile.am index 29b7d98..1d4f671 100644 --- a/plugins/elf/python/Makefile.am +++ b/plugins/elf/python/Makefile.am @@ -1,25 +1,20 @@ noinst_LTLIBRARIES = libelfpython.la -libelfpython_la_SOURCES = \ - constants.h constants.c \ - dynamic.h dynamic.c \ - elf_def.h elf_def.c \ - format.h format.c \ - module.h module.c \ - program.h program.c \ - section.h section.c \ +libelfpython_la_SOURCES = \ + constants.h constants.c \ + dynamic.h dynamic.c \ + elf_def.h elf_def.c \ + format.h format.c \ + module.h module.c \ + program.h program.c \ + section.h section.c \ translate.h translate.c -libelfpython_la_LDFLAGS = +libelfpython_la_CFLAGS = $(TOOLKIT_CFLAGS) $(LIBXML_CFLAGS) $(LIBPYTHON_CFLAGS) $(LIBPYGOBJECT_CFLAGS) \ + -I$(top_srcdir)/src -DNO_IMPORT_PYGOBJECT devdir = $(includedir)/chrysalide/$(subdir) dev_HEADERS = $(libelfpython_la_SOURCES:%c=) - - -AM_CPPFLAGS = $(LIBGTK_CFLAGS) $(LIBXML_CFLAGS) $(LIBPYTHON_CFLAGS) $(LIBPYGOBJECT_CFLAGS) \ - -I$(top_srcdir)/src -DNO_IMPORT_PYGOBJECT - -AM_CFLAGS = $(DEBUG_CFLAGS) $(WARNING_FLAGS) $(COMPLIANCE_FLAGS) diff --git a/plugins/elf/strings.h b/plugins/elf/strings.h index 902c2f8..3a07b96 100644 --- a/plugins/elf/strings.h +++ b/plugins/elf/strings.h @@ -29,7 +29,7 @@ #include -#include +#include diff --git a/plugins/elf/symbols.h b/plugins/elf/symbols.h index f4a6eec..c736d56 100644 --- a/plugins/elf/symbols.h +++ b/plugins/elf/symbols.h @@ -29,7 +29,7 @@ #include -#include +#include diff --git a/plugins/fmtp/Makefile.am b/plugins/fmtp/Makefile.am index f365c03..388adf3 100644 --- a/plugins/fmtp/Makefile.am +++ b/plugins/fmtp/Makefile.am @@ -11,10 +11,12 @@ RUN_PATH = -Wl,-rpath,'$$ORIGIN/../chrysalide-libs' endif -libfmtp_la_SOURCES = \ - def.h \ +libfmtp_la_SOURCES = \ + def.h \ parser.h parser.c +libfmtp_la_CFLAGS = $(TOOLKIT_CFLAGS) $(LIBXML_CFLAGS) -I$(top_srcdir)/src + libfmtp_la_LDFLAGS = \ -avoid-version \ -L$(top_srcdir)/src/.libs -lchrysacore \ @@ -24,8 +26,3 @@ libfmtp_la_LDFLAGS = \ devdir = $(includedir)/chrysalide/$(subdir) dev_HEADERS = $(libfmtp_la_SOURCES:%c=) - - -AM_CPPFLAGS = $(LIBGTK_CFLAGS) $(LIBXML_CFLAGS) -I$(top_srcdir)/src - -AM_CFLAGS = $(DEBUG_CFLAGS) $(WARNING_FLAGS) $(COMPLIANCE_FLAGS) diff --git a/plugins/itanium/Makefile.am b/plugins/itanium/Makefile.am index e1b2d9e..eee0da4 100644 --- a/plugins/itanium/Makefile.am +++ b/plugins/itanium/Makefile.am @@ -35,17 +35,19 @@ PYTHON3_SUBDIRS = python endif -libitanium_la_SOURCES = \ - abi.h abi.c \ - component-int.h \ - component.h component.c \ - context.h context.c \ - core.h core.c \ +libitanium_la_SOURCES = \ + abi.h abi.c \ + component-int.h \ + component.h component.c \ + context.h context.c \ + core.h core.c \ demangler.h demangler.c -libitanium_la_LIBADD = \ +libitanium_la_LIBADD = \ $(PYTHON3_LIBADD) +libitanium_la_CFLAGS = $(TOOLKIT_CFLAGS) $(LIBXML_CFLAGS) -I$(top_srcdir)/src + libitanium_la_LDFLAGS = \ -avoid-version \ -L$(top_srcdir)/src/.libs -lchrysacore \ @@ -57,8 +59,4 @@ devdir = $(includedir)/chrysalide/$(subdir) dev_HEADERS = $(libitanium_la_SOURCES:%c=) -AM_CPPFLAGS = $(LIBGTK_CFLAGS) $(LIBXML_CFLAGS) -I$(top_srcdir)/src - -AM_CFLAGS = $(DEBUG_CFLAGS) $(WARNING_FLAGS) $(COMPLIANCE_FLAGS) - SUBDIRS = $(PYTHON3_SUBDIRS) diff --git a/plugins/itanium/python/Makefile.am b/plugins/itanium/python/Makefile.am index b0a3da1..a00bda8 100644 --- a/plugins/itanium/python/Makefile.am +++ b/plugins/itanium/python/Makefile.am @@ -1,19 +1,14 @@ noinst_LTLIBRARIES = libitaniumpython.la -libitaniumpython_la_SOURCES = \ - demangler.h demangler.c \ +libitaniumpython_la_SOURCES = \ + demangler.h demangler.c \ module.h module.c -libitaniumpython_la_LDFLAGS = +libitaniumpython_la_CFLAGS = $(TOOLKIT_CFLAGS) $(LIBXML_CFLAGS) $(LIBPYTHON_CFLAGS) $(LIBPYGOBJECT_CFLAGS) \ + -I$(top_srcdir)/src -DNO_IMPORT_PYGOBJECT devdir = $(includedir)/chrysalide/$(subdir) dev_HEADERS = $(libitaniumpython_la_SOURCES:%c=) - - -AM_CPPFLAGS = $(LIBGTK_CFLAGS) $(LIBXML_CFLAGS) $(LIBPYTHON_CFLAGS) $(LIBPYGOBJECT_CFLAGS) \ - -I$(top_srcdir)/src -DNO_IMPORT_PYGOBJECT - -AM_CFLAGS = $(DEBUG_CFLAGS) $(WARNING_FLAGS) $(COMPLIANCE_FLAGS) diff --git a/plugins/java/Makefile.am b/plugins/java/Makefile.am index 0e40bfa..cd94927 100644 --- a/plugins/java/Makefile.am +++ b/plugins/java/Makefile.am @@ -16,14 +16,9 @@ libformatjava_la_SOURCES = \ # method.h method.c \ # pool.h pool.c -libformatjava_la_LDFLAGS = +libformatjava_la_CFLAGS = $(TOOLKIT_CFLAGS) $(LIBXML_CFLAGS) devdir = $(includedir)/chrysalide/$(subdir:src/%=%) dev_HEADERS = $(libformatjava_la_SOURCES:%c=) - - -AM_CPPFLAGS = $(LIBGTK_CFLAGS) $(LIBXML_CFLAGS) - -AM_CFLAGS = $(DEBUG_CFLAGS) $(WARNING_FLAGS) $(COMPLIANCE_FLAGS) diff --git a/plugins/javadesc/Makefile.am b/plugins/javadesc/Makefile.am index 7a79b99..8f91010 100644 --- a/plugins/javadesc/Makefile.am +++ b/plugins/javadesc/Makefile.am @@ -35,16 +35,18 @@ PYTHON3_SUBDIRS = python endif -libjavadesc_la_SOURCES = \ - context.h context.c \ - core.h core.c \ - demangler.h demangler.c \ - field.h field.c \ +libjavadesc_la_SOURCES = \ + context.h context.c \ + core.h core.c \ + demangler.h demangler.c \ + field.h field.c \ method.h method.c -libjavadesc_la_LIBADD = \ +libjavadesc_la_LIBADD = \ $(PYTHON3_LIBADD) +libjavadesc_la_CFLAGS = $(TOOLKIT_CFLAGS) $(LIBXML_CFLAGS) -I$(top_srcdir)/src + libjavadesc_la_LDFLAGS = \ -avoid-version \ -L$(top_srcdir)/src/.libs -lchrysacore \ @@ -56,8 +58,4 @@ devdir = $(includedir)/chrysalide/$(subdir) dev_HEADERS = $(libjavadesc_la_SOURCES:%c=) -AM_CPPFLAGS = $(LIBGTK_CFLAGS) $(LIBXML_CFLAGS) -I$(top_srcdir)/src - -AM_CFLAGS = $(DEBUG_CFLAGS) $(WARNING_FLAGS) $(COMPLIANCE_FLAGS) - SUBDIRS = $(PYTHON3_SUBDIRS) diff --git a/plugins/javadesc/python/Makefile.am b/plugins/javadesc/python/Makefile.am index aa7deeb..2b1a8eb 100644 --- a/plugins/javadesc/python/Makefile.am +++ b/plugins/javadesc/python/Makefile.am @@ -1,19 +1,14 @@ noinst_LTLIBRARIES = libjavadescpython.la -libjavadescpython_la_SOURCES = \ - demangler.h demangler.c \ +libjavadescpython_la_SOURCES = \ + demangler.h demangler.c \ module.h module.c -libjavadescpython_la_LDFLAGS = +libjavadescpython_la_CFLAGS = $(TOOLKIT_CFLAGS) $(LIBXML_CFLAGS) $(LIBPYTHON_CFLAGS) $(LIBPYGOBJECT_CFLAGS) \ + -I$(top_srcdir)/src -DNO_IMPORT_PYGOBJECT devdir = $(includedir)/chrysalide/$(subdir) dev_HEADERS = $(libjavadescpython_la_SOURCES:%c=) - - -AM_CPPFLAGS = $(LIBGTK_CFLAGS) $(LIBXML_CFLAGS) $(LIBPYTHON_CFLAGS) $(LIBPYGOBJECT_CFLAGS) \ - -I$(top_srcdir)/src -DNO_IMPORT_PYGOBJECT - -AM_CFLAGS = $(DEBUG_CFLAGS) $(WARNING_FLAGS) $(COMPLIANCE_FLAGS) diff --git a/plugins/libcsem/Makefile.am b/plugins/libcsem/Makefile.am index c55a2f8..a7a264f 100644 --- a/plugins/libcsem/Makefile.am +++ b/plugins/libcsem/Makefile.am @@ -15,10 +15,12 @@ RUN_PATH = -Wl,-rpath,'$$ORIGIN' endif -liblibcsem_la_SOURCES = \ - exit.h exit.c \ +liblibcsem_la_SOURCES = \ + exit.h exit.c \ semantic.h semantic.c +liblibcsem_la_CFLAGS = $(TOOLKIT_CFLAGS) $(LIBXML_CFLAGS) -I$(top_srcdir)/src + liblibcsem_la_LDFLAGS = \ -avoid-version \ -L$(top_srcdir)/src/.libs -lchrysacore \ @@ -29,8 +31,3 @@ liblibcsem_la_LDFLAGS = \ devdir = $(includedir)/chrysalide/$(subdir) dev_HEADERS = $(liblibcsem_la_SOURCES:%c=) - - -AM_CPPFLAGS = $(LIBGTK_CFLAGS) $(LIBXML_CFLAGS) -I$(top_srcdir)/src - -AM_CFLAGS = $(DEBUG_CFLAGS) $(WARNING_FLAGS) $(COMPLIANCE_FLAGS) diff --git a/plugins/lnxsyscalls/Makefile.am b/plugins/lnxsyscalls/Makefile.am index 9c5158f..21feaa5 100644 --- a/plugins/lnxsyscalls/Makefile.am +++ b/plugins/lnxsyscalls/Makefile.am @@ -14,17 +14,17 @@ RUN_PATH = -Wl,-rpath,'$$ORIGIN' endif -liblnxsyscalls_la_SOURCES = \ - collect.h collect.c \ - core.h core.c \ - db.h db.c \ - hops.h \ - hops_armv7.h hops_armv7.c \ - hunter.h hunter.c \ - syscall.h syscall.c \ +liblnxsyscalls_la_SOURCES = \ + collect.h collect.c \ + core.h core.c \ + db.h db.c \ + hops.h \ + hops_armv7.h hops_armv7.c \ + hunter.h hunter.c \ + syscall.h syscall.c \ writer.h writer.c -liblnxsyscalls_la_LIBADD = +liblnxsyscalls_la_CFLAGS = $(TOOLKIT_CFLAGS) $(LIBXML_CFLAGS) -I$(top_srcdir)/src liblnxsyscalls_la_LDFLAGS = \ -avoid-version \ @@ -44,10 +44,3 @@ dbdir = $(pluginsdatadir) devdir = $(includedir)/chrysalide/$(subdir) dev_HEADERS = $(liblnxsyscalls_la_SOURCES:%c=) - - -AM_CPPFLAGS = $(LIBGTK_CFLAGS) $(LIBXML_CFLAGS) -I$(top_srcdir)/src - -AM_CFLAGS = $(DEBUG_CFLAGS) $(WARNING_FLAGS) $(COMPLIANCE_FLAGS) - -SUBDIRS = diff --git a/plugins/lnxsyscalls/hunter.h b/plugins/lnxsyscalls/hunter.h index ed191f4..c2040eb 100644 --- a/plugins/lnxsyscalls/hunter.h +++ b/plugins/lnxsyscalls/hunter.h @@ -26,7 +26,7 @@ #include -#include +#include #include "hops.h" diff --git a/plugins/mobicore/Makefile.am b/plugins/mobicore/Makefile.am index 761108e..e8616c2 100644 --- a/plugins/mobicore/Makefile.am +++ b/plugins/mobicore/Makefile.am @@ -11,13 +11,15 @@ RUN_PATH = -Wl,-rpath,'$$ORIGIN/../chrysalide-libs' endif -libmobicore_la_SOURCES = \ - core.h core.c \ - mclf-def.h \ - mclf-int.h mclf-int.c \ - mclf.h mclf.c \ +libmobicore_la_SOURCES = \ + core.h core.c \ + mclf-def.h \ + mclf-int.h mclf-int.c \ + mclf.h mclf.c \ symbols.h symbols.c +libmobicore_la_CFLAGS = $(TOOLKIT_CFLAGS) $(LIBXML_CFLAGS) -I$(top_srcdir)/src + libmobicore_la_LDFLAGS = \ -avoid-version \ -L$(top_srcdir)/src/.libs -lchrysacore \ @@ -27,8 +29,3 @@ libmobicore_la_LDFLAGS = \ devdir = $(includedir)/chrysalide/$(subdir) dev_HEADERS = $(libmobicore_la_SOURCES:%c=) - - -AM_CPPFLAGS = $(LIBGTK_CFLAGS) $(LIBXML_CFLAGS) -I$(top_srcdir)/src - -AM_CFLAGS = $(DEBUG_CFLAGS) $(WARNING_FLAGS) $(COMPLIANCE_FLAGS) diff --git a/plugins/pe/Makefile.am b/plugins/pe/Makefile.am index 038b8c5..e9cd482 100644 --- a/plugins/pe/Makefile.am +++ b/plugins/pe/Makefile.am @@ -37,19 +37,21 @@ PYTHON3_SUBDIRS = python endif -libpe_la_SOURCES = \ - core.h core.c \ - pe-int.h pe-int.c \ - format.h format.c \ - pe_def.h \ - rich.h rich.c \ - routine.h routine.c \ - section.h section.c \ +libpe_la_SOURCES = \ + core.h core.c \ + pe-int.h pe-int.c \ + format.h format.c \ + pe_def.h \ + rich.h rich.c \ + routine.h routine.c \ + section.h section.c \ symbols.h symbols.c -libpe_la_LIBADD = \ +libpe_la_LIBADD = \ $(PYTHON3_LIBADD) +libpe_la_CFLAGS = $(TOOLKIT_CFLAGS) $(LIBXML_CFLAGS) -I$(top_srcdir)/src + libpe_la_LDFLAGS = \ -avoid-version \ -L$(top_srcdir)/src/.libs -lchrysacore \ @@ -61,8 +63,4 @@ devdir = $(includedir)/chrysalide/$(subdir) dev_HEADERS = $(libpe_la_SOURCES:%c=) -AM_CPPFLAGS = $(LIBGTK_CFLAGS) $(LIBXML_CFLAGS) -I$(top_srcdir)/src - -AM_CFLAGS = $(DEBUG_CFLAGS) $(WARNING_FLAGS) $(COMPLIANCE_FLAGS) - SUBDIRS = $(PYTHON3_SUBDIRS) diff --git a/plugins/pe/python/Makefile.am b/plugins/pe/python/Makefile.am index 18634a3..5949821 100644 --- a/plugins/pe/python/Makefile.am +++ b/plugins/pe/python/Makefile.am @@ -1,23 +1,17 @@ noinst_LTLIBRARIES = libpepython.la -libpepython_la_SOURCES = \ - constants.h constants.c \ - format.h format.c \ - module.h module.c \ - routine.h routine.c \ +libpepython_la_SOURCES = \ + constants.h constants.c \ + format.h format.c \ + module.h module.c \ + routine.h routine.c \ translate.h translate.c - -libpepython_la_LDFLAGS = +libpepython_la_CFLAGS = $(TOOLKIT_CFLAGS) $(LIBXML_CFLAGS) $(LIBPYTHON_CFLAGS) $(LIBPYGOBJECT_CFLAGS) \ + -I$(top_srcdir)/src -DNO_IMPORT_PYGOBJECT devdir = $(includedir)/chrysalide/$(subdir) dev_HEADERS = $(libpepython_la_SOURCES:%c=) - - -AM_CPPFLAGS = $(LIBGTK_CFLAGS) $(LIBXML_CFLAGS) $(LIBPYTHON_CFLAGS) $(LIBPYGOBJECT_CFLAGS) \ - -I$(top_srcdir)/src -DNO_IMPORT_PYGOBJECT - -AM_CFLAGS = $(DEBUG_CFLAGS) $(WARNING_FLAGS) $(COMPLIANCE_FLAGS) diff --git a/plugins/pe/symbols.h b/plugins/pe/symbols.h index bb260cd..5c4b796 100644 --- a/plugins/pe/symbols.h +++ b/plugins/pe/symbols.h @@ -29,7 +29,7 @@ #include -#include +#include diff --git a/plugins/pychrysalide/Makefile.am b/plugins/pychrysalide/Makefile.am index 6391c80..7928595 100644 --- a/plugins/pychrysalide/Makefile.am +++ b/plugins/pychrysalide/Makefile.am @@ -8,31 +8,50 @@ libdir = $(pluginslibdir) if BUILD_PYTHON_PACKAGE -RUN_PATH = -Wl,-rpath,'$$ORIGIN/chrysalide-libs' + RUN_PATH = -Wl,-rpath,'$$ORIGIN/chrysalide-libs' endif -pychrysalide_la_SOURCES = \ - access.h access.c \ - core.h core.c \ - helpers.h helpers.c \ - star.h star.c \ - strenum.h strenum.c \ - struct.h struct.c \ - weak.h weak.c - -pychrysalide_la_LIBADD = \ - analysis/libpychrysaanalysis.la \ - arch/libpychrysaarch.la \ - common/libpychrysacommon.la \ - core/libpychrysacore.la \ - debug/libpychrysadebug.la \ - format/libpychrysaformat.la \ - glibext/libpychrysaglibext.la \ - gtkext/libpychrysagtkext.la \ - gui/libpychrysagui.la \ - mangling/libpychrysamangling.la \ +if BUILD_GTK_SUPPORT + + GTKEXT_LIBADD = \ + gtkext/libpychrysagtkext.la + + GTKEXT_SUBDIR = \ + gtkext + + GUI_LIBADD = \ + gui/libpychrysagui.la + + GUI_SUBDIR = \ + gui + +endif + + +pychrysalide_la_SOURCES = \ + access.h access.c \ + core.h core.c \ + helpers.h helpers.c \ + star.h star.c \ + strenum.h strenum.c \ + struct.h struct.c + +AM_CFLAGS = $(LIBPYTHON_INTERPRETER_CFLAGS) $(LIBPYGOBJECT_CFLAGS) $(TOOLKIT_CFLAGS) $(LIBXML_CFLAGS) \ + -I$(top_srcdir)/src -DNO_IMPORT_PYGOBJECT + +pychrysalide_la_LIBADD = \ + analysis/libpychrysaanalysis.la \ + arch/libpychrysaarch.la \ + common/libpychrysacommon.la \ + core/libpychrysacore.la \ + debug/libpychrysadebug.la \ + format/libpychrysaformat.la \ + glibext/libpychrysaglibext.la \ + $(GTKEXT_LIBADD) \ + $(GUI_LIBADD) \ + mangling/libpychrysamangling.la \ plugins/libpychrysaplugins.la # -ldl: dladdr(), dlerror() @@ -49,9 +68,4 @@ devdir = $(includedir)/chrysalide/$(subdir) dev_HEADERS = $(pychrysalide_la_SOURCES:%c=) -AM_CPPFLAGS = $(LIBPYTHON_INTERPRETER_CFLAGS) $(LIBPYGOBJECT_CFLAGS) $(LIBGTK_CFLAGS) $(LIBXML_CFLAGS) \ - -I$(top_srcdir)/src -DNO_IMPORT_PYGOBJECT - -AM_CFLAGS = $(DEBUG_CFLAGS) $(WARNING_FLAGS) $(COMPLIANCE_FLAGS) - -SUBDIRS = analysis arch common core debug format glibext gtkext gui mangling plugins +SUBDIRS = analysis arch common core debug format glibext $(GTKEXT_SUBDIR) $(GUI_SUBDIR) mangling plugins 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 = 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 = diff --git a/plugins/pychrysalide/common/Makefile.am b/plugins/pychrysalide/common/Makefile.am index 3f1b0b6..7e1ba9e 100644 --- a/plugins/pychrysalide/common/Makefile.am +++ b/plugins/pychrysalide/common/Makefile.am @@ -1,25 +1,20 @@ noinst_LTLIBRARIES = libpychrysacommon.la -libpychrysacommon_la_SOURCES = \ - bits.h bits.c \ - fnv1a.h fnv1a.c \ - hex.h hex.c \ - leb128.h leb128.c \ - module.h module.c \ - packed.h packed.c \ - pathname.h pathname.c \ +libpychrysacommon_la_SOURCES = \ + bits.h bits.c \ + fnv1a.h fnv1a.c \ + hex.h hex.c \ + leb128.h leb128.c \ + module.h module.c \ + packed.h packed.c \ + pathname.h pathname.c \ pearson.h pearson.c -libpychrysacommon_la_LDFLAGS = +libpychrysacommon_la_CFLAGS = $(TOOLKIT_CFLAGS) $(LIBXML_CFLAGS) $(LIBPYTHON_INTERPRETER_CFLAGS) $(LIBPYGOBJECT_CFLAGS) \ + -I$(top_srcdir)/src -DNO_IMPORT_PYGOBJECT devdir = $(includedir)/chrysalide/$(subdir) dev_HEADERS = $(libpychrysacommon_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/core/Makefile.am b/plugins/pychrysalide/core/Makefile.am index 3433856..880823d 100644 --- a/plugins/pychrysalide/core/Makefile.am +++ b/plugins/pychrysalide/core/Makefile.am @@ -1,25 +1,20 @@ noinst_LTLIBRARIES = libpychrysacore.la -libpychrysacore_la_SOURCES = \ - constants.h constants.c \ - demanglers.h demanglers.c \ - global.h global.c \ - logs.h logs.c \ - module.h module.c \ - params.h params.c \ - processors.h processors.c \ +libpychrysacore_la_SOURCES = \ + constants.h constants.c \ + demanglers.h demanglers.c \ + global.h global.c \ + logs.h logs.c \ + module.h module.c \ + params.h params.c \ + processors.h processors.c \ queue.h queue.c -libpychrysacore_la_LDFLAGS = +libpychrysacore_la_CFLAGS = $(TOOLKIT_CFLAGS) $(LIBXML_CFLAGS) $(LIBPYTHON_INTERPRETER_CFLAGS) $(LIBPYGOBJECT_CFLAGS) \ + -I$(top_srcdir)/src -DNO_IMPORT_PYGOBJECT devdir = $(includedir)/chrysalide/$(subdir) dev_HEADERS = $(libpychrysacore_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/debug/Makefile.am b/plugins/pychrysalide/debug/Makefile.am index 24af93d..c653a6d 100644 --- a/plugins/pychrysalide/debug/Makefile.am +++ b/plugins/pychrysalide/debug/Makefile.am @@ -1,23 +1,14 @@ noinst_LTLIBRARIES = libpychrysadebug.la -libpychrysadebug_la_SOURCES = \ - debugger.h debugger.c \ +libpychrysadebug_la_SOURCES = \ + debugger.h debugger.c \ module.h module.c -libpychrysadebug_la_LIBADD = - -libpychrysadebug_la_LDFLAGS = +libpychrysadebug_la_CFLAGS = $(TOOLKIT_CFLAGS) $(LIBXML_CFLAGS) $(LIBPYTHON_INTERPRETER_CFLAGS) $(LIBPYGOBJECT_CFLAGS) \ + -I$(top_srcdir)/src -DNO_IMPORT_PYGOBJECT devdir = $(includedir)/chrysalide/$(subdir) dev_HEADERS = $(libpychrysadebug_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/format/Makefile.am b/plugins/pychrysalide/format/Makefile.am index d9858e8..2d691e7 100644 --- a/plugins/pychrysalide/format/Makefile.am +++ b/plugins/pychrysalide/format/Makefile.am @@ -1,30 +1,21 @@ noinst_LTLIBRARIES = libpychrysaformat.la -libpychrysaformat_la_SOURCES = \ - constants.h constants.c \ - executable.h executable.c \ - flat.h flat.c \ - format.h format.c \ - known.h known.c \ - module.h module.c \ - strsym.h strsym.c \ - symbol.h symbol.c \ +libpychrysaformat_la_SOURCES = \ + constants.h constants.c \ + executable.h executable.c \ + flat.h flat.c \ + format.h format.c \ + known.h known.c \ + module.h module.c \ + strsym.h strsym.c \ + symbol.h symbol.c \ symiter.h symiter.c -libpychrysaformat_la_LIBADD = - -libpychrysaformat_la_LDFLAGS = +libpychrysaformat_la_CFLAGS = $(TOOLKIT_CFLAGS) $(LIBXML_CFLAGS) $(LIBPYTHON_INTERPRETER_CFLAGS) $(LIBPYGOBJECT_CFLAGS) \ + -I$(top_srcdir)/src -DNO_IMPORT_PYGOBJECT devdir = $(includedir)/chrysalide/$(subdir) dev_HEADERS = $(libpychrysaformat_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/glibext/Makefile.am b/plugins/pychrysalide/glibext/Makefile.am index 5a9a539..ac41a86 100644 --- a/plugins/pychrysalide/glibext/Makefile.am +++ b/plugins/pychrysalide/glibext/Makefile.am @@ -1,30 +1,31 @@ noinst_LTLIBRARIES = libpychrysaglibext.la -libpychrysaglibext_la_SOURCES = \ - constants.h constants.c \ - binarycursor.h binarycursor.c \ - binportion.h binportion.c \ - buffercache.h buffercache.c \ - bufferline.h bufferline.c \ - bufferview.h bufferview.c \ - configuration.h configuration.c \ - linecursor.h linecursor.c \ - linegen.h linegen.c \ - loadedpanel.h loadedpanel.c \ - module.h module.c \ - named.h named.c \ +libpychrysaglibext_la_SOURCES = \ + constants.h constants.c \ + binarycursor.h binarycursor.c \ + binportion.h binportion.c \ + buffercache.h buffercache.c \ + bufferline.h bufferline.c \ + configuration.h configuration.c \ + linecursor.h linecursor.c \ + linegen.h linegen.c \ + module.h module.c \ singleton.h singleton.c -libpychrysaglibext_la_LDFLAGS = +if BUILD_GTK_SUPPORT +libpychrysaglibext_la_SOURCES += \ + bufferview.h bufferview.c \ + loadedpanel.h loadedpanel.c \ + named.h named.c -devdir = $(includedir)/chrysalide/$(subdir) +endif -dev_HEADERS = $(libpychrysaglibext_la_SOURCES:%c=) +libpychrysaglibext_la_CFLAGS = $(TOOLKIT_CFLAGS) $(LIBXML_CFLAGS) $(LIBPYTHON_INTERPRETER_CFLAGS) $(LIBPYGOBJECT_CFLAGS) \ + -I$(top_srcdir)/src -DNO_IMPORT_PYGOBJECT -AM_CPPFLAGS = $(LIBGTK_CFLAGS) $(LIBXML_CFLAGS) $(LIBPYTHON_INTERPRETER_CFLAGS) $(LIBPYGOBJECT_CFLAGS) \ - -I$(top_srcdir)/src -DNO_IMPORT_PYGOBJECT +devdir = $(includedir)/chrysalide/$(subdir) -AM_CFLAGS = $(DEBUG_CFLAGS) $(WARNING_FLAGS) $(COMPLIANCE_FLAGS) +dev_HEADERS = $(libpychrysaglibext_la_SOURCES:%c=) diff --git a/plugins/pychrysalide/glibext/buffercache.c b/plugins/pychrysalide/glibext/buffercache.c index 0cf3342..6ed516a 100644 --- a/plugins/pychrysalide/glibext/buffercache.c +++ b/plugins/pychrysalide/glibext/buffercache.c @@ -88,9 +88,13 @@ static PyObject *py_buffer_cache_get_line_flags(PyObject *, PyObject *); /* Retire une propriété particulière attachée à une ligne. */ static PyObject *py_buffer_cache_remove_line_flag(PyObject *, PyObject *); +#ifdef HAVE_GTK_SUPPORT + /* Retrouve une ligne au sein d'un tampon avec un indice. */ static PyObject *py_buffer_cache_find_line_by_index(PyObject *, PyObject *); +#endif + /* Avance autant que possible vers une ligne idéale. */ static PyObject *py_buffer_cache_look_for_flag(PyObject *, PyObject *); @@ -825,6 +829,9 @@ static PyObject *py_buffer_cache_remove_line_flag(PyObject *self, PyObject *args } +#ifdef HAVE_GTK_SUPPORT + + /****************************************************************************** * * * Paramètres : self = classe représentant un tampon de code. * @@ -883,6 +890,9 @@ static PyObject *py_buffer_cache_find_line_by_index(PyObject *self, PyObject *ar } +#endif + + /****************************************************************************** * * * Paramètres : self = classe représentant un tampon de code. * @@ -1157,7 +1167,9 @@ PyTypeObject *get_python_buffer_cache_type(void) BUFFER_CACHE_ADD_LINE_FLAG_METHOD, BUFFER_CACHE_GET_LINE_FLAGS_METHOD, BUFFER_CACHE_REMOVE_LINE_FLAG_METHOD, +#ifdef HAVE_GTK_SUPPORT BUFFER_CACHE_FIND_LINE_BY_INDEX_METHOD, +#endif BUFFER_CACHE_LOOK_FOR_FLAG_METHOD, { NULL } }; diff --git a/plugins/pychrysalide/glibext/constants.c b/plugins/pychrysalide/glibext/constants.c index 373d1bf..dc8d657 100644 --- a/plugins/pychrysalide/glibext/constants.c +++ b/plugins/pychrysalide/glibext/constants.c @@ -30,7 +30,9 @@ #include #include #include -#include +#ifdef HAVE_GTK_SUPPORT +# include +#endif #include "../helpers.h" @@ -471,6 +473,9 @@ int convert_to_rendering_tag_type(PyObject *arg, void *dst) } +#ifdef HAVE_GTK_SUPPORT + + /****************************************************************************** * * * Paramètres : type = type dont le dictionnaire est à compléter. * @@ -566,3 +571,6 @@ int convert_to_scroll_position_tweak(PyObject *arg, void *dst) return result; } + + +#endif diff --git a/plugins/pychrysalide/glibext/constants.h b/plugins/pychrysalide/glibext/constants.h index 342b7ad..0e2b442 100644 --- a/plugins/pychrysalide/glibext/constants.h +++ b/plugins/pychrysalide/glibext/constants.h @@ -55,12 +55,16 @@ bool define_line_segment_constants(PyTypeObject *); /* Tente de convertir en constante RenderingTagType. */ int convert_to_rendering_tag_type(PyObject *, void *); +#ifdef HAVE_GTK_SUPPORT + /* Définit les constantes relatives aux panneaux de chargement. */ bool define_loaded_panel_constants(PyTypeObject *); /* Tente de convertir en constante ScrollPositionTweak. */ int convert_to_scroll_position_tweak(PyObject *, void *); +#endif + #endif /* _PLUGINS_PYCHRYSALIDE_GLIBEXT_CONSTANTS_H */ diff --git a/plugins/pychrysalide/gtkext/Makefile.am b/plugins/pychrysalide/gtkext/Makefile.am index 3d15cb8..2e1260f 100644 --- a/plugins/pychrysalide/gtkext/Makefile.am +++ b/plugins/pychrysalide/gtkext/Makefile.am @@ -1,19 +1,20 @@ noinst_LTLIBRARIES = libpychrysagtkext.la -libpychrysagtkext_la_SOURCES = \ - blockdisplay.h blockdisplay.c \ - bufferdisplay.h bufferdisplay.c \ - displaypanel.h displaypanel.c \ - dockable.h dockable.c \ - easygtk.h easygtk.c \ - module.h module.c \ +libpychrysagtkext_la_SOURCES = \ + blockdisplay.h blockdisplay.c \ + bufferdisplay.h bufferdisplay.c \ + displaypanel.h displaypanel.c \ + dockable.h dockable.c \ + easygtk.h easygtk.c \ + module.h module.c \ named.h named.c -libpychrysagtkext_la_LIBADD = \ +libpychrysagtkext_la_LIBADD = \ graph/libpychrysagtkextgraph.la -libpychrysagtkext_la_LDFLAGS = +libpychrysagtkext_la_CFLAGS = $(LIBGTK_CFLAGS) $(LIBXML_CFLAGS) $(LIBPYTHON_INTERPRETER_CFLAGS) $(LIBPYGOBJECT_CFLAGS) \ + -I$(top_srcdir)/src -DNO_IMPORT_PYGOBJECT devdir = $(includedir)/chrysalide/$(subdir) @@ -21,10 +22,4 @@ devdir = $(includedir)/chrysalide/$(subdir) dev_HEADERS = $(libpychrysagtkext_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 = graph diff --git a/plugins/pychrysalide/gtkext/graph/Makefile.am b/plugins/pychrysalide/gtkext/graph/Makefile.am index abcdb88..25e3088 100644 --- a/plugins/pychrysalide/gtkext/graph/Makefile.am +++ b/plugins/pychrysalide/gtkext/graph/Makefile.am @@ -1,21 +1,16 @@ noinst_LTLIBRARIES = libpychrysagtkextgraph.la -libpychrysagtkextgraph_la_SOURCES = \ - constants.h constants.c \ - cluster.h cluster.c \ - edge.h edge.c \ +libpychrysagtkextgraph_la_SOURCES = \ + constants.h constants.c \ + cluster.h cluster.c \ + edge.h edge.c \ module.h module.c -libpychrysagtkextgraph_la_LDFLAGS = +libpychrysagtkextgraph_la_CFLAGS = $(LIBGTK_CFLAGS) $(LIBXML_CFLAGS) $(LIBPYTHON_INTERPRETER_CFLAGS) $(LIBPYGOBJECT_CFLAGS) \ + -I$(top_srcdir)/src -DNO_IMPORT_PYGOBJECT devdir = $(includedir)/chrysalide/$(subdir) dev_HEADERS = $(libpychrysagtkextgraph_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/gui/Makefile.am b/plugins/pychrysalide/gui/Makefile.am index 969701b..de2e888 100644 --- a/plugins/pychrysalide/gui/Makefile.am +++ b/plugins/pychrysalide/gui/Makefile.am @@ -1,18 +1,19 @@ noinst_LTLIBRARIES = libpychrysagui.la -libpychrysagui_la_SOURCES = \ - constants.h constants.c \ - item.h item.c \ - menubar.h menubar.c \ - module.h module.c \ +libpychrysagui_la_SOURCES = \ + constants.h constants.c \ + item.h item.c \ + menubar.h menubar.c \ + module.h module.c \ panel.h panel.c -libpychrysagui_la_LIBADD = \ - core/libpychrysaguicore.la \ +libpychrysagui_la_LIBADD = \ + core/libpychrysaguicore.la \ panels/libpychrysaguipanels.la -libpychrysagui_la_LDFLAGS = +libpychrysagui_la_CFLAGS = $(TOOLKIT_CFLAGS) $(LIBXML_CFLAGS) $(LIBPYTHON_INTERPRETER_CFLAGS) $(LIBPYGOBJECT_CFLAGS) \ + -I$(top_srcdir)/src -DNO_IMPORT_PYGOBJECT devdir = $(includedir)/chrysalide/$(subdir) @@ -20,9 +21,4 @@ devdir = $(includedir)/chrysalide/$(subdir) dev_HEADERS = $(libpychrysagui_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 = core panels diff --git a/plugins/pychrysalide/gui/core/Makefile.am b/plugins/pychrysalide/gui/core/Makefile.am index 7b3c796..8f49176 100644 --- a/plugins/pychrysalide/gui/core/Makefile.am +++ b/plugins/pychrysalide/gui/core/Makefile.am @@ -1,21 +1,16 @@ noinst_LTLIBRARIES = libpychrysaguicore.la -libpychrysaguicore_la_SOURCES = \ - global.h global.c \ - items.h items.c \ - module.h module.c \ +libpychrysaguicore_la_SOURCES = \ + global.h global.c \ + items.h items.c \ + module.h module.c \ panels.h panels.c -libpychrysaguicore_la_LDFLAGS = +libpychrysaguicore_la_CFLAGS = $(TOOLKIT_CFLAGS) $(LIBXML_CFLAGS) $(LIBPYTHON_INTERPRETER_CFLAGS) $(LIBPYGOBJECT_CFLAGS) \ + -I$(top_srcdir)/src -DNO_IMPORT_PYGOBJECT devdir = $(includedir)/chrysalide/$(subdir) dev_HEADERS = $(libpychrysaguicore_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/gui/panels/Makefile.am b/plugins/pychrysalide/gui/panels/Makefile.am index 351e34f..067c798 100644 --- a/plugins/pychrysalide/gui/panels/Makefile.am +++ b/plugins/pychrysalide/gui/panels/Makefile.am @@ -1,19 +1,14 @@ noinst_LTLIBRARIES = libpychrysaguipanels.la -libpychrysaguipanels_la_SOURCES = \ - module.h module.c \ +libpychrysaguipanels_la_SOURCES = \ + module.h module.c \ updating.h updating.c -libpychrysaguipanels_la_LDFLAGS = +libpychrysaguipanels_la_CFLAGS = $(TOOLKIT_CFLAGS) $(LIBXML_CFLAGS) $(LIBPYTHON_INTERPRETER_CFLAGS) $(LIBPYGOBJECT_CFLAGS) \ + -I$(top_srcdir)/src -DNO_IMPORT_PYGOBJECT devdir = $(includedir)/chrysalide/$(subdir) dev_HEADERS = $(libpychrysaguipanels_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/helpers.c b/plugins/pychrysalide/helpers.c index e0a3340..c289798 100644 --- a/plugins/pychrysalide/helpers.c +++ b/plugins/pychrysalide/helpers.c @@ -32,7 +32,9 @@ #include #include #include -#include +#ifdef HAVE_GTK_SUPPORT +# include +#endif #include @@ -1210,6 +1212,9 @@ int convert_to_gobject(PyObject *arg, void *dst) } +#ifdef HAVE_GTK_SUPPORT + + /****************************************************************************** * * * Paramètres : arg = argument quelconque à tenter de convertir. * @@ -1320,6 +1325,9 @@ int convert_to_gtk_container(PyObject *arg, void *dst) } +#endif + + /****************************************************************************** * * * Paramètres : color = couleur dans sa définition native à copier. * diff --git a/plugins/pychrysalide/helpers.h b/plugins/pychrysalide/helpers.h index 52a9370..6b2bddf 100644 --- a/plugins/pychrysalide/helpers.h +++ b/plugins/pychrysalide/helpers.h @@ -29,7 +29,9 @@ #include #include #include -#include +#ifdef HAVE_GTK_SUPPORT +# include +#endif @@ -236,12 +238,36 @@ int convert_to_gtype(PyObject *, void *); /* Tente de convertir en instance GObject. */ int convert_to_gobject(PyObject *, void *); +#ifdef HAVE_GTK_SUPPORT + /* Tente de convertir en instance de composant GTK. */ int convert_to_gtk_widget(PyObject *, void *); /* Tente de convertir en instance de conteneur GTK. */ int convert_to_gtk_container(PyObject *, void *); +#endif + + +#if !defined(HAVE_GTK_SUPPORT) && !defined(HOMEMADE_RGBA) + +# define HOMEMADE_RGBA + +/** + * Copie depuis /usr/include/gtk-3.0/gdk/gdkrgba.h + */ +typedef struct _GdkRGBA +{ + gdouble red; + gdouble green; + gdouble blue; + gdouble alpha; + +} GdkRGBA; + +#endif + + /* Construit un objet Python pour une couleur RGBA. */ PyObject *create_gdk_rgba(const GdkRGBA *); diff --git a/plugins/pychrysalide/mangling/Makefile.am b/plugins/pychrysalide/mangling/Makefile.am index c3294e0..640e420 100644 --- a/plugins/pychrysalide/mangling/Makefile.am +++ b/plugins/pychrysalide/mangling/Makefile.am @@ -1,23 +1,14 @@ noinst_LTLIBRARIES = libpychrysamangling.la -libpychrysamangling_la_SOURCES = \ - demangler.h demangler.c \ +libpychrysamangling_la_SOURCES = \ + demangler.h demangler.c \ module.h module.c -libpychrysamangling_la_LIBADD = - -libpychrysamangling_la_LDFLAGS = +libpychrysamangling_la_CFLAGS = $(TOOLKIT_CFLAGS) $(LIBXML_CFLAGS) $(LIBPYTHON_INTERPRETER_CFLAGS) $(LIBPYGOBJECT_CFLAGS) \ + -I$(top_srcdir)/src -DNO_IMPORT_PYGOBJECT devdir = $(includedir)/chrysalide/$(subdir) dev_HEADERS = $(libpychrysamangling_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/plugins/Makefile.am b/plugins/pychrysalide/plugins/Makefile.am index 51d1e35..bb9ed5d 100644 --- a/plugins/pychrysalide/plugins/Makefile.am +++ b/plugins/pychrysalide/plugins/Makefile.am @@ -1,25 +1,16 @@ noinst_LTLIBRARIES = libpychrysaplugins.la -libpychrysaplugins_la_SOURCES = \ - constants.h constants.c \ - plugin.h plugin.c \ - module.h module.c \ +libpychrysaplugins_la_SOURCES = \ + constants.h constants.c \ + plugin.h plugin.c \ + module.h module.c \ translate.h translate.c -libpychrysaplugins_la_LIBADD = - -libpychrysaplugins_la_LDFLAGS = +libpychrysaplugins_la_CFLAGS = $(TOOLKIT_CFLAGS) $(LIBXML_CFLAGS) $(LIBPYTHON_INTERPRETER_CFLAGS) $(LIBPYGOBJECT_CFLAGS) \ + -I$(top_srcdir)/src -DNO_IMPORT_PYGOBJECT devdir = $(includedir)/chrysalide/$(subdir) dev_HEADERS = $(libpychrysaplugins_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/plugins/plugin.c b/plugins/pychrysalide/plugins/plugin.c index bd9cdfe..a87d0a6 100644 --- a/plugins/pychrysalide/plugins/plugin.c +++ b/plugins/pychrysalide/plugins/plugin.c @@ -66,6 +66,8 @@ static bool py_plugin_module_manage_wrapper(GPluginModule *); /* Accompagne la fin du chargement des modules natifs. */ static void py_plugin_module_notify_plugins_loaded_wrapper(GPluginModule *, PluginAction); +#ifdef HAVE_GTK_SUPPORT + /* Complète une liste de resources pour thème. */ static void py_plugin_module_include_theme_wrapper(const GPluginModule *, PluginAction, gboolean, char ***, size_t *); @@ -75,6 +77,8 @@ static void py_plugin_module_notify_panel_creation_wrapper(const GPluginModule * /* Rend compte d'un affichage ou d'un retrait de panneau. */ static void py_plugin_module_notify_panel_docking_wrapper(const GPluginModule *, PluginAction, GPanelItem *, bool); +#endif + /* Procède à une opération liée à un contenu binaire. */ static void py_plugin_module_handle_binary_content_wrapper(const GPluginModule *, PluginAction, GBinContent *, wgroup_id_t, GtkStatusStack *); @@ -243,9 +247,11 @@ static void py_plugin_module_init_gclass(GPluginModuleClass *class, gpointer unu class->plugins_loaded = py_plugin_module_notify_plugins_loaded_wrapper; +#ifdef HAVE_GTK_SUPPORT class->include_theme = py_plugin_module_include_theme_wrapper; class->notify_panel = py_plugin_module_notify_panel_creation_wrapper; class->notify_docking = py_plugin_module_notify_panel_docking_wrapper; +#endif class->handle_content = py_plugin_module_handle_binary_content_wrapper; class->handle_loaded = py_plugin_module_handle_loaded_content_wrapper; @@ -553,6 +559,9 @@ static void py_plugin_module_notify_plugins_loaded_wrapper(GPluginModule *plugin } +#ifdef HAVE_GTK_SUPPORT + + /****************************************************************************** * * * Paramètres : plugin = greffon à manipuler. * @@ -783,6 +792,9 @@ static void py_plugin_module_notify_panel_docking_wrapper(const GPluginModule *p } +#endif + + /****************************************************************************** * * * Paramètres : plugin = greffon à manipuler. * @@ -1865,9 +1877,11 @@ PyTypeObject *get_python_plugin_module_type(void) static PyMethodDef py_plugin_module_methods[] = { PLUGIN_MODULE_MANAGE_WRAPPER, PLUGIN_MODULE_NOTIFY_PLUGINS_LOADED_WRAPPER, +#ifdef HAVE_GTK_SUPPORT PLUGIN_MODULE_INCLUDE_THEME_WRAPPER, PLUGIN_MODULE_ON_PANEL_CREATION_WRAPPER, PLUGIN_MODULE_ON_PANEL_DOCKING_WRAPPER, +#endif PLUGIN_MODULE_HANDLE_BINARY_CONTENT_WRAPPER, PLUGIN_MODULE_HANDLE_LOADED_CONTENT_WRAPPER, PLUGIN_MODULE_HANDLE_BINARY_FORMAT_ANALYSIS_WRAPPER, diff --git a/plugins/pychrysalide/weak.h b/plugins/pychrysalide/weak.h index 01885b0..767873f 100644 --- a/plugins/pychrysalide/weak.h +++ b/plugins/pychrysalide/weak.h @@ -26,10 +26,10 @@ #define _PLUGINS_PYCHRYSALIDE_WEAK_H -#include - +#include +#if 0 /* Démarre le suivi d'une nouvelle activité. */ activity_id_t gtk_status_stack_add_activity(GtkStatusStack *, const char *, unsigned long) __attribute__((weak)); @@ -44,7 +44,7 @@ void gtk_status_stack_update_activity_value(GtkStatusStack *, activity_id_t, uns /* Met fin au suivi d'une activité donnée. */ void gtk_status_stack_remove_activity(GtkStatusStack *, activity_id_t) __attribute__((weak)); - +#endif #endif /* _PLUGINS_PYCHRYSALIDE_WEAK_H */ diff --git a/plugins/readdex/Makefile.am b/plugins/readdex/Makefile.am index b21f855..b2099fb 100644 --- a/plugins/readdex/Makefile.am +++ b/plugins/readdex/Makefile.am @@ -15,13 +15,15 @@ RUN_PATH = -Wl,-rpath,'$$ORIGIN' endif -libreaddex_la_SOURCES = \ - class.h class.c \ - code.h code.c \ - header.h header.c \ - ids.h ids.c \ +libreaddex_la_SOURCES = \ + class.h class.c \ + code.h code.c \ + header.h header.c \ + ids.h ids.c \ reader.h reader.c +libreaddex_la_CFLAGS = $(TOOLKIT_CFLAGS) $(LIBXML_CFLAGS) -I$(top_srcdir)/src + libreaddex_la_LDFLAGS = \ -avoid-version \ -L$(top_srcdir)/src/.libs -lchrysacore \ @@ -33,8 +35,3 @@ libreaddex_la_LDFLAGS = \ devdir = $(includedir)/chrysalide/$(subdir) dev_HEADERS = $(libreaddex_la_SOURCES:%c=) - - -AM_CPPFLAGS = $(LIBGTK_CFLAGS) $(LIBXML_CFLAGS) -I$(top_srcdir)/src - -AM_CFLAGS = $(DEBUG_CFLAGS) $(WARNING_FLAGS) $(COMPLIANCE_FLAGS) diff --git a/plugins/readdex/class.h b/plugins/readdex/class.h index c7c34b0..a2c2bee 100644 --- a/plugins/readdex/class.h +++ b/plugins/readdex/class.h @@ -26,7 +26,7 @@ #include -#include +#include #include diff --git a/plugins/readdex/ids.h b/plugins/readdex/ids.h index 3a902cd..85495d1 100644 --- a/plugins/readdex/ids.h +++ b/plugins/readdex/ids.h @@ -26,7 +26,7 @@ #include -#include +#include #include diff --git a/plugins/readelf/Makefile.am b/plugins/readelf/Makefile.am index 0ca002b..7e662ee 100644 --- a/plugins/readelf/Makefile.am +++ b/plugins/readelf/Makefile.am @@ -15,13 +15,15 @@ RUN_PATH = -Wl,-rpath,'$$ORIGIN' endif -libreadelf_la_SOURCES = \ - header.h header.c \ - program.h program.c \ - reader.h reader.c \ - section.h section.c \ +libreadelf_la_SOURCES = \ + header.h header.c \ + program.h program.c \ + reader.h reader.c \ + section.h section.c \ strtab.h strtab.c +libreadelf_la_CFLAGS = $(TOOLKIT_CFLAGS) $(LIBXML_CFLAGS) -I$(top_srcdir)/src + libreadelf_la_LDFLAGS = \ -avoid-version \ -L$(top_srcdir)/src/.libs -lchrysacore \ @@ -29,11 +31,7 @@ libreadelf_la_LDFLAGS = \ -L$(top_srcdir)/plugins/fmtp/.libs -lfmtp \ $(RUN_PATH) + devdir = $(includedir)/chrysalide/$(subdir) dev_HEADERS = $(libreadelf_la_SOURCES:%c=) - - -AM_CPPFLAGS = $(LIBGTK_CFLAGS) $(LIBXML_CFLAGS) -I$(top_srcdir)/src - -AM_CFLAGS = $(DEBUG_CFLAGS) $(WARNING_FLAGS) $(COMPLIANCE_FLAGS) diff --git a/plugins/readmc/Makefile.am b/plugins/readmc/Makefile.am index fa13fb2..51a8552 100644 --- a/plugins/readmc/Makefile.am +++ b/plugins/readmc/Makefile.am @@ -15,14 +15,16 @@ RUN_PATH = -Wl,-rpath,'$$ORIGIN' endif -libreadmc_la_SOURCES = \ - header.h header.c \ - reader.h reader.c \ - text.h text.c \ - v21.h v21.c \ - v23.h v23.c \ +libreadmc_la_SOURCES = \ + header.h header.c \ + reader.h reader.c \ + text.h text.c \ + v21.h v21.c \ + v23.h v23.c \ v24.h v24.c +libreadmc_la_CFLAGS = $(TOOLKIT_CFLAGS) $(LIBXML_CFLAGS) -I$(top_srcdir)/src + libreadmc_la_LDFLAGS = \ -avoid-version \ -L$(top_srcdir)/src/.libs -lchrysacore \ @@ -34,8 +36,3 @@ libreadmc_la_LDFLAGS = \ devdir = $(includedir)/chrysalide/$(subdir) dev_HEADERS = $(libreadmc_la_SOURCES:%c=) - - -AM_CPPFLAGS = $(LIBGTK_CFLAGS) $(LIBXML_CFLAGS) -I$(top_srcdir)/src - -AM_CFLAGS = $(DEBUG_CFLAGS) $(WARNING_FLAGS) $(COMPLIANCE_FLAGS) diff --git a/plugins/ropgadgets/Makefile.am b/plugins/ropgadgets/Makefile.am index f23e054..bec050e 100644 --- a/plugins/ropgadgets/Makefile.am +++ b/plugins/ropgadgets/Makefile.am @@ -22,6 +22,8 @@ libropgadgets_la_SOURCES = \ plugin.h plugin.c \ select.h select.c +libropgadgets_la_CFLAGS = $(TOOLKIT_CFLAGS) $(LIBXML_CFLAGS) -I$(top_srcdir)/src + libropgadgets_la_LDFLAGS = \ -avoid-version \ -L$(top_srcdir)/src/.libs -lchrysacore \ @@ -32,8 +34,3 @@ libropgadgets_la_LDFLAGS = \ devdir = $(includedir)/chrysalide/$(subdir) dev_HEADERS = $(libropgadgets_la_SOURCES:%c=) - - -AM_CPPFLAGS = $(LIBGTK_CFLAGS) $(LIBXML_CFLAGS) -I$(top_srcdir)/src - -AM_CFLAGS = $(DEBUG_CFLAGS) $(WARNING_FLAGS) $(COMPLIANCE_FLAGS) diff --git a/plugins/winordinals/Makefile.am b/plugins/winordinals/Makefile.am index f9ff14f..592d38a 100644 --- a/plugins/winordinals/Makefile.am +++ b/plugins/winordinals/Makefile.am @@ -50,6 +50,8 @@ libwinordinals_la_SOURCES = \ libwinordinals_la_LIBADD = \ $(PYTHON3_LIBADD) +libwinordinals_la_CFLAGS = $(TOOLKIT_CFLAGS) $(LIBXML_CFLAGS) -I$(top_srcdir)/src + libwinordinals_la_LDFLAGS = \ -avoid-version \ -L$(top_srcdir)/src/.libs -lchrysacore \ @@ -62,8 +64,4 @@ devdir = $(includedir)/chrysalide/$(subdir) dev_HEADERS = $(libwinordinals_la_SOURCES:%c=) -AM_CPPFLAGS = $(LIBGTK_CFLAGS) $(LIBXML_CFLAGS) -I$(top_srcdir)/src - -AM_CFLAGS = $(DEBUG_CFLAGS) $(WARNING_FLAGS) $(COMPLIANCE_FLAGS) - SUBDIRS = $(PYTHON3_SUBDIRS) diff --git a/plugins/winordinals/assign.h b/plugins/winordinals/assign.h index 20310d2..e88ee28 100644 --- a/plugins/winordinals/assign.h +++ b/plugins/winordinals/assign.h @@ -25,7 +25,7 @@ #define _PLUGINS_WINORDINALS_ASSIGN_H -#include +#include #include diff --git a/plugins/winordinals/python/Makefile.am b/plugins/winordinals/python/Makefile.am index a5f17a4..201650d 100644 --- a/plugins/winordinals/python/Makefile.am +++ b/plugins/winordinals/python/Makefile.am @@ -4,15 +4,10 @@ noinst_LTLIBRARIES = libwinordinalspython.la libwinordinalspython_la_SOURCES = \ module.h module.c -libwinordinalspython_la_LDFLAGS = +libwinordinalspython_la_CFLAGS = $(TOOLKIT_CFLAGS) $(LIBXML_CFLAGS) $(LIBPYTHON_CFLAGS) $(LIBPYGOBJECT_CFLAGS) \ + -I$(top_srcdir)/src -DNO_IMPORT_PYGOBJECT devdir = $(includedir)/chrysalide/$(subdir) dev_HEADERS = $(libwinordinalspython_la_SOURCES:%c=) - - -AM_CPPFLAGS = $(LIBGTK_CFLAGS) $(LIBXML_CFLAGS) $(LIBPYTHON_CFLAGS) $(LIBPYGOBJECT_CFLAGS) \ - -I$(top_srcdir)/src -DNO_IMPORT_PYGOBJECT - -AM_CFLAGS = $(DEBUG_CFLAGS) $(WARNING_FLAGS) $(COMPLIANCE_FLAGS) diff --git a/plugins/yaml/Makefile.am b/plugins/yaml/Makefile.am index 9eee4ab..b5d0835 100644 --- a/plugins/yaml/Makefile.am +++ b/plugins/yaml/Makefile.am @@ -49,6 +49,8 @@ libyaml_la_SOURCES = \ libyaml_la_LIBADD = \ $(PYTHON3_LIBADD) +libyaml_la_CFLAGS = $(TOOLKIT_CFLAGS) $(LIBXML_CFLAGS) -I$(top_srcdir)/src + libyaml_la_LDFLAGS = \ -avoid-version \ -L$(top_srcdir)/src/.libs -lchrysacore \ @@ -60,8 +62,4 @@ devdir = $(includedir)/chrysalide/$(subdir) dev_HEADERS = $(libyaml_la_SOURCES:%c=) -AM_CPPFLAGS = $(LIBGTK_CFLAGS) $(LIBXML_CFLAGS) -I$(top_srcdir)/src - -AM_CFLAGS = $(DEBUG_CFLAGS) $(WARNING_FLAGS) $(COMPLIANCE_FLAGS) - SUBDIRS = $(PYTHON3_SUBDIRS) diff --git a/plugins/yaml/python/Makefile.am b/plugins/yaml/python/Makefile.am index 4662a8e..7faffb2 100644 --- a/plugins/yaml/python/Makefile.am +++ b/plugins/yaml/python/Makefile.am @@ -11,15 +11,10 @@ libyamlpython_la_SOURCES = \ scalar.h scalar.c \ tree.h tree.c -libyamlpython_la_LDFLAGS = +libyamlpython_la_CFLAGS = $(TOOLKIT_CFLAGS) $(LIBXML_CFLAGS) $(LIBPYTHON_CFLAGS) $(LIBPYGOBJECT_CFLAGS) \ + -I$(top_srcdir)/src -DNO_IMPORT_PYGOBJECT devdir = $(includedir)/chrysalide/$(subdir) dev_HEADERS = $(libyamlpython_la_SOURCES:%c=) - - -AM_CPPFLAGS = $(LIBGTK_CFLAGS) $(LIBXML_CFLAGS) $(LIBPYTHON_CFLAGS) $(LIBPYGOBJECT_CFLAGS) \ - -I$(top_srcdir)/src -DNO_IMPORT_PYGOBJECT - -AM_CFLAGS = $(DEBUG_CFLAGS) $(WARNING_FLAGS) $(COMPLIANCE_FLAGS) diff --git a/src/Makefile.am b/src/Makefile.am index 321b472..55a8f05 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -4,6 +4,9 @@ lib_LTLIBRARIES = libchrysacore.la bin_PROGRAMS = chrysalide chrysalide-hub +AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/intl + + ############################################################ # Bibliothèque dynamique @@ -17,27 +20,45 @@ GOBJECT_LEAKS_SOURCES = gleak.h gleak.c endif -libchrysacore_la_SOURCES = \ + +if BUILD_GTK_SUPPORT + + GTKEXT_LIBADD = \ + gtkext/libgtkext.la + + GTKEXT_SUBDIR = \ + gtkext + + GUI_LIBADD = \ + gui/libgui.la + + GUI_SUBDIR = \ + gui + +endif + + +libchrysacore_la_SOURCES = \ $(GOBJECT_LEAKS_SOURCES) # -ldl: dladdr(), dlerror() libchrysacore_la_LDFLAGS = \ -avoid-version -ldl \ - $(LIBGTK_LIBS) $(LIBXML_LIBS) \ + $(TOOLKIT_LIBS) $(LIBXML_LIBS) \ $(LIBSQLITE_LIBS) $(LIBARCHIVE_LIBS) \ $(LIBCURL_LIBS) -libchrysacore_la_LIBADD = \ - analysis/libanalysis.la \ - arch/libarch.la \ - common/libcommon.la \ - core/libcore.la \ - debug/libdebug.la \ - format/libformat.la \ - glibext/libglibext.la \ - gtkext/libgtkext.la \ - gui/libgui.la \ - mangling/libmangling.la \ +libchrysacore_la_LIBADD = \ + analysis/libanalysis.la \ + arch/libarch.la \ + common/libcommon.la \ + core/libcore.la \ + debug/libdebug.la \ + format/libformat.la \ + glibext/libglibext.la \ + $(GTKEXT_LIBADD) \ + $(GUI_LIBADD) \ + mangling/libmangling.la \ plugins/libplugins.la @@ -52,15 +73,11 @@ chrysalide_SOURCES = \ main.c -AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/intl $(LIBGTK_CFLAGS) $(LIBXML_CFLAGS) `pkg-config --cflags gthread-2.0` $(LIBPYTHON_CFLAGS) +chrysalide_CFLAGS = $(TOOLKIT_CFLAGS) $(LIBXML_CFLAGS) $(LIBPYTHON_CFLAGS) -AM_CFLAGS = $(DEBUG_CFLAGS) $(WARNING_FLAGS) $(COMPLIANCE_FLAGS) - - -chrysalide_LDFLAGS = $(LIBGTK_LIBS) -L/usr/X11R6/lib -ldl -lm $(LIBXML_LIBS) `pkg-config --libs gthread-2.0` $(LIBPYTHON_LIBS) $(LIBARCHIVE_LIBS) $(LIBSQLITE_LIBS) \ +chrysalide_LDFLAGS = $(TOOLKIT_LIBS) -L/usr/X11R6/lib -ldl -lm $(LIBXML_LIBS) $(LIBPYTHON_LIBS) $(LIBARCHIVE_LIBS) $(LIBSQLITE_LIBS) \ -L.libs -lchrysacore - chrysalide_LDADD = $(LIBINTL) @@ -74,8 +91,9 @@ EXTRA_chrysalide_hub_DEPENDENCIES = $(lib_LTLIBRARIES) chrysalide_hub_SOURCES = \ hub.c +chrysalide_hub_CFLAGS = $(TOOLKIT_CFLAGS) $(LIBXML_CFLAGS) -chrysalide_hub_LDFLAGS = $(LIBGTK_LIBS) -L.libs -lchrysacore +chrysalide_hub_LDFLAGS = $(TOOLKIT_LIBS) $(LIBXML_LIBS) -L.libs -lchrysacore @@ -85,4 +103,4 @@ chrysalide_hub_LDFLAGS = $(LIBGTK_LIBS) -L.libs -lchrysacore # glibext doit être traité en premier, à cause des marshals GLib -SUBDIRS = core glibext gtkext analysis arch format common debug gui mangling plugins +SUBDIRS = core glibext $(GTKEXT_SUBDIR) analysis arch format common debug $(GUI_SUBDIR) mangling plugins diff --git a/src/analysis/Makefile.am b/src/analysis/Makefile.am index 1dd83cb..39dd2dd 100644 --- a/src/analysis/Makefile.am +++ b/src/analysis/Makefile.am @@ -18,6 +18,8 @@ libanalysis_la_SOURCES = \ type.h type.c \ variable.h variable.c +libanalysis_la_CFLAGS = $(TOOLKIT_CFLAGS) $(LIBXML_CFLAGS) + libanalysis_la_LIBADD = \ contents/libanalysiscontents.la \ db/libanalysisdb.la \ @@ -26,16 +28,10 @@ libanalysis_la_LIBADD = \ storage/libanalysisstorage.la \ types/libanalysistypes.la -libanalysis_la_LDFLAGS = - devdir = $(includedir)/chrysalide/$(subdir:src/%=core/%) dev_HEADERS = $(libanalysis_la_SOURCES:%c=) -AM_CPPFLAGS = $(LIBGTK_CFLAGS) $(LIBXML_CFLAGS) - -AM_CFLAGS = $(DEBUG_CFLAGS) $(WARNING_FLAGS) $(COMPLIANCE_FLAGS) - SUBDIRS = contents db disass human storage types diff --git a/src/analysis/binary.c b/src/analysis/binary.c index 41f148a..0f0ff93 100644 --- a/src/analysis/binary.c +++ b/src/analysis/binary.c @@ -43,17 +43,18 @@ #include "../common/cpp.h" #include "../common/xdg.h" #include "../core/collections.h" +#include "../core/columns.h" #include "../core/logs.h" #include "../core/params.h" #include "../core/processors.h" #include "../format/known.h" #include "../glibext/gbinarycursor.h" -#include "../glibext/gloadedpanel.h" -#include "../gtkext/easygtk.h" -#include "../gtkext/gtkblockdisplay.h" -#include "../gtkext/gtkdisplaypanel.h" -#include "../gtkext/gtkgraphdisplay.h" -#include "../gtkext/hexdisplay.h" +#ifdef HAVE_GTK_SUPPORT +# include "../glibext/gloadedpanel.h" +# include "../gtkext/easygtk.h" +# include "../gtkext/gtkdisplaypanel.h" +# include "../gtkext/gtkgraphdisplay.h" +#endif @@ -168,6 +169,8 @@ static void on_binary_processor_changed(GArchProcessor *, GArchInstruction *, gb /* Fournit le désignation associée à l'élément chargé. */ static char *g_loaded_binary_describe(const GLoadedBinary *, bool); +#ifdef HAVE_GTK_SUPPORT + /* Détermine le nombre de vues disponibles pour un contenu. */ static unsigned int g_loaded_binary_count_views(const GLoadedBinary *); @@ -186,6 +189,8 @@ static unsigned int g_loaded_binary_get_view_index(GLoadedBinary *, GtkWidget *) /* Fournit toutes les options d'affichage pour un contenu. */ static GDisplayOptions *g_loaded_binary_get_display_options(const GLoadedBinary *, unsigned int); +#endif + /* ---------------------------------------------------------------------------------- */ @@ -231,6 +236,8 @@ static void g_loaded_binary_class_init(GLoadedBinaryClass *klass) loaded->describe = (describe_loaded_fc)g_loaded_binary_describe; +#ifdef HAVE_GTK_SUPPORT + loaded->count_views = (count_loaded_views_fc)g_loaded_binary_count_views; loaded->get_view_name = (get_loaded_view_name_fc)g_loaded_binary_get_view_name; loaded->build_def_view = (build_loaded_def_view_fc)g_loaded_binary_build_default_view; @@ -239,6 +246,8 @@ static void g_loaded_binary_class_init(GLoadedBinaryClass *klass) loaded->get_options = (get_loaded_options_fc)g_loaded_binary_get_display_options; +#endif + } @@ -1466,7 +1475,9 @@ static bool g_loaded_binary_analyze(GLoadedBinary *binary, bool connect, bool ca char *desc; /* Description humaine associée*/ bool has_virt; /* Présence de virtuel ? */ GProcContext *context; /* Contexte de suivi dédié */ +#ifdef HAVE_GTK_SUPPORT GWidthTracker *tracker; /* Gestionnaire de largeur */ +#endif /* Interprétation du format associé */ @@ -1512,12 +1523,16 @@ static bool g_loaded_binary_analyze(GLoadedBinary *binary, bool connect, bool ca { output_disassembly(binary, context, status, &binary->disass_cache); +#ifdef HAVE_GTK_SUPPORT + tracker = g_buffer_cache_get_width_tracker(binary->disass_cache); g_width_tracker_build_initial_cache(tracker, gid, status); g_object_unref(G_OBJECT(tracker)); +#endif + } g_object_unref(G_OBJECT(context)); @@ -1661,6 +1676,9 @@ static char *g_loaded_binary_describe(const GLoadedBinary *binary, bool full) } +#ifdef HAVE_GTK_SUPPORT + + /****************************************************************************** * * * Paramètres : binary = contenu chargé à consulter. * @@ -1872,3 +1890,6 @@ static GDisplayOptions *g_loaded_binary_get_display_options(const GLoadedBinary return result; } + + +#endif diff --git a/src/analysis/block-int.h b/src/analysis/block-int.h index faa0e1f..869042c 100644 --- a/src/analysis/block-int.h +++ b/src/analysis/block-int.h @@ -44,12 +44,16 @@ typedef int (* block_compare_links_fc) (const block_link_t *, const block_link_t /* Fournit les détails des origines d'un bloc de code donné. */ typedef block_link_t * (* block_get_links_fc) (const GCodeBlock *, const GBlockList *, size_t *); +#ifdef HAVE_GTK_SUPPORT + /* Fournit la représentation graphique d'un bloc de code. */ typedef GBufferView * (* block_build_view_fc) (const GCodeBlock *, segcnt_list *); /* Construit un ensemble d'indications pour bloc. */ typedef char *(* block_build_tooltip_fc) (const GCodeBlock *); +#endif + /* Description d'un bloc de code (instance) */ struct _GCodeBlock @@ -64,7 +68,9 @@ struct _GCodeBlock size_t index; /* Indice dans une liste */ size_t rank; /* Rang dans l'exécution */ +#ifdef HAVE_GTK_SUPPORT GBufferView *view; /* Représentation construite */ +#endif }; @@ -77,8 +83,10 @@ struct _GCodeBlockClass block_compare_links_fc cmp_links; /* Comparaison de liens */ block_get_links_fc get_src; /* Obtention des origines */ block_get_links_fc get_dest; /* Obtention des destinations */ +#ifdef HAVE_GTK_SUPPORT block_build_view_fc build; /* Construction d'une vue */ block_build_tooltip_fc build_tooltip; /* Construction d'une bulle */ +#endif }; diff --git a/src/analysis/block.c b/src/analysis/block.c index 119dc86..a60d7ed 100644 --- a/src/analysis/block.c +++ b/src/analysis/block.c @@ -139,7 +139,9 @@ static void g_code_block_init(GCodeBlock *block) block->index = (size_t)-1; block->rank = (size_t)-1; +#ifdef HAVE_GTK_SUPPORT block->view = NULL; +#endif } @@ -158,7 +160,9 @@ static void g_code_block_init(GCodeBlock *block) static void g_code_block_dispose(GCodeBlock *block) { +#ifdef HAVE_GTK_SUPPORT g_clear_object(&block->view); +#endif G_OBJECT_CLASS(g_code_block_parent_class)->dispose(G_OBJECT(block)); @@ -322,6 +326,9 @@ void g_code_block_set_rank(GCodeBlock *block, size_t rank) } +#ifdef HAVE_GTK_SUPPORT + + /****************************************************************************** * * * Paramètres : block = bloc de code à manipuler. * @@ -383,6 +390,9 @@ char *g_code_block_build_tooltip(const GCodeBlock *block) } +#endif + + /* ---------------------------------------------------------------------------------- */ /* DEFINITION DE LIAISONS ENTRE BLOCS DE CODE */ diff --git a/src/analysis/block.h b/src/analysis/block.h index 63f0be0..08cfeb4 100644 --- a/src/analysis/block.h +++ b/src/analysis/block.h @@ -33,7 +33,9 @@ #include "../arch/instruction.h" #include "../arch/vmpa.h" #include "../common/bits.h" -#include "../glibext/bufferview.h" +#ifdef HAVE_GTK_SUPPORT +# include "../glibext/bufferview.h" +#endif #include "../glibext/linesegment.h" @@ -74,12 +76,16 @@ size_t g_code_block_get_rank(const GCodeBlock *); /* Définit le rang du bloc de code dans le flot d'exécution. */ void g_code_block_set_rank(GCodeBlock *, size_t); +#ifdef HAVE_GTK_SUPPORT + /* Fournit la représentation graphique d'un bloc de code. */ GBufferView *g_code_block_get_view(GCodeBlock *, segcnt_list *); /* Construit un ensemble d'indications pour bloc. */ char *g_code_block_build_tooltip(const GCodeBlock *); +#endif + /* ------------------- DEFINITION DE LIAISONS ENTRE BLOCS DE CODE ------------------- */ diff --git a/src/analysis/contents/Makefile.am b/src/analysis/contents/Makefile.am index 66e3cac..1263f42 100644 --- a/src/analysis/contents/Makefile.am +++ b/src/analysis/contents/Makefile.am @@ -8,18 +8,9 @@ libanalysiscontents_la_SOURCES = \ memory.h memory.c \ restricted.h restricted.c -libanalysiscontents_la_LIBADD = - -libanalysiscontents_la_LDFLAGS = +libanalysiscontents_la_CFLAGS = $(TOOLKIT_CFLAGS) devdir = $(includedir)/chrysalide/$(subdir:src/%=core/%) dev_HEADERS = $(libanalysiscontents_la_SOURCES:%c=) - - -AM_CPPFLAGS = $(LIBGTK_CFLAGS) $(LIBXML_CFLAGS) - -AM_CFLAGS = $(DEBUG_CFLAGS) $(WARNING_FLAGS) $(COMPLIANCE_FLAGS) - -SUBDIRS = diff --git a/src/analysis/db/Makefile.am b/src/analysis/db/Makefile.am index 8f8242c..b9325e0 100644 --- a/src/analysis/db/Makefile.am +++ b/src/analysis/db/Makefile.am @@ -21,20 +21,16 @@ libanalysisdb_la_SOURCES = \ server.h server.c \ snapshot.h snapshot.c +libanalysisdb_la_CFLAGS = $(TOOLKIT_CFLAGS) $(LIBXML_CFLAGS) $(LIBARCHIVE_CFLAGS) $(LIBSQLITE_CFLAGS) $(LIBSSL_CFLAGS) + libanalysisdb_la_LIBADD = \ items/libanalysisdbitems.la \ misc/libanalysisdbmisc.la -libanalysisdb_la_LDFLAGS = $(LIBSSL_LIBS) - devdir = $(includedir)/chrysalide/$(subdir:src/%=core/%) dev_HEADERS = $(libanalysisdb_la_SOURCES:%c=) -AM_CPPFLAGS = $(LIBGTK_CFLAGS) $(LIBXML_CFLAGS) $(LIBARCHIVE_CFLAGS) $(LIBSQLITE_CFLAGS) $(LIBSSL_CFLAGS) - -AM_CFLAGS = $(DEBUG_CFLAGS) $(WARNING_FLAGS) $(COMPLIANCE_FLAGS) - SUBDIRS = items misc diff --git a/src/analysis/db/items/Makefile.am b/src/analysis/db/items/Makefile.am index b9ce117..f8f70d5 100644 --- a/src/analysis/db/items/Makefile.am +++ b/src/analysis/db/items/Makefile.am @@ -7,18 +7,9 @@ libanalysisdbitems_la_SOURCES = \ move.h move.c \ switcher.h switcher.c -libanalysisdbitems_la_LIBADD = - -libanalysisdbitems_la_LDFLAGS = +libanalysisdbitems_la_CFLAGS = $(TOOLKIT_CFLAGS) $(LIBXML_CFLAGS) $(LIBSQLITE_CFLAGS) devdir = $(includedir)/chrysalide/$(subdir:src/%=core/%) dev_HEADERS = $(libanalysisdbitems_la_SOURCES:%c=) - - -AM_CPPFLAGS = $(LIBGTK_CFLAGS) $(LIBXML_CFLAGS) $(LIBARCHIVE_CFLAGS) $(LIBSQLITE_CFLAGS) - -AM_CFLAGS = $(DEBUG_CFLAGS) $(WARNING_FLAGS) $(COMPLIANCE_FLAGS) - -SUBDIRS = diff --git a/src/analysis/db/items/comment.c b/src/analysis/db/items/comment.c index da7a4c0..fb27f60 100644 --- a/src/analysis/db/items/comment.c +++ b/src/analysis/db/items/comment.c @@ -39,9 +39,9 @@ #include "../../human/asm/lang.h" #include "../../../common/array.h" #include "../../../common/extstr.h" +#include "../../../core/columns.h" #include "../../../glibext/gbinarycursor.h" #include "../../../glibext/linegen-int.h" -#include "../../../gtkext/gtkblockdisplay.h" diff --git a/src/analysis/db/items/move.c b/src/analysis/db/items/move.c index af1c8c1..d009456 100644 --- a/src/analysis/db/items/move.c +++ b/src/analysis/db/items/move.c @@ -35,9 +35,13 @@ #include "../collection-int.h" #include "../item-int.h" -#include "../../../gui/core/global.h" +#ifdef HAVE_GTK_SUPPORT +# include "../../../gui/core/global.h" +#endif #include "../../../glibext/gbinarycursor.h" -#include "../../../glibext/gloadedpanel.h" +#ifdef HAVE_GTK_SUPPORT +# include "../../../glibext/gloadedpanel.h" +#endif @@ -410,6 +414,8 @@ static char *g_db_move_build_label(GDbMove *move) static bool g_db_move_run(const GDbMove *move, GLineCursor *cursor) { +#ifdef HAVE_GTK_SUPPORT + GLoadedPanel *panel; /* Afficheur effectif de code */ typedef struct _move_params @@ -465,6 +471,8 @@ static bool g_db_move_run(const GDbMove *move, GLineCursor *cursor) if (panel != NULL) g_object_unref(G_OBJECT(panel)); +#endif + return true; } diff --git a/src/analysis/db/misc/Makefile.am b/src/analysis/db/misc/Makefile.am index 6d4af6c..fc3cab2 100644 --- a/src/analysis/db/misc/Makefile.am +++ b/src/analysis/db/misc/Makefile.am @@ -6,18 +6,7 @@ libanalysisdbmisc_la_SOURCES = \ snapshot.h snapshot.c \ timestamp.h timestamp.c -libanalysisdbmisc_la_LIBADD = - -libanalysisdbmisc_la_LDFLAGS = - devdir = $(includedir)/chrysalide/$(subdir:src/%=core/%) dev_HEADERS = $(libanalysisdbmisc_la_SOURCES:%c=) - - -AM_CPPFLAGS = $(LIBGTK_CFLAGS) $(LIBXML_CFLAGS) $(LIBARCHIVE_CFLAGS) $(LIBSQLITE_CFLAGS) - -AM_CFLAGS = $(DEBUG_CFLAGS) $(WARNING_FLAGS) $(COMPLIANCE_FLAGS) - -SUBDIRS = diff --git a/src/analysis/disass/Makefile.am b/src/analysis/disass/Makefile.am index 5631468..fe840c6 100644 --- a/src/analysis/disass/Makefile.am +++ b/src/analysis/disass/Makefile.am @@ -15,14 +15,9 @@ libanalysisdisass_la_SOURCES = \ rank.h rank.c \ routines.h routines.c -libanalysisdisass_la_LDFLAGS = +libanalysisdisass_la_CFLAGS = $(TOOLKIT_CFLAGS) $(LIBXML_CFLAGS) devdir = $(includedir)/chrysalide/$(subdir:src/%=core/%) dev_HEADERS = $(libanalysisdisass_la_SOURCES:%c=) - - -AM_CPPFLAGS = $(LIBGTK_CFLAGS) $(LIBXML_CFLAGS) - -AM_CFLAGS = $(DEBUG_CFLAGS) $(WARNING_FLAGS) $(COMPLIANCE_FLAGS) diff --git a/src/analysis/disass/area.h b/src/analysis/disass/area.h index 12c4617..0817419 100644 --- a/src/analysis/disass/area.h +++ b/src/analysis/disass/area.h @@ -30,7 +30,7 @@ #include "../../format/preload.h" #include "../../format/symbol.h" #include "../../glibext/delayed.h" -#include "../../gtkext/gtkstatusstack.h" +#include "../../glibext/notifier.h" diff --git a/src/analysis/disass/block.c b/src/analysis/disass/block.c index ea1441f..973fd56 100644 --- a/src/analysis/disass/block.c +++ b/src/analysis/disass/block.c @@ -34,9 +34,9 @@ #include "../block-int.h" #include "../../arch/instructions/raw.h" #include "../../common/extstr.h" +#include "../../core/columns.h" #include "../../core/params.h" #include "../../glibext/gbinarycursor.h" -#include "../../gtkext/gtkblockdisplay.h" @@ -88,12 +88,16 @@ static block_link_t *g_basic_block_get_sources(const GBasicBlock *, const GBlock /* Fournit les détails des destinations de bloc de code. */ static block_link_t *g_basic_block_get_destinations(const GBasicBlock *, const GBlockList *, size_t *); +#ifdef HAVE_GTK_SUPPORT + /* Fournit la représentation graphique d'un bloc de code. */ static GBufferView *g_basic_block_build_view(const GBasicBlock *, segcnt_list *); /* Construit un ensemble d'indications pour bloc. */ static char *g_basic_block_build_tooltip(const GBasicBlock *); +#endif + /* ---------------------------------------------------------------------------------- */ @@ -133,8 +137,10 @@ static void g_basic_block_class_init(GBasicBlockClass *class) block->cmp_links = (block_compare_links_fc)g_basic_block_compare_links; block->get_src = (block_get_links_fc)g_basic_block_get_sources; block->get_dest = (block_get_links_fc)g_basic_block_get_destinations; +#ifdef HAVE_GTK_SUPPORT block->build = (block_build_view_fc)g_basic_block_build_view; block->build_tooltip = (block_build_tooltip_fc)g_basic_block_build_tooltip; +#endif } @@ -466,6 +472,9 @@ static block_link_t *g_basic_block_get_destinations(const GBasicBlock *block, co } +#ifdef HAVE_GTK_SUPPORT + + /****************************************************************************** * * * Paramètres : block = bloc de code à manipuler. * @@ -856,6 +865,9 @@ static char *g_basic_block_build_tooltip(const GBasicBlock *block) } +#endif + + /****************************************************************************** * * * Paramètres : block = bloc d'instructions à consulter. * diff --git a/src/analysis/disass/disassembler.c b/src/analysis/disass/disassembler.c index 4056c59..7ea127d 100644 --- a/src/analysis/disass/disassembler.c +++ b/src/analysis/disass/disassembler.c @@ -38,11 +38,11 @@ #include "routines.h" #include "../human/asm/lang.h" #include "../../arch/storage.h" +#include "../../core/columns.h" #include "../../core/global.h" #include "../../core/params.h" #include "../../core/nproc.h" #include "../../glibext/generators/prologue.h" -#include "../../gtkext/gtkblockdisplay.h" #include "../../plugins/pglist.h" @@ -391,7 +391,9 @@ void output_disassembly(GLoadedBinary *binary, GProcContext *context, GtkStatusS GBinContent *content; /* Contenu bianire manipulé */ GCodingLanguage *lang; /* Langage de sortie préféré */ int offset; /* Décalage des étiquettes */ +#ifdef HAVE_GTK_SUPPORT GWidthTracker *tracker; /* Gestionnaire de largeurs */ +#endif char **text; /* Contenu brute à imprimer */ char *desc; /* Désignation du binaire */ const gchar *checksum; /* Identifiant de binaire */ @@ -409,9 +411,11 @@ void output_disassembly(GLoadedBinary *binary, GProcContext *context, GtkStatusS g_generic_config_get_value(get_main_configuration(), MPK_LABEL_OFFSET, &offset); +#ifdef HAVE_GTK_SUPPORT tracker = g_buffer_cache_get_width_tracker(*cache); g_width_tracker_set_column_min_width(tracker, DLC_ASSEMBLY_LABEL, offset); g_object_unref(G_OBJECT(tracker)); +#endif g_buffer_cache_wlock(*cache); diff --git a/src/analysis/disass/fetch.h b/src/analysis/disass/fetch.h index 7afabc6..44b5424 100644 --- a/src/analysis/disass/fetch.h +++ b/src/analysis/disass/fetch.h @@ -27,7 +27,7 @@ #include "../binary.h" #include "../../glibext/delayed.h" -#include "../../gtkext/gtkstatusstack.h" +#include "../../glibext/notifier.h" diff --git a/src/analysis/disass/instructions.h b/src/analysis/disass/instructions.h index c0cd4ac..24fe982 100644 --- a/src/analysis/disass/instructions.h +++ b/src/analysis/disass/instructions.h @@ -28,7 +28,7 @@ #include "../routine.h" #include "../../arch/processor.h" #include "../../format/executable.h" -#include "../../gtkext/gtkstatusstack.h" +#include "../../glibext/notifier.h" diff --git a/src/analysis/disass/limit.c b/src/analysis/disass/limit.c index 1e460e0..2caefd6 100644 --- a/src/analysis/disass/limit.c +++ b/src/analysis/disass/limit.c @@ -76,7 +76,7 @@ void compute_routine_limit(GBinSymbol *symbol, const vmpa2t *next, GArchProcesso /* Dans tous les cas, on va se référer à la portion contenante... */ - portion = g_binary_portion_find_at_addr(portions, &addr, (GdkRectangle []) { { 0 } }); + portion = g_binary_portion_find_at_addr(portions, &addr); assert(portion != NULL); range = g_binary_portion_get_range(portion); diff --git a/src/analysis/disass/output.h b/src/analysis/disass/output.h index 20729d2..2213840 100644 --- a/src/analysis/disass/output.h +++ b/src/analysis/disass/output.h @@ -29,7 +29,7 @@ #include "../human/lang.h" #include "../../format/preload.h" #include "../../glibext/buffercache.h" -#include "../../gtkext/gtkstatusstack.h" +#include "../../glibext/notifier.h" diff --git a/src/analysis/disass/routines.h b/src/analysis/disass/routines.h index 9a2c308..af8e814 100644 --- a/src/analysis/disass/routines.h +++ b/src/analysis/disass/routines.h @@ -27,7 +27,7 @@ #include "../binary.h" #include "../routine.h" -#include "../../gtkext/gtkstatusstack.h" +#include "../../glibext/notifier.h" diff --git a/src/analysis/human/Makefile.am b/src/analysis/human/Makefile.am index bd5fa9f..a8e98e6 100644 --- a/src/analysis/human/Makefile.am +++ b/src/analysis/human/Makefile.am @@ -6,19 +6,15 @@ libanalysishuman_la_SOURCES = \ lang-int.h \ lang.h lang.c +libanalysishuman_la_CFLAGS = $(TOOLKIT_CFLAGS) + libanalysishuman_la_LIBADD = \ asm/libanalysishumanasm.la -libanalysishuman_la_LDFLAGS = - devdir = $(includedir)/chrysalide/$(subdir:src/%=core/%) dev_HEADERS = $(libanalysishuman_la_SOURCES:%c=) -AM_CPPFLAGS = $(LIBGTK_CFLAGS) $(LIBXML_CFLAGS) $(LIBARCHIVE_CFLAGS) $(LIBSQLITE_CFLAGS) - -AM_CFLAGS = $(DEBUG_CFLAGS) $(WARNING_FLAGS) $(COMPLIANCE_FLAGS) - SUBDIRS = asm diff --git a/src/analysis/human/asm/Makefile.am b/src/analysis/human/asm/Makefile.am index 9dbf717..a3ab6a4 100644 --- a/src/analysis/human/asm/Makefile.am +++ b/src/analysis/human/asm/Makefile.am @@ -5,18 +5,9 @@ noinst_LTLIBRARIES = libanalysishumanasm.la libanalysishumanasm_la_SOURCES = \ lang.h lang.c -libanalysishumanasm_la_LIBADD = - -libanalysishumanasm_la_LDFLAGS = +libanalysishumanasm_la_CFLAGS = $(TOOLKIT_CFLAGS) devdir = $(includedir)/chrysalide/$(subdir:src/%=core/%) dev_HEADERS = $(libanalysishumanasm_la_SOURCES:%c=) - - -AM_CPPFLAGS = $(LIBGTK_CFLAGS) $(LIBXML_CFLAGS) $(LIBARCHIVE_CFLAGS) $(LIBSQLITE_CFLAGS) - -AM_CFLAGS = $(DEBUG_CFLAGS) $(WARNING_FLAGS) $(COMPLIANCE_FLAGS) - -SUBDIRS = diff --git a/src/analysis/loaded-int.h b/src/analysis/loaded-int.h index 62534a6..f91e85d 100644 --- a/src/analysis/loaded-int.h +++ b/src/analysis/loaded-int.h @@ -48,6 +48,8 @@ typedef bool (* analyze_loaded_fc) (GLoadedContent *, bool, bool, wgroup_id_t, G /* Fournit le désignation associée à l'élément chargé. */ typedef char * (* describe_loaded_fc) (const GLoadedContent *, bool); +#ifdef HAVE_GTK_SUPPORT + /* Détermine le nombre de vues disponibles pour un contenu. */ typedef unsigned int (* count_loaded_views_fc) (const GLoadedContent *); @@ -66,6 +68,8 @@ typedef unsigned int (* get_loaded_view_index_fc) (GLoadedContent *, GtkWidget * /* Fournit toutes les options d'affichage pour un contenu. */ typedef GDisplayOptions * (* get_loaded_options_fc) (const GLoadedContent *, unsigned int); +#endif + /* Accès à un contenu binaire quelconque (instance) */ struct _GLoadedContent @@ -91,6 +95,8 @@ struct _GLoadedContentClass describe_loaded_fc describe; /* Description de contenu */ +#ifdef HAVE_GTK_SUPPORT + count_loaded_views_fc count_views; /* Compteur de vues */ get_loaded_view_name_fc get_view_name; /* Désignation d'une vue donnée*/ build_loaded_def_view_fc build_def_view;/* Mise en place initiale */ @@ -99,6 +105,8 @@ struct _GLoadedContentClass get_loaded_options_fc get_options; /* Obtention de liste d'options*/ +#endif + /* Signaux */ void (* analyzed) (GLoadedContent *, gboolean); diff --git a/src/analysis/loaded.c b/src/analysis/loaded.c index 9ec2f74..02caeff 100644 --- a/src/analysis/loaded.c +++ b/src/analysis/loaded.c @@ -32,8 +32,10 @@ #include "../core/global.h" #include "../core/queue.h" #include "../glibext/chrysamarshal.h" -#include "../glibext/gloadedpanel.h" -#include "../glibext/named-int.h" +#ifdef HAVE_GTK_SUPPORT +# include "../glibext/gloadedpanel.h" +# include "../glibext/named-int.h" +#endif #include "../glibext/seq.h" #include "../plugins/pglist.h" @@ -60,9 +62,13 @@ static void g_loaded_content_class_init(GLoadedContentClass *); /* Initialise un contenu chargé. */ static void g_loaded_content_init(GLoadedContent *); +#ifdef HAVE_GTK_SUPPORT + /* Procède à l'initialisation de l'interface de composant nommé. */ static void g_loaded_content_named_init(GNamedWidgetIface *); +#endif + /* Supprime toutes les références externes. */ static void g_loaded_content_dispose(GLoadedContent *); @@ -89,8 +95,12 @@ static void on_loaded_content_analysis_completed(GSeqWork *, analysis_data_t *); /* Détermine le type d'une interface pour l'intégration de contenu chargé. */ +#ifdef HAVE_GTK_SUPPORT G_DEFINE_TYPE_WITH_CODE(GLoadedContent, g_loaded_content, G_TYPE_OBJECT, G_IMPLEMENT_INTERFACE(G_TYPE_NAMED_WIDGET, g_loaded_content_named_init)); +#else +G_DEFINE_TYPE(GLoadedContent, g_loaded_content, G_TYPE_OBJECT); +#endif /****************************************************************************** @@ -143,6 +153,9 @@ static void g_loaded_content_init(GLoadedContent *content) } +#ifdef HAVE_GTK_SUPPORT + + /****************************************************************************** * * * Paramètres : iface = interface GLib à initialiser. * @@ -163,6 +176,9 @@ static void g_loaded_content_named_init(GNamedWidgetIface *iface) } +#endif + + /****************************************************************************** * * * Paramètres : content = instance d'objet GLib à traiter. * @@ -577,6 +593,9 @@ char **g_loaded_content_detect_obfuscators(const GLoadedContent *content, bool v /* ---------------------------------------------------------------------------------- */ +#ifdef HAVE_GTK_SUPPORT + + /****************************************************************************** * * * Paramètres : content = contenu chargé à consulter. * @@ -745,12 +764,18 @@ GDisplayOptions *g_loaded_content_get_display_options(const GLoadedContent *cont } +#endif + + /* ---------------------------------------------------------------------------------- */ /* VUES ET BASCULEMENT ENTRE LES VUES */ /* ---------------------------------------------------------------------------------- */ +#ifdef HAVE_GTK_SUPPORT + + /****************************************************************************** * * * Paramètres : panel = panneau affichant un contenu binaire. * @@ -866,3 +891,6 @@ GtkWidget *get_loaded_panel_from_built_view(GtkWidget *view) return result; } + + +#endif diff --git a/src/analysis/loaded.h b/src/analysis/loaded.h index 406375c..040dacb 100644 --- a/src/analysis/loaded.h +++ b/src/analysis/loaded.h @@ -27,13 +27,17 @@ #include #include -#include +#ifdef HAVE_GTK_SUPPORT +# include +#endif #include "content.h" #include "../common/xml.h" #include "../glibext/gdisplayoptions.h" -#include "../gtkext/gtkdockstation.h" +#ifdef HAVE_GTK_SUPPORT +# include "../gtkext/gtkdockstation.h" +#endif @@ -87,6 +91,8 @@ char **g_loaded_content_detect_obfuscators(const GLoadedContent *, bool, size_t /* --------------------------- GESTION DYNAMIQUE DES VUES --------------------------- */ +#ifdef HAVE_GTK_SUPPORT + /* Détermine le nombre de vues disponibles pour un contenu. */ unsigned int g_loaded_content_count_views(const GLoadedContent *); @@ -105,11 +111,15 @@ unsigned int g_loaded_content_get_view_index(GLoadedContent *, GtkWidget *); /* Fournit toutes les options d'affichage pour un contenu. */ GDisplayOptions *g_loaded_content_get_display_options(const GLoadedContent *, unsigned int); +#endif + /* ----------------------- VUES ET BASCULEMENT ENTRE LES VUES ----------------------- */ +#ifdef HAVE_GTK_SUPPORT + /* Fournit la station d'accueil d'un panneau d'affichage. */ GtkDockStation *get_dock_station_for_view_panel(GtkWidget *); @@ -119,6 +129,8 @@ GtkWidget *get_scroll_window_for_view_panel(GtkWidget *); /* Fournit le panneau chargé inclus dans un affichage. */ GtkWidget *get_loaded_panel_from_built_view(GtkWidget *); +#endif + #endif /* _ANALYSIS_LOADED_H */ diff --git a/src/analysis/project.c b/src/analysis/project.c index 682dfb9..c966195 100644 --- a/src/analysis/project.c +++ b/src/analysis/project.c @@ -1365,6 +1365,9 @@ static void on_new_content_resolved(GContentResolver *resolver, wgroup_id_t wid, /* ---------------------------------------------------------------------------------- */ +#ifdef HAVE_GTK_SUPPORT + + /****************************************************************************** * * * Paramètres : - * @@ -1437,3 +1440,6 @@ void push_project_into_recent_list(const GStudyProject *project) g_generic_config_set_value(get_main_configuration(), MPK_LAST_PROJECT, project->filename); } + + +#endif diff --git a/src/analysis/project.h b/src/analysis/project.h index e8c6365..c058444 100644 --- a/src/analysis/project.h +++ b/src/analysis/project.h @@ -25,7 +25,9 @@ #define _ANALYSIS_PROJECT_H -#include +#ifdef HAVE_GTK_SUPPORT +# include +#endif #include "loaded.h" @@ -115,12 +117,16 @@ GLoadedContent **g_study_project_get_contents(GStudyProject *, size_t *); /* ------------------------- GESTION GLOBALISEE DES PROJETS ------------------------- */ +#ifdef HAVE_GTK_SUPPORT + /* Fournit le gestionnaire des projets connus. */ GtkRecentManager *get_project_manager(void); /* Place un projet au sommet de la pile des projets récents. */ void push_project_into_recent_list(const GStudyProject *); +#endif + #endif /* _PROJECT_H */ diff --git a/src/analysis/routine.c b/src/analysis/routine.c index 41bf451..de066dc 100644 --- a/src/analysis/routine.c +++ b/src/analysis/routine.c @@ -37,9 +37,9 @@ #include "routine-int.h" #include "../arch/instructions/raw.h" #include "../common/extstr.h" +#include "../core/columns.h" #include "../core/params.h" #include "../glibext/gbinarycursor.h" -#include "../gtkext/gtkblockdisplay.h" @@ -1047,6 +1047,8 @@ void g_binary_routine_print_code(const GBinRoutine *routine, GLangOutput *lang, +#ifdef HAVE_GTK_SUPPORT + /****************************************************************************** * * @@ -1334,3 +1336,6 @@ char *g_binary_routine_build_tooltip(const GBinRoutine *routine, const GLoadedBi return result; } + + +#endif diff --git a/src/analysis/routine.h b/src/analysis/routine.h index f148406..2e5e22d 100644 --- a/src/analysis/routine.h +++ b/src/analysis/routine.h @@ -133,10 +133,13 @@ char *g_binary_routine_to_string(const GBinRoutine *, bool); +#ifdef HAVE_GTK_SUPPORT /* Construit un petit résumé concis de la routine. */ char *g_binary_routine_build_tooltip(const GBinRoutine *, const GLoadedBinary *); +#endif + #endif /* _ANALYSIS_ROUTINE_H */ diff --git a/src/analysis/storage/Makefile.am b/src/analysis/storage/Makefile.am index aee0faf..3eb287b 100644 --- a/src/analysis/storage/Makefile.am +++ b/src/analysis/storage/Makefile.am @@ -13,18 +13,9 @@ libanalysisstorage_la_SOURCES = \ storage.h storage.c \ tpmem.h tpmem.c -libanalysisstorage_la_LIBADD = - -libanalysisstorage_la_LDFLAGS = $(LIBSSL_LIBS) +libanalysisstorage_la_CFLAGS = $(TOOLKIT_CFLAGS) $(LIBXML_CFLAGS) devdir = $(includedir)/chrysalide/$(subdir:src/%=core/%) dev_HEADERS = $(libanalysisstorage_la_SOURCES:%c=) - - -AM_CPPFLAGS = $(LIBGTK_CFLAGS) $(LIBXML_CFLAGS) $(LIBARCHIVE_CFLAGS) $(LIBSQLITE_CFLAGS) $(LIBSSL_CFLAGS) - -AM_CFLAGS = $(DEBUG_CFLAGS) $(WARNING_FLAGS) $(COMPLIANCE_FLAGS) - -SUBDIRS = diff --git a/src/analysis/types/Makefile.am b/src/analysis/types/Makefile.am index e3cbda0..bc6ff14 100644 --- a/src/analysis/types/Makefile.am +++ b/src/analysis/types/Makefile.am @@ -12,18 +12,9 @@ libanalysistypes_la_SOURCES = \ proto.h proto.c \ template.h template.c -libanalysistypes_la_LIBADD = - -libanalysistypes_la_LDFLAGS = +libanalysistypes_la_CFLAGS = $(TOOLKIT_CFLAGS) devdir = $(includedir)/chrysalide/$(subdir:src/%=core/%) dev_HEADERS = $(libanalysistypes_la_SOURCES:%c=) - - -AM_CPPFLAGS = $(LIBGTK_CFLAGS) $(LIBXML_CFLAGS) - -AM_CFLAGS = $(DEBUG_CFLAGS) $(WARNING_FLAGS) $(COMPLIANCE_FLAGS) - -SUBDIRS = diff --git a/src/arch/Makefile.am b/src/arch/Makefile.am index 8a2eea3..bdfceb7 100644 --- a/src/arch/Makefile.am +++ b/src/arch/Makefile.am @@ -1,29 +1,29 @@ noinst_LTLIBRARIES = libarch.la -libarch_la_SOURCES = \ - archbase.h archbase.c \ - context-int.h \ - context.h context.c \ - instriter.h instriter.c \ - instruction-int.h \ - instruction.h instruction.c \ - link.h link.c \ - operand-int.h operand-int.c \ - operand.h operand.c \ - post.h post.c \ - processor-int.h \ - processor.h processor.c \ - register-int.h \ - register.h register.c \ - storage.h storage.c \ +libarch_la_SOURCES = \ + archbase.h archbase.c \ + context-int.h \ + context.h context.c \ + instriter.h instriter.c \ + instruction-int.h \ + instruction.h instruction.c \ + link.h link.c \ + operand-int.h operand-int.c \ + operand.h operand.c \ + post.h post.c \ + processor-int.h \ + processor.h processor.c \ + register-int.h \ + register.h register.c \ + storage.h storage.c \ vmpa.h vmpa.c -libarch_la_LIBADD = \ - instructions/libarchinstructions.la \ - operands/libarchoperands.la +libarch_la_CFLAGS = $(TOOLKIT_CFLAGS) $(LIBXML_CFLAGS) -libarch_la_LDFLAGS = +libarch_la_LIBADD = \ + instructions/libarchinstructions.la \ + operands/libarchoperands.la devdir = $(includedir)/chrysalide/$(subdir:src/%=core/%) @@ -31,9 +31,4 @@ devdir = $(includedir)/chrysalide/$(subdir:src/%=core/%) dev_HEADERS = $(libarch_la_SOURCES:%c=) -AM_CPPFLAGS = $(LIBGTK_CFLAGS) $(LIBXML_CFLAGS) - -AM_CFLAGS = $(DEBUG_CFLAGS) $(WARNING_FLAGS) $(COMPLIANCE_FLAGS) - - SUBDIRS = instructions operands diff --git a/src/arch/instruction.c b/src/arch/instruction.c index 4de16d6..7fb9c4a 100644 --- a/src/arch/instruction.c +++ b/src/arch/instruction.c @@ -35,11 +35,11 @@ #include "instruction-int.h" #include "storage.h" #include "../analysis/storage/serialize-int.h" +#include "../core/columns.h" #include "../core/logs.h" #include "../core/processors.h" #include "../glibext/gbinarycursor.h" #include "../glibext/linegen-int.h" -#include "../gtkext/gtkblockdisplay.h" @@ -81,12 +81,16 @@ bool g_arch_instruction_store_destinations(GArchInstruction *, GObjectStorage *, /* Indique le nombre de ligne prêtes à être générées. */ static size_t g_arch_instruction_count_lines(const GArchInstruction *); +#ifdef HAVE_GTK_SUPPORT + /* Retrouve l'emplacement correspondant à une position donnée. */ static void g_arch_instruction_compute_cursor(const GArchInstruction *, gint, size_t, size_t, GLineCursor **); /* Détermine si le conteneur s'inscrit dans une plage donnée. */ static int g_arch_instruction_contain_cursor(const GArchInstruction *, size_t, size_t, const GLineCursor *); +#endif + /* Renseigne sur les propriétés liées à un générateur. */ static BufferLineFlags g_arch_instruction_get_flags2(const GArchInstruction *, size_t, size_t); @@ -195,8 +199,10 @@ static void g_arch_instruction_init(GArchInstruction *instr) static void g_arch_instruction_generator_init(GLineGeneratorInterface *iface) { iface->count = (linegen_count_lines_fc)g_arch_instruction_count_lines; +#ifdef HAVE_GTK_SUPPORT iface->compute = (linegen_compute_fc)g_arch_instruction_compute_cursor; iface->contain = (linegen_contain_fc)g_arch_instruction_contain_cursor; +#endif iface->get_flags = (linegen_get_flags_fc)g_arch_instruction_get_flags2; iface->print = (linegen_print_fc)g_arch_instruction_print; @@ -1835,6 +1841,9 @@ static size_t g_arch_instruction_count_lines(const GArchInstruction *instr) } +#ifdef HAVE_GTK_SUPPORT + + /****************************************************************************** * * * Paramètres : instr = générateur à consulter. * @@ -1891,6 +1900,9 @@ static int g_arch_instruction_contain_cursor(const GArchInstruction *instr, size } +#endif + + /****************************************************************************** * * * Paramètres : instr = générateur à consulter. * diff --git a/src/arch/instructions/Makefile.am b/src/arch/instructions/Makefile.am index 24d3eb5..28cf90f 100644 --- a/src/arch/instructions/Makefile.am +++ b/src/arch/instructions/Makefile.am @@ -1,24 +1,14 @@ noinst_LTLIBRARIES = libarchinstructions.la -libarchinstructions_la_SOURCES = \ - raw.h raw.c \ - undefined-int.h \ +libarchinstructions_la_SOURCES = \ + raw.h raw.c \ + undefined-int.h \ undefined.h undefined.c -libarchinstructions_la_LIBADD = - -libarchinstructions_la_LDFLAGS = +libarchinstructions_la_CFLAGS = $(TOOLKIT_CFLAGS) $(LIBXML_CFLAGS) devdir = $(includedir)/chrysalide/$(subdir:src/%=core/%) dev_HEADERS = $(libarchinstructions_la_SOURCES:%c=) - - -AM_CPPFLAGS = $(LIBGTK_CFLAGS) $(LIBXML_CFLAGS) - -AM_CFLAGS = $(DEBUG_CFLAGS) $(WARNING_FLAGS) $(COMPLIANCE_FLAGS) - - -SUBDIRS = diff --git a/src/arch/instructions/raw.c b/src/arch/instructions/raw.c index 6340e46..26282fa 100644 --- a/src/arch/instructions/raw.c +++ b/src/arch/instructions/raw.c @@ -35,7 +35,7 @@ #include "../instruction-int.h" #include "../operands/immediate.h" #include "../operands/target.h" -#include "../../gtkext/gtkblockdisplay.h" +#include "../../core/columns.h" diff --git a/src/arch/instructions/undefined.c b/src/arch/instructions/undefined.c index 7ed5db9..15c63e7 100644 --- a/src/arch/instructions/undefined.c +++ b/src/arch/instructions/undefined.c @@ -31,7 +31,7 @@ #include "undefined-int.h" -#include "../../gtkext/gtkblockdisplay.h" +#include "../../core/columns.h" diff --git a/src/arch/operand-int.h b/src/arch/operand-int.h index e78c2b0..3973287 100644 --- a/src/arch/operand-int.h +++ b/src/arch/operand-int.h @@ -48,9 +48,13 @@ typedef GArchOperand * (* get_inner_operand_fc) (const GArchOperand *, const cha /* Traduit un opérande en version humainement lisible. */ typedef void (* operand_print_fc) (const GArchOperand *, GBufferLine *); +#ifdef HAVE_GTK_SUPPORT + /* Construit un petit résumé concis de l'opérande. */ typedef char * (* operand_build_tooltip_fc) (const GArchOperand *, const GLoadedBinary *); +#endif + /* Fournit une liste de candidats embarqués par un candidat. */ typedef GArchOperand ** (* operand_list_inners_fc) (const GArchOperand *, size_t *); @@ -113,7 +117,9 @@ struct _GArchOperandClass get_inner_operand_fc get_inner; /* Récupération d'un opérande */ operand_print_fc print; /* Texte humain équivalent */ +#ifdef HAVE_GTK_SUPPORT operand_build_tooltip_fc build_tooltip; /* Construction de description */ +#endif operand_list_inners_fc list_inner; /* Récupération d'internes */ operand_update_inners_fc update_inner; /* Mise à jour des éléments */ diff --git a/src/arch/operand.c b/src/arch/operand.c index f262373..ab7eeab 100644 --- a/src/arch/operand.c +++ b/src/arch/operand.c @@ -408,6 +408,9 @@ void g_arch_operand_print(const GArchOperand *operand, GBufferLine *line) } +#ifdef HAVE_GTK_SUPPORT + + /****************************************************************************** * * * Paramètres : operand = opérande à consulter. * @@ -438,6 +441,9 @@ char *g_arch_operand_build_tooltip(const GArchOperand *operand, const GLoadedBin } +#endif + + /****************************************************************************** * * * Paramètres : operand = opérande à venir modifier. * diff --git a/src/arch/operand.h b/src/arch/operand.h index a93e898..62d2969 100644 --- a/src/arch/operand.h +++ b/src/arch/operand.h @@ -88,9 +88,13 @@ GArchOperand *g_arch_operand_get_inner_operand_from_path(const GArchOperand *, c /* Traduit un opérande en version humainement lisible. */ void g_arch_operand_print(const GArchOperand *, GBufferLine *); +#ifdef HAVE_GTK_SUPPORT + /* Construit un petit résumé concis de l'opérande. */ char *g_arch_operand_build_tooltip(const GArchOperand *, const GLoadedBinary *); +#endif + /* Ajoute une information complémentaire à un opérande. */ bool g_arch_operand_set_flag(GArchOperand *, ArchOperandFlag); diff --git a/src/arch/operands/Makefile.am b/src/arch/operands/Makefile.am index 4371457..f2a8767 100644 --- a/src/arch/operands/Makefile.am +++ b/src/arch/operands/Makefile.am @@ -18,19 +18,9 @@ libarchoperands_la_SOURCES = \ targetable-int.h \ targetable.h targetable.c -libarchoperands_la_LIBADD = - -libarchoperands_la_LDFLAGS = +libarchoperands_la_CFLAGS = $(TOOLKIT_CFLAGS) $(LIBXML_CFLAGS) devdir = $(includedir)/chrysalide/$(subdir:src/%=core/%) dev_HEADERS = $(libarchoperands_la_SOURCES:%c=) - - -AM_CPPFLAGS = $(LIBGTK_CFLAGS) $(LIBXML_CFLAGS) - -AM_CFLAGS = $(DEBUG_CFLAGS) $(WARNING_FLAGS) $(COMPLIANCE_FLAGS) - - -SUBDIRS = diff --git a/src/arch/operands/immediate.c b/src/arch/operands/immediate.c index 0df8bbb..9cb60a1 100644 --- a/src/arch/operands/immediate.c +++ b/src/arch/operands/immediate.c @@ -43,7 +43,7 @@ #include "../../common/asm.h" #include "../../common/extstr.h" #include "../../common/sort.h" -#include "../../gtkext/gtkblockdisplay.h" +#include "../../core/columns.h" @@ -82,9 +82,13 @@ static void g_imm_operand_print(const GImmOperand *, GBufferLine *); /* Compare un opérande avec un autre. */ static int g_imm_operand_compare(const GImmOperand *, const GImmOperand *, bool); +#ifdef HAVE_GTK_SUPPORT + /* Construit un petit résumé concis de l'opérande. */ static char *g_imm_operand_build_tooltip(const GImmOperand *, const GLoadedBinary *); +#endif + /* Fournit l'empreinte d'un candidat à une centralisation. */ static guint g_imm_operand_hash(const GImmOperand *, bool); @@ -148,7 +152,9 @@ static void g_imm_operand_class_init(GImmOperandClass *klass) operand->compare = (operand_compare_fc)g_imm_operand_compare; operand->print = (operand_print_fc)g_imm_operand_print; +#ifdef HAVE_GTK_SUPPORT operand->build_tooltip = (operand_build_tooltip_fc)g_imm_operand_build_tooltip; +#endif operand->hash = (operand_hash_fc)g_imm_operand_hash; @@ -1226,6 +1232,9 @@ static int g_imm_operand_compare(const GImmOperand *a, const GImmOperand *b, boo } +#ifdef HAVE_GTK_SUPPORT + + /****************************************************************************** * * * Paramètres : operand = opérande à consulter. * @@ -1314,6 +1323,9 @@ static char *g_imm_operand_build_tooltip(const GImmOperand *operand, const GLoad } +#endif + + /****************************************************************************** * * * Paramètres : operand = objet dont l'instance se veut unique. * diff --git a/src/arch/operands/known.c b/src/arch/operands/known.c index 152bdac..5402879 100644 --- a/src/arch/operands/known.c +++ b/src/arch/operands/known.c @@ -32,8 +32,8 @@ #include "immediate-int.h" #include "rename-int.h" #include "../../analysis/db/misc/rlestr.h" +#include "../../core/columns.h" #include "../../core/logs.h" -#include "../../gtkext/gtkblockdisplay.h" diff --git a/src/arch/operands/target.c b/src/arch/operands/target.c index 068d060..e33e1ee 100644 --- a/src/arch/operands/target.c +++ b/src/arch/operands/target.c @@ -41,7 +41,7 @@ #include "../../format/format.h" #include "../../format/strsym.h" #include "../../glibext/gbinarycursor.h" -#include "../../gtkext/gtkblockdisplay.h" +#include "../../core/columns.h" @@ -74,9 +74,13 @@ static int g_target_operand_compare(const GTargetOperand *, const GTargetOperand /* Traduit un opérande en version humainement lisible. */ static void g_target_operand_print(const GTargetOperand *, GBufferLine *); +#ifdef HAVE_GTK_SUPPORT + /* Construit un petit résumé concis de l'opérande. */ static char *g_target_operand_build_tooltip(const GTargetOperand *, const GLoadedBinary *); +#endif + /* Fournit l'empreinte d'un candidat à une centralisation. */ static guint g_target_operand_hash(const GTargetOperand *, bool); @@ -132,7 +136,9 @@ static void g_target_operand_class_init(GTargetOperandClass *klass) operand->compare = (operand_compare_fc)g_target_operand_compare; operand->print = (operand_print_fc)g_target_operand_print; +#ifdef HAVE_GTK_SUPPORT operand->build_tooltip = (operand_build_tooltip_fc)g_target_operand_build_tooltip; +#endif operand->hash = (operand_hash_fc)g_target_operand_hash; @@ -382,6 +388,9 @@ GArchOperand *g_target_operand_new(MemoryDataSize size, const vmpa2t *addr) } +#ifdef HAVE_GTK_SUPPORT + + /****************************************************************************** * * * Paramètres : operand = opérande à consulter. * @@ -462,6 +471,9 @@ static char *g_target_operand_build_tooltip(const GTargetOperand *operand, const } +#endif + + /****************************************************************************** * * * Paramètres : operand = structure dont le contenu est à consulter. * diff --git a/src/common/Makefile.am b/src/common/Makefile.am index 28e5459..9a8fdf2 100644 --- a/src/common/Makefile.am +++ b/src/common/Makefile.am @@ -31,16 +31,9 @@ libcommon_la_SOURCES = \ xdg.h xdg.c \ xml.h xml.c -libcommon_la_LDFLAGS = $(LIBGTK_LIBS) $(LIBXML_LIBS) $(LIBCURL_LIBS) +libcommon_la_CFLAGS = $(TOOLKIT_CFLAGS) $(LIBXML_CFLAGS) $(LIBCURL_CFLAGS) devdir = $(includedir)/chrysalide/$(subdir:src/%=core/%) dev_HEADERS = $(libcommon_la_SOURCES:%c=) - - -AM_CPPFLAGS = $(LIBGTK_CFLAGS) $(LIBXML_CFLAGS) $(LIBCURL_CFLAGS) - -AM_CFLAGS = $(DEBUG_CFLAGS) $(WARNING_FLAGS) $(COMPLIANCE_FLAGS) - -SUBDIRS = diff --git a/src/core/Makefile.am b/src/core/Makefile.am index 12dcddd..ac1ae14 100644 --- a/src/core/Makefile.am +++ b/src/core/Makefile.am @@ -3,6 +3,7 @@ noinst_LTLIBRARIES = libcore.la libcore_la_SOURCES = \ collections.h collections.c \ + columns.h \ core.h core.c \ demanglers.h demanglers.c \ global.h global.c \ @@ -13,16 +14,9 @@ libcore_la_SOURCES = \ processors.h processors.c \ queue.h queue.c -libcore_la_LDFLAGS = $(LIBGTK_LIBS) $(LIBXML_LIBS) +libcore_la_CFLAGS = $(TOOLKIT_CFLAGS) $(LIBXML_CFLAGS) devdir = $(includedir)/chrysalide/$(subdir:src/%=core/%) dev_HEADERS = $(libcore_la_SOURCES:%c=) - - -AM_CPPFLAGS = $(LIBGTK_CFLAGS) $(LIBXML_CFLAGS) - -AM_CFLAGS = $(DEBUG_CFLAGS) $(WARNING_FLAGS) $(COMPLIANCE_FLAGS) - -SUBDIRS = diff --git a/src/core/collections.h b/src/core/collections.h index 69da6f7..87f2435 100644 --- a/src/core/collections.h +++ b/src/core/collections.h @@ -49,4 +49,4 @@ void delete_collections_list(GList **); -#endif /* _ANALYSIS_DB_COLLECTION_H */ +#endif /* _CORE_COLLECTIONS_H */ diff --git a/src/core/columns.h b/src/core/columns.h new file mode 100644 index 0000000..81f78f8 --- /dev/null +++ b/src/core/columns.h @@ -0,0 +1,59 @@ + +/* Chrysalide - Outil d'analyse de fichiers binaires + * columns.h - prototypes pour l'énumération globale des colonnes de rendu + * + * Copyright (C) 2022 Cyrille Bagard + * + * This file is part of Chrysalide. + * + * Chrysalide is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * Chrysalide is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Chrysalide. If not, see . + */ + + +#ifndef _CORE_COLUMNS_H +#define _CORE_COLUMNS_H + + + +/* Désignation des colonnes d'une ligne */ +typedef enum _DisassLineColumn +{ + DLC_PHYSICAL, /* Position physique */ + DLC_VIRTUAL, /* Adresse virtuelle */ + DLC_BINARY, /* Contenu sous forme binaire */ + DLC_ASSEMBLY_LABEL, /* Etiquette dans les données */ + DLC_ASSEMBLY_HEAD, /* Instruction pour assembleur */ + DLC_ASSEMBLY, /* Code pour assembleur */ + DLC_COMMENTS, /* Commentaires éventuels */ + + DLC_COUNT, + +} DisassLineColumn; + + +/* Désignation des colonnes d'une ligne */ +typedef enum _HexLineColumn +{ + HLC_PHYSICAL, /* Position physique */ + HLC_BINARY, /* Données binaires brutes */ + HLC_PADDING, /* Espacement forcé */ + HLC_TRANSLATION, /* Traduction de contenu */ + + HLC_COUNT, + +} HexLineColumn; + + + +#endif /* _CORE_COLUMNS_H */ diff --git a/src/core/logs.c b/src/core/logs.c index 2769bd5..9385020 100644 --- a/src/core/logs.c +++ b/src/core/logs.c @@ -29,8 +29,10 @@ #include "../common/extstr.h" -#include "../gui/core/items.h" -#include "../gui/panels/log.h" +#ifdef HAVE_GTK_SUPPORT +# include "../gui/core/items.h" +# include "../gui/panels/log.h" +#endif @@ -107,10 +109,14 @@ void set_log_verbosity(LogMessageType level) void log_simple_message(LogMessageType type, const char *msg) { +#ifdef HAVE_GTK_SUPPORT GEditorItem *item; /* Eventuel affichage présent */ +#endif if (type >= _verbosity) { +#ifdef HAVE_GTK_SUPPORT + item = find_editor_item_by_type(G_TYPE_LOG_PANEL); if (item != NULL) @@ -120,6 +126,9 @@ void log_simple_message(LogMessageType type, const char *msg) } else + +#endif + print_message_without_gui(type, msg); } diff --git a/src/debug/Makefile.am b/src/debug/Makefile.am index 6cfc90f..ce21776 100644 --- a/src/debug/Makefile.am +++ b/src/debug/Makefile.am @@ -12,18 +12,9 @@ libdebug_la_SOURCES = \ stream-int.h \ stream.h stream.c -libdebug_la_LIBADD = - -libdebug_la_CFLAGS = $(AM_CFLAGS) +libdebug_la_CFLAGS = $(TOOLKIT_CFLAGS) $(LIBXML_CFLAGS) devdir = $(includedir)/chrysalide/$(subdir:src/%=core/%) dev_HEADERS = $(libdebug_la_SOURCES:%c=) - - -AM_CPPFLAGS = $(LIBGTK_CFLAGS) $(LIBXML_CFLAGS) - -AM_CFLAGS = $(DEBUG_CFLAGS) $(WARNING_FLAGS) $(COMPLIANCE_FLAGS) - -SUBDIRS = diff --git a/src/format/Makefile.am b/src/format/Makefile.am index 2004f93..305cd92 100644 --- a/src/format/Makefile.am +++ b/src/format/Makefile.am @@ -19,18 +19,9 @@ libformat_la_SOURCES = \ symbol-int.h \ symbol.h symbol.c -libformat_la_LIBADD = - -libformat_la_LDFLAGS = +libformat_la_CFLAGS = $(TOOLKIT_CFLAGS) $(LIBXML_CFLAGS) devdir = $(includedir)/chrysalide/$(subdir:src/%=core/%) dev_HEADERS = $(libformat_la_SOURCES:%c=) - - -AM_CPPFLAGS = $(LIBGTK_CFLAGS) $(LIBXML_CFLAGS) - -AM_CFLAGS = $(DEBUG_CFLAGS) $(WARNING_FLAGS) $(COMPLIANCE_FLAGS) - -SUBDIRS = diff --git a/src/format/format-int.h b/src/format/format-int.h index 3e6ae3e..f18bb24 100644 --- a/src/format/format-int.h +++ b/src/format/format-int.h @@ -31,7 +31,6 @@ #include "known-int.h" #include "preload.h" #include "../glibext/objhole.h" -#include "../gtkext/gtkstatusstack.h" #include "../mangling/demangler.h" diff --git a/src/format/format.h b/src/format/format.h index a23782c..f9aa430 100644 --- a/src/format/format.h +++ b/src/format/format.h @@ -34,6 +34,7 @@ #include "../analysis/content.h" #include "../arch/context.h" #include "../glibext/delayed.h" +#include "../glibext/notifier.h" diff --git a/src/format/known.h b/src/format/known.h index 8319a63..dcc8669 100644 --- a/src/format/known.h +++ b/src/format/known.h @@ -31,6 +31,7 @@ #include "../analysis/content.h" #include "../glibext/delayed.h" +#include "../glibext/notifier.h" diff --git a/src/format/strsym.c b/src/format/strsym.c index d585434..c352a0e 100644 --- a/src/format/strsym.c +++ b/src/format/strsym.c @@ -33,7 +33,7 @@ #include "symbol-int.h" #include "../arch/operands/feeder-int.h" #include "../common/alloc.h" -#include "../gtkext/gtkblockdisplay.h" +#include "../core/columns.h" diff --git a/src/format/symbol.c b/src/format/symbol.c index b20426d..934eee3 100644 --- a/src/format/symbol.c +++ b/src/format/symbol.c @@ -31,9 +31,11 @@ #include "symbol-int.h" #include "../analysis/db/misc/rlestr.h" -#include "../glibext/gbinarycursor.h" +#include "../core/columns.h" +#ifdef HAVE_GTK_SUPPORT +# include "../glibext/gbinarycursor.h" +#endif #include "../glibext/linegen-int.h" -#include "../gtkext/gtkblockdisplay.h" @@ -66,12 +68,16 @@ static void g_binary_symbol_finalize(GBinSymbol *); /* Indique le nombre de ligne prêtes à être générées. */ static size_t g_binary_symbol_count_lines(const GBinSymbol *); +#ifdef HAVE_GTK_SUPPORT + /* Retrouve l'emplacement correspondant à une position donnée. */ static void g_binary_symbol_compute_cursor(const GBinSymbol *, gint, size_t, size_t, GLineCursor **); /* Détermine si le conteneur s'inscrit dans une plage donnée. */ static int g_binary_symbol_contain_cursor(const GBinSymbol *, size_t, size_t, const GLineCursor *); +#endif + /* Renseigne sur les propriétés liées à un générateur. */ static BufferLineFlags g_binary_symbol_get_line_flags(const GBinSymbol *, size_t, size_t); @@ -177,8 +183,10 @@ static void g_binary_symbol_init(GBinSymbol *symbol) static void g_binary_symbol_interface_init(GLineGeneratorInterface *iface) { iface->count = (linegen_count_lines_fc)g_binary_symbol_count_lines; +#ifdef HAVE_GTK_SUPPORT iface->compute = (linegen_compute_fc)g_binary_symbol_compute_cursor; iface->contain = (linegen_contain_fc)g_binary_symbol_contain_cursor; +#endif iface->get_flags = (linegen_get_flags_fc)g_binary_symbol_get_line_flags; iface->print = (linegen_print_fc)g_binary_symbol_print; @@ -784,6 +792,9 @@ static size_t g_binary_symbol_count_lines(const GBinSymbol *symbol) } +#ifdef HAVE_GTK_SUPPORT + + /****************************************************************************** * * * Paramètres : symbol = générateur à consulter. * @@ -851,6 +862,9 @@ static int g_binary_symbol_contain_cursor(const GBinSymbol *symbol, size_t index } +#endif + + /****************************************************************************** * * * Paramètres : symbol = générateur à consulter. * diff --git a/src/glibext/Makefile.am b/src/glibext/Makefile.am index 6bcf4b8..67fe0d8 100644 --- a/src/glibext/Makefile.am +++ b/src/glibext/Makefile.am @@ -3,53 +3,56 @@ BUILT_SOURCES = chrysamarshal.h chrysamarshal.c noinst_LTLIBRARIES = libglibext.la -libglibext_la_SOURCES = \ - buffercache-int.h \ - buffercache.h buffercache.c \ - bufferline.h bufferline.c \ - bufferview.h bufferview.c \ - chrysamarshal.h chrysamarshal.c \ - configuration-int.h \ - configuration.h configuration.c \ - delayed-int.h \ - delayed.h delayed.c \ - gbinarycursor.h gbinarycursor.c \ - gbinportion-int.h \ - gbinportion.h gbinportion.c \ - gdisplayoptions.h gdisplayoptions.c \ - glinecursor-int.h \ - glinecursor.h glinecursor.c \ - gloadedpanel-int.h \ - gloadedpanel.h gloadedpanel.c \ - gnhash.h gnhash.c \ - linecolumn.h linecolumn.c \ - linegen-int.h \ - linegen.h linegen.c \ - linesegment.h linesegment.c \ - named-int.h \ - named.h named.c \ - objhole.h \ - proto.h \ - seq.h seq.c \ - signal.h signal.c \ - singleton.h singleton.c \ +libglibext_la_SOURCES = \ + buffercache-int.h \ + buffercache.h buffercache.c \ + bufferline.h bufferline.c \ + chrysamarshal.h chrysamarshal.c \ + configuration-int.h \ + configuration.h configuration.c \ + delayed-int.h \ + delayed.h delayed.c \ + gbinarycursor.h gbinarycursor.c \ + gbinportion-int.h \ + gbinportion.h gbinportion.c \ + gdisplayoptions.h gdisplayoptions.c \ + glinecursor-int.h \ + glinecursor.h glinecursor.c \ + gnhash.h gnhash.c \ + linecolumn.h linecolumn.c \ + linegen-int.h \ + linegen.h linegen.c \ + notifier.h \ + objhole.h \ + proto.h \ + seq.h seq.c \ + signal.h signal.c \ + singleton.h singleton.c \ + linesegment.h linesegment.c + +if BUILD_GTK_SUPPORT + +libglibext_la_SOURCES += \ + bufferview.h bufferview.c \ + gloadedpanel-int.h \ + gloadedpanel.h gloadedpanel.c \ + named-int.h \ + named.h named.c \ widthtracker.h widthtracker.c +endif + +libglibext_la_CFLAGS = $(TOOLKIT_CFLAGS) $(LIBXML_CFLAGS) + libglibext_la_LIBADD = \ generators/libglibextgenerators.la -libglibext_la_LDFLAGS = - devdir = $(includedir)/chrysalide/$(subdir:src/%=core/%) dev_HEADERS = $(libglibext_la_SOURCES:%c=) -AM_CPPFLAGS = $(LIBGTK_CFLAGS) $(LIBXML_CFLAGS) - -AM_CFLAGS = $(DEBUG_CFLAGS) $(WARNING_FLAGS) $(COMPLIANCE_FLAGS) - SUBDIRS = generators diff --git a/src/glibext/buffercache-int.h b/src/glibext/buffercache-int.h index 36e4369..4991bd0 100644 --- a/src/glibext/buffercache-int.h +++ b/src/glibext/buffercache-int.h @@ -68,7 +68,9 @@ struct _GBufferCache GBinContent *content; /* Contenu binaire global */ +#ifdef HAVE_GTK_SUPPORT GWidthTracker *tracker; /* Suivi des largeurs */ +#endif cache_info *lines; /* Liste des lignes intégrées */ size_t count; /* Quantité en cache */ diff --git a/src/glibext/buffercache.c b/src/glibext/buffercache.c index fd2adc5..ed1068c 100644 --- a/src/glibext/buffercache.c +++ b/src/glibext/buffercache.c @@ -59,9 +59,13 @@ static void get_cache_info_cursor(const cache_info *, size_t, gint, GLineCursor /* Suivit les variations du compteur de références d'une ligne. */ static void on_line_ref_toggle(cache_info *, GBufferLine *, gboolean); +#ifdef HAVE_GTK_SUPPORT + /* Fournit la ligne de tampon correspondant aux générateurs. */ static GBufferLine *get_cache_info_line(cache_info *, const GWidthTracker *, size_t, const GBinContent *); +#endif + /* Force la réinitialisation d'une éventuelle ligne cachée. */ static void _reset_cache_info_line_unlocked(cache_info *); @@ -367,6 +371,9 @@ static void on_line_ref_toggle(cache_info *info, GBufferLine *line, gboolean las } +#ifdef HAVE_GTK_SUPPORT + + /****************************************************************************** * * * Paramètres : info = informations sur une ligne à venir manipuler. * @@ -422,6 +429,9 @@ static GBufferLine *get_cache_info_line(cache_info *info, const GWidthTracker *t } +#endif + + /****************************************************************************** * * * Paramètres : info = informations sur une ligne à venir manipuler. * @@ -547,7 +557,9 @@ static void g_buffer_cache_init(GBufferCache *cache) cache->used = 0; g_rw_lock_init(&cache->access); +#ifdef HAVE_GTK_SUPPORT cache->tracker = NULL; +#endif } @@ -587,7 +599,9 @@ static void g_buffer_cache_dispose(GBufferCache *cache) } +#ifdef HAVE_GTK_SUPPORT g_clear_object(&cache->tracker); +#endif G_OBJECT_CLASS(g_buffer_cache_parent_class)->dispose(G_OBJECT(cache)); @@ -656,7 +670,9 @@ GBufferCache *g_buffer_cache_new(GBinContent *content, size_t col_count, size_t g_object_ref(G_OBJECT(content)); } +#ifdef HAVE_GTK_SUPPORT result->tracker = g_width_tracker_new(result, col_count, opt_count); +#endif return result; @@ -758,6 +774,9 @@ gint g_buffer_cache_get_text_position(const GBufferCache *cache) } +#ifdef HAVE_GTK_SUPPORT + + /****************************************************************************** * * * Paramètres : cache = composant GLib à consulter. * @@ -783,6 +802,9 @@ GWidthTracker *g_buffer_cache_get_width_tracker(const GBufferCache *cache) } +#endif + + /****************************************************************************** * * * Paramètres : cache = cache de lignes à mettre à jour. * @@ -905,7 +927,7 @@ static size_t g_buffer_cache_compute_repetition(GBufferCache *cache, size_t inde void g_buffer_cache_insert_at(GBufferCache *cache, size_t index, GLineGenerator *generator, BufferLineFlags flags, bool before, bool after) { -#ifndef NDEBUG +#if !defined(NDEBUG) && defined(HAVE_GTK_SUPPORT) GLineCursor *gen_cursor; /* Position du générateur */ GLineCursor *line_cursor; /* Position de la ligne */ int ret; /* Bilan de comparaison */ @@ -919,7 +941,7 @@ void g_buffer_cache_insert_at(GBufferCache *cache, size_t index, GLineGenerator assert(!(before && after)); -#ifndef NDEBUG +#if !defined(NDEBUG) && defined(HAVE_GTK_SUPPORT) if (!before && !after) { @@ -981,7 +1003,9 @@ void g_buffer_cache_insert_at(GBufferCache *cache, size_t index, GLineGenerator cache->used += needed; +#ifdef HAVE_GTK_SUPPORT g_width_tracker_update_added(cache->tracker, index, needed); +#endif g_signal_emit_by_name(cache, "size-changed", true, index, needed); @@ -991,7 +1015,9 @@ void g_buffer_cache_insert_at(GBufferCache *cache, size_t index, GLineGenerator { extend_cache_info(&cache->lines[index], generator, flags); +#ifdef HAVE_GTK_SUPPORT g_width_tracker_update(cache->tracker, index); +#endif if (needed > 1) { @@ -1005,7 +1031,9 @@ void g_buffer_cache_insert_at(GBufferCache *cache, size_t index, GLineGenerator cache->used += needed - 1; +#ifdef HAVE_GTK_SUPPORT g_width_tracker_update_added(cache->tracker, index + 1, needed - 1); +#endif } @@ -1051,7 +1079,9 @@ void g_buffer_cache_delete_at(GBufferCache *cache, size_t index) cache->used--; +#ifdef HAVE_GTK_SUPPORT g_width_tracker_update_deleted(cache->tracker, index, index); +#endif g_signal_emit_by_name(cache, "size-changed", false, index, 1); @@ -1170,7 +1200,9 @@ GLineGenerator *g_buffer_cache_delete_type_at(GBufferCache *cache, size_t index, cache->used--; +#ifdef HAVE_GTK_SUPPORT g_width_tracker_update_deleted(cache->tracker, delete, delete); +#endif g_signal_emit_by_name(cache, "size-changed", false, delete, 1); @@ -1235,7 +1267,9 @@ void g_buffer_cache_append(GBufferCache *cache, GLineGenerator *generator, Buffe cache->used += count; +#ifdef HAVE_GTK_SUPPORT g_width_tracker_update_added(cache->tracker, index, count); +#endif g_signal_emit_by_name(cache, "size-changed", true, index, count); @@ -1292,7 +1326,9 @@ void g_buffer_cache_extend_with(GBufferCache *cache, size_t count, GLineGenerato if (added > 0) { +#ifdef HAVE_GTK_SUPPORT g_width_tracker_update_added(cache->tracker, index, added); +#endif g_signal_emit_by_name(cache, "size-changed", true, index, added); @@ -1349,7 +1385,9 @@ void g_buffer_cache_truncate(GBufferCache *cache, size_t max) cache->used = max; +#ifdef HAVE_GTK_SUPPORT g_width_tracker_update_deleted(cache->tracker, max, max + removed - 1); +#endif g_signal_emit_by_name(cache, "size-changed", false, max, removed); @@ -1358,6 +1396,9 @@ void g_buffer_cache_truncate(GBufferCache *cache, size_t max) } +#ifdef HAVE_GTK_SUPPORT + + /****************************************************************************** * * * Paramètres : cache = tampon de lignes à venir consulter. * @@ -1384,6 +1425,9 @@ void g_buffer_cache_get_line_cursor(GBufferCache *cache, size_t index, gint x, G } +#endif + + /****************************************************************************** * * * Paramètres : cache = tampon de lignes à venir consulter. * @@ -1508,6 +1552,62 @@ void g_buffer_cache_remove_line_flag(GBufferCache *cache, size_t index, BufferLi /****************************************************************************** * * +* Paramètres : cache = tampon de lignes à consulter. * +* start = point de départ du parcours. * +* flag = propriétés à retrouver si possible. * +* * +* Description : Avance autant que possible vers une ligne idéale. * +* * +* Retour : Indice de la ligne recherchée, si elle existe. * +* * +* Remarques : - * +* * +******************************************************************************/ + +size_t g_buffer_cache_look_for_flag(GBufferCache *cache, size_t start, BufferLineFlags flag) +{ + size_t result; /* Indice de ligne à retourner */ + GLineCursor *init; /* Localisation de départ */ + size_t i; /* Boucle de parcours */ + GLineCursor *next; /* Localisation suivante */ + int ret; /* Bilan de comparaison */ + + assert(!g_rw_lock_writer_trylock(&cache->access)); + + assert(start < cache->used); + + result = start; + + get_cache_info_cursor(&cache->lines[start], start, 0, &init); + + for (i = start + 1; i < cache->used; i++) + { + get_cache_info_cursor(&cache->lines[i], i, 0, &next); + + ret = g_line_cursor_compare(init, next); + + g_object_unref(G_OBJECT(next)); + + if (ret != 0) + break; + + if ((g_buffer_cache_get_line_flags(cache, i) & flag) != 0) + { + result = i; + break; + } + + } + + g_object_unref(G_OBJECT(init)); + + return result; + +} + + +/****************************************************************************** +* * * Paramètres : cache = tampon de lignes à venir consulter. * * index = indice de la ligne visée par l'opération. * * * @@ -1536,6 +1636,9 @@ void g_buffer_cache_refresh_line(GBufferCache *cache, size_t index) } +#ifdef HAVE_GTK_SUPPORT + + /****************************************************************************** * * * Paramètres : cache = tampon de lignes à consulter. * @@ -1659,6 +1762,9 @@ void g_buffer_cache_draw(const GBufferCache *cache, cairo_t *cr, size_t first, s } +#endif + + /****************************************************************************** * * * Paramètres : cache = tampon de lignes à consulter. * @@ -1766,60 +1872,7 @@ size_t g_buffer_cache_find_index_by_cursor(GBufferCache *cache, const GLineCurso } -/****************************************************************************** -* * -* Paramètres : cache = tampon de lignes à consulter. * -* start = point de départ du parcours. * -* flag = propriétés à retrouver si possible. * -* * -* Description : Avance autant que possible vers une ligne idéale. * -* * -* Retour : Indice de la ligne recherchée, si elle existe. * -* * -* Remarques : - * -* * -******************************************************************************/ - -size_t g_buffer_cache_look_for_flag(GBufferCache *cache, size_t start, BufferLineFlags flag) -{ - size_t result; /* Indice de ligne à retourner */ - GLineCursor *init; /* Localisation de départ */ - size_t i; /* Boucle de parcours */ - GLineCursor *next; /* Localisation suivante */ - int ret; /* Bilan de comparaison */ - - assert(!g_rw_lock_writer_trylock(&cache->access)); - - assert(start < cache->used); - - result = start; - - get_cache_info_cursor(&cache->lines[start], start, 0, &init); - - for (i = start + 1; i < cache->used; i++) - { - get_cache_info_cursor(&cache->lines[i], i, 0, &next); - - ret = g_line_cursor_compare(init, next); - - g_object_unref(G_OBJECT(next)); - - if (ret != 0) - break; - - if ((g_buffer_cache_get_line_flags(cache, i) & flag) != 0) - { - result = i; - break; - } - - } - - g_object_unref(G_OBJECT(init)); - - return result; - -} +#ifdef HAVE_GTK_SUPPORT /****************************************************************************** @@ -1888,3 +1941,6 @@ bool g_buffer_cache_get_cursor_coordinates(GBufferCache *cache, const GLineCurso return result; } + + +#endif diff --git a/src/glibext/buffercache.h b/src/glibext/buffercache.h index e657fff..ec23b59 100644 --- a/src/glibext/buffercache.h +++ b/src/glibext/buffercache.h @@ -27,12 +27,16 @@ #include #include -#include +#ifdef HAVE_GTK_SUPPORT +# include +#endif #include "gdisplayoptions.h" #include "linegen.h" -#include "widthtracker.h" +#ifdef HAVE_GTK_SUPPORT +# include "widthtracker.h" +#endif @@ -72,9 +76,13 @@ gint g_buffer_cache_get_left_margin(const GBufferCache *); /* Fournit la position de départ pour l'impression de texte. */ gint g_buffer_cache_get_text_position(const GBufferCache *); +#ifdef HAVE_GTK_SUPPORT + /* Fournit un lien vers la structure de suivi de largeurs. */ GWidthTracker *g_buffer_cache_get_width_tracker(const GBufferCache *); +#endif + /* Met à disposition un encadrement des accès aux lignes. */ void g_buffer_cache_lock_unlock(GBufferCache *, bool, bool); @@ -107,9 +115,13 @@ void g_buffer_cache_extend_with(GBufferCache *, size_t, GLineGenerator *); /* Réduit le tampon à une quantité de lignes précise. */ void g_buffer_cache_truncate(GBufferCache *, size_t); +#ifdef HAVE_GTK_SUPPORT + /* Retrouve l'emplacement correspondant à une position de ligne. */ void g_buffer_cache_get_line_cursor(GBufferCache *, size_t, gint, GLineCursor **); +#endif + /* Ajoute une propriété particulière à une ligne. */ void g_buffer_cache_add_line_flag(GBufferCache *, size_t, BufferLineFlags); @@ -119,9 +131,14 @@ BufferLineFlags g_buffer_cache_get_line_flags(GBufferCache *, size_t); /* Retire une propriété particulière attachée à une ligne. */ void g_buffer_cache_remove_line_flag(GBufferCache *, size_t, BufferLineFlags); +/* Avance autant que possible vers une ligne idéale. */ +size_t g_buffer_cache_look_for_flag(GBufferCache *, size_t, BufferLineFlags); + /* Force la mise à jour du contenu d'une ligne donnée. */ void g_buffer_cache_refresh_line(GBufferCache *, size_t); +#ifdef HAVE_GTK_SUPPORT + /* Retrouve une ligne au sein d'un tampon avec un indice. */ GBufferLine *g_buffer_cache_find_line_by_index(GBufferCache *, size_t); @@ -131,18 +148,21 @@ void g_buffer_cache_collect_widths(GBufferCache *, size_t, size_t, size_t, gint /* Imprime une partie choisie du tampon contenant des lignes. */ void g_buffer_cache_draw(const GBufferCache *, cairo_t *, size_t, size_t, const cairo_rectangle_int_t *, const GDisplayOptions *, const gint *, const segcnt_list *); +#endif + /* Indique l'indice correspondant à une adresse donnée. */ size_t _g_buffer_cache_find_index_by_cursor(GBufferCache *, const GLineCursor *, bool, size_t, size_t); /* Indique l'indice correspondant à une adresse donnée. */ size_t g_buffer_cache_find_index_by_cursor(GBufferCache *, const GLineCursor *, bool); -/* Avance autant que possible vers une ligne idéale. */ -size_t g_buffer_cache_look_for_flag(GBufferCache *, size_t, BufferLineFlags); +#ifdef HAVE_GTK_SUPPORT /* Indique la position d'affichage d'une adresse donnée. */ bool g_buffer_cache_get_cursor_coordinates(GBufferCache *, const GLineCursor *, size_t, size_t, bool, gint *, gint *); +#endif + #endif /* _GLIBEXT_BUFFERCACHE_H */ diff --git a/src/glibext/bufferline.c b/src/glibext/bufferline.c index 85fe027..3fc08a4 100644 --- a/src/glibext/bufferline.c +++ b/src/glibext/bufferline.c @@ -33,7 +33,6 @@ #include "linecolumn.h" #include "../common/extstr.h" #include "../core/paths.h" -#include "../gtkext/gtkblockdisplay.h" @@ -70,8 +69,10 @@ struct _GBufferLineClass { GObjectClass parent; /* A laisser en premier */ +#ifdef HAVE_GTK_SUPPORT cairo_surface_t *entrypoint_img; /* Image pour les entrées */ cairo_surface_t *bookmark_img; /* Image pour les signets */ +#endif /* Signaux */ @@ -121,13 +122,17 @@ G_DEFINE_TYPE(GBufferLine, g_buffer_line, G_TYPE_OBJECT); static void g_buffer_line_class_init(GBufferLineClass *class) { GObjectClass *object; /* Autre version de la classe */ +#ifdef HAVE_GTK_SUPPORT gchar *filename; /* Chemin d'accès à utiliser */ +#endif object = G_OBJECT_CLASS(class); object->dispose = (GObjectFinalizeFunc/* ! */)g_buffer_line_dispose; object->finalize = (GObjectFinalizeFunc)g_buffer_line_finalize; +#ifdef HAVE_GTK_SUPPORT + filename = find_pixmap_file("entrypoint.png"); assert(filename != NULL); @@ -142,6 +147,8 @@ static void g_buffer_line_class_init(GBufferLineClass *class) g_free(filename); +#endif + g_signal_new("content-changed", G_TYPE_BUFFER_LINE, G_SIGNAL_RUN_LAST, @@ -885,6 +892,9 @@ void g_buffer_line_export(GBufferLine *line, buffer_export_context *ctx, BufferE /* ---------------------------------------------------------------------------------- */ +#ifdef HAVE_GTK_SUPPORT + + /****************************************************************************** * * * Paramètres : line = ligne à venir consulter. * @@ -1479,3 +1489,6 @@ void g_buffer_line_draw(GBufferLine *line, size_t index, cairo_t *cairo, gint x_ } } + + +#endif diff --git a/src/glibext/bufferline.h b/src/glibext/bufferline.h index 791fd5d..1690d15 100644 --- a/src/glibext/bufferline.h +++ b/src/glibext/bufferline.h @@ -31,7 +31,9 @@ #include "gdisplayoptions.h" #include "linesegment.h" -#include "widthtracker.h" +#ifdef HAVE_GTK_SUPPORT +# include "widthtracker.h" +#endif #include "../analysis/content.h" #include "../arch/vmpa.h" @@ -139,6 +141,8 @@ typedef struct _col_coord_t } col_coord_t; +#ifdef HAVE_GTK_SUPPORT + /* Fait remonter les largeurs requises par une ligne donnée. */ void g_buffer_line_collect_widths(const GBufferLine *, size_t, size_t, gint *, gint *); @@ -160,6 +164,8 @@ bool g_buffer_line_find_near_coord(const GBufferLine *, size_t, col_coord_t *, G /* Imprime la ligne de texte représentée. */ void g_buffer_line_draw(GBufferLine *, size_t, cairo_t *, gint, gint, GWidthTracker *, const GDisplayOptions *, const segcnt_list *); +#endif + #endif /* _GLIBEXT_BUFFERLINE_H */ diff --git a/src/glibext/configuration.h b/src/glibext/configuration.h index aac6dc7..b5dcc3c 100644 --- a/src/glibext/configuration.h +++ b/src/glibext/configuration.h @@ -27,7 +27,28 @@ #include #include -#include +#ifdef HAVE_GTK_SUPPORT +# include +#endif + + +#if !defined(HAVE_GTK_SUPPORT) && !defined(HOMEMADE_RGBA) + +# define HOMEMADE_RGBA + +/** + * Copie depuis /usr/include/gtk-3.0/gdk/gdkrgba.h + */ +typedef struct _GdkRGBA +{ + gdouble red; + gdouble green; + gdouble blue; + gdouble alpha; + +} GdkRGBA; + +#endif diff --git a/src/glibext/delayed-int.h b/src/glibext/delayed-int.h index dd780d0..4f84e86 100644 --- a/src/glibext/delayed-int.h +++ b/src/glibext/delayed-int.h @@ -28,8 +28,8 @@ #include "delayed.h" +#include "notifier.h" #include "../common/dllist.h" -#include "../gtkext/gtkstatusstack.h" diff --git a/src/glibext/delayed.c b/src/glibext/delayed.c index ec4063d..321144b 100644 --- a/src/glibext/delayed.c +++ b/src/glibext/delayed.c @@ -33,7 +33,9 @@ #include "delayed-int.h" #include "../core/nproc.h" -#include "../gui/core/global.h" +#ifdef HAVE_GTK_SUPPORT +# include "../gui/core/global.h" +#endif @@ -612,7 +614,11 @@ static void *g_work_group_process(GWorkGroup *group) g_mutex_unlock(&group->mutex); +#ifdef HAVE_GTK_SUPPORT status = get_global_status(); +#else + status = NULL; +#endif g_delayed_work_process(work, status); g_object_unref(G_OBJECT(work)); diff --git a/src/glibext/delayed.h b/src/glibext/delayed.h index 0fc7e7a..89eed12 100644 --- a/src/glibext/delayed.h +++ b/src/glibext/delayed.h @@ -31,11 +31,6 @@ -/* Abstration d'une gestion de barre de statut (instance) */ -typedef struct _GtkStatusStack GtkStatusStack; - - - /* -------------------------- TACHE DIFFEREE DANS LE TEMPS -------------------------- */ diff --git a/src/glibext/gbinarycursor.c b/src/glibext/gbinarycursor.c index 5308fdf..76975a7 100644 --- a/src/glibext/gbinarycursor.c +++ b/src/glibext/gbinarycursor.c @@ -28,6 +28,7 @@ #include "glinecursor-int.h" +#include "../analysis/binary.h" diff --git a/src/glibext/gbinportion-int.h b/src/glibext/gbinportion-int.h index b5c70c8..1e6ade3 100644 --- a/src/glibext/gbinportion-int.h +++ b/src/glibext/gbinportion-int.h @@ -36,7 +36,9 @@ struct _GBinPortion char *code; /* Code de la couleur de fond */ +#ifdef HAVE_GTK_SUPPORT cairo_surface_t *icon; /* Image de représentation */ +#endif char *desc; /* Désignation humaine */ char **text; /* Lignes brutes à représenter */ diff --git a/src/glibext/gbinportion.c b/src/glibext/gbinportion.c index 884c31d..4f16e9f 100644 --- a/src/glibext/gbinportion.c +++ b/src/glibext/gbinportion.c @@ -38,9 +38,9 @@ #include "../analysis/human/asm/lang.h" #include "../common/extstr.h" #include "../common/sort.h" +#include "../core/columns.h" #include "../glibext/gbinarycursor.h" #include "../glibext/linegen-int.h" -#include "../gtkext/gtkblockdisplay.h" @@ -62,9 +62,13 @@ static void g_binary_portion_dispose(GBinPortion *); /* Procède à la libération totale de la mémoire. */ static void g_binary_portion_finalize(GBinPortion *); +#ifdef HAVE_GTK_SUPPORT + /* Détermine l'aire d'une sous-portion. */ static bool g_binary_portion_compute_sub_area(const GBinPortion *, phys_t, const GdkRectangle *, GdkRectangle *); +#endif + /* ------------------------ OFFRE DE CAPACITES DE GENERATION ------------------------ */ @@ -73,12 +77,16 @@ static bool g_binary_portion_compute_sub_area(const GBinPortion *, phys_t, const /* Indique le nombre de ligne prêtes à être générées. */ static size_t g_binary_portion_count_lines(const GBinPortion *); +#ifdef HAVE_GTK_SUPPORT + /* Retrouve l'emplacement correspondant à une position donnée. */ static void g_binary_portion_compute_cursor(const GBinPortion *, gint, size_t, size_t, GLineCursor **); /* Détermine si le conteneur s'inscrit dans une plage donnée. */ static int g_binary_portion_contain_cursor(const GBinPortion *, size_t, size_t, const GLineCursor *); +#endif + /* Renseigne sur les propriétés liées à un générateur. */ static BufferLineFlags g_binary_portion_get_flags(const GBinPortion *, size_t, size_t); @@ -93,12 +101,19 @@ static void g_binary_portion_print(GBinPortion *, GBufferLine *, size_t, size_t, /* Détermine si une portion contient une adresse donnée. */ static bool g_binary_portion_contains_vmpa(const GBinPortion *, const vmpa2t *); +#ifdef HAVE_GTK_SUPPORT + +/* Recherche la portion présente à une adresse donnée. */ +static GBinPortion *g_binary_portion_find_with_area_at_addr(GBinPortion *, const vmpa2t *, GdkRectangle *); + /* Détermine si une portion contient une position donnée. */ static bool g_binary_portion_contains_physical(const GBinPortion *, phys_t); /* Détermine si une portion contient une adresse donnée. */ static bool g_binary_portion_contains_virtual(const GBinPortion *, virt_t); +#endif + /* ---------------------------------------------------------------------------------- */ @@ -154,6 +169,10 @@ static void g_binary_portion_init(GBinPortion *portion) portion->code = NULL; +#ifdef HAVE_GTK_SUPPORT + portion->icon = NULL; +#endif + portion->desc = NULL; portion->text = NULL; portion->lcount = 0; @@ -181,8 +200,10 @@ static void g_binary_portion_init(GBinPortion *portion) static void g_binary_portion_interface_init(GLineGeneratorInterface *iface) { iface->count = (linegen_count_lines_fc)g_binary_portion_count_lines; +#ifdef HAVE_GTK_SUPPORT iface->compute = (linegen_compute_fc)g_binary_portion_compute_cursor; iface->contain = (linegen_contain_fc)g_binary_portion_contain_cursor; +#endif iface->get_flags = (linegen_get_flags_fc)g_binary_portion_get_flags; iface->print = (linegen_print_fc)g_binary_portion_print; @@ -232,8 +253,10 @@ static void g_binary_portion_finalize(GBinPortion *portion) if (portion->code != NULL) free(portion->code); +#ifdef HAVE_GTK_SUPPORT if (portion->icon != NULL) cairo_surface_destroy(portion->icon); +#endif if (portion->desc != NULL) free(portion->desc); @@ -310,6 +333,9 @@ int g_binary_portion_compare(const GBinPortion **a, const GBinPortion **b) } +#ifdef HAVE_GTK_SUPPORT + + /****************************************************************************** * * * Paramètres : portion = description de partie à mettre à jour. * @@ -360,6 +386,9 @@ cairo_surface_t *g_binary_portion_get_icon(const GBinPortion *portion) } +#endif + + /****************************************************************************** * * * Paramètres : portion = description de partie à mettre à jour. * @@ -588,6 +617,9 @@ PortionAccessRights g_binary_portion_get_rights(const GBinPortion *portion) } +#ifdef HAVE_GTK_SUPPORT + + /****************************************************************************** * * * Paramètres : portion = description de partie à mettre à jour. * @@ -669,6 +701,9 @@ void g_binary_portion_query_tooltip(GBinPortion *portion, GtkTooltip *tooltip) } +#ifdef HAVE_GTK_SUPPORT + + /****************************************************************************** * * * Paramètres : portion = portion mère à consulter. * @@ -707,6 +742,9 @@ static bool g_binary_portion_compute_sub_area(const GBinPortion *portion, phys_t } +#endif + + /****************************************************************************** * * * Paramètres : portion = description de partie à consulter. * @@ -762,6 +800,9 @@ void g_binary_portion_draw(const GBinPortion *portion, GtkStyleContext *context, } +#endif + + /****************************************************************************** * * * Paramètres : portion = portion principale à compléter. * @@ -1025,6 +1066,9 @@ static size_t g_binary_portion_count_lines(const GBinPortion *portion) } +#ifdef HAVE_GTK_SUPPORT + + /****************************************************************************** * * * Paramètres : portion = générateur à consulter. * @@ -1081,6 +1125,9 @@ static int g_binary_portion_contain_cursor(const GBinPortion *portion, size_t in } +#endif + + /****************************************************************************** * * * Paramètres : portion = générateur à consulter. * @@ -1143,6 +1190,9 @@ static void g_binary_portion_print(GBinPortion *portion, GBufferLine *line, size /* ---------------------------------------------------------------------------------- */ +#ifdef HAVE_GTK_SUPPORT + + /****************************************************************************** * * * Paramètres : portion = couche de portions à parcourir pour les recherches.* @@ -1237,6 +1287,9 @@ GBinPortion *g_binary_portion_find_at_pos(GBinPortion *portion, gint x, GdkRecta } +#endif + + /****************************************************************************** * * * Paramètres : portion = portion mère à consulter. * @@ -1276,6 +1329,55 @@ static bool g_binary_portion_contains_vmpa(const GBinPortion *portion, const vmp * * * Paramètres : portion = couche de portions à parcourir pour les recherches.* * addr = adresse du point de recherche. * +* * +* Description : Recherche la portion présente à une adresse donnée. * +* * +* Retour : Portion trouvée à l'endroit indiqué. * +* * +* Remarques : - * +* * +******************************************************************************/ + +GBinPortion *g_binary_portion_find_at_addr(GBinPortion *portion, const vmpa2t *addr) +{ + GBinPortion *result; /* Portion à retourner */ + phys_t full; /* Espace total représenté */ + size_t i; /* Boucle de parcours #1 */ + GBinPortion *sub; /* Portion incluse à traiter */ + + result = NULL; + + full = get_mrange_length(&portion->range); + + for (i = 0; i < portion->count && result == NULL; i++) + { + sub = portion->subs[i]; + + if (!g_binary_portion_contains_vmpa(sub, addr)) + continue; + + result = g_binary_portion_find_at_addr(sub, addr); + + } + + if (result == NULL) + { + result = portion; + g_object_ref(G_OBJECT(result)); + } + + return result; + +} + + +#ifdef HAVE_GTK_SUPPORT + + +/****************************************************************************** +* * +* Paramètres : portion = couche de portions à parcourir pour les recherches.* +* addr = adresse du point de recherche. * * area = étendue de portion mère, puis celle trouvée. [OUT] * * * * Description : Recherche la portion présente à une adresse donnée. * @@ -1286,7 +1388,7 @@ static bool g_binary_portion_contains_vmpa(const GBinPortion *portion, const vmp * * ******************************************************************************/ -GBinPortion *g_binary_portion_find_at_addr(GBinPortion *portion, const vmpa2t *addr, GdkRectangle *area) +static GBinPortion *g_binary_portion_find_with_area_at_addr(GBinPortion *portion, const vmpa2t *addr, GdkRectangle *area) { GBinPortion *result; /* Portion à retourner */ phys_t full; /* Espace total représenté */ @@ -1308,7 +1410,7 @@ GBinPortion *g_binary_portion_find_at_addr(GBinPortion *portion, const vmpa2t *a if (!g_binary_portion_compute_sub_area(sub, full, area, &sub_area)) continue; - result = g_binary_portion_find_at_addr(sub, addr, &sub_area); + result = g_binary_portion_find_with_area_at_addr(sub, addr, &sub_area); if (result != NULL) *area = sub_area; @@ -1385,7 +1487,7 @@ bool get_binary_portion_pos_from_addr(GBinPortion *root, const vmpa2t *addr, con owner_area = *area; - owner = g_binary_portion_find_at_addr(root, addr, &owner_area); + owner = g_binary_portion_find_with_area_at_addr(root, addr, &owner_area); if (owner == NULL) return false; diff = compute_vmpa_diff(addr, get_mrange_addr(&owner->range)); @@ -1431,6 +1533,9 @@ gboolean query_tooltip_for_binary_portion(GBinPortion *root, gint x, gint y, con } +#endif + + /****************************************************************************** * * * Paramètres : portion = portion mère à consulter. * diff --git a/src/glibext/gbinportion.h b/src/glibext/gbinportion.h index 3a960b7..7bc1ee6 100644 --- a/src/glibext/gbinportion.h +++ b/src/glibext/gbinportion.h @@ -27,7 +27,9 @@ #include #include -#include +#ifdef HAVE_GTK_SUPPORT +# include +#endif #include "../arch/vmpa.h" @@ -87,12 +89,16 @@ GBinPortion *g_binary_portion_new(const char *, const vmpa2t *, phys_t); /* Etablit la comparaison ascendante entre deux portions. */ int g_binary_portion_compare(const GBinPortion **, const GBinPortion **); +#ifdef HAVE_GTK_SUPPORT + /* Attribue à la portion une éventuelle image de représentation. */ void g_binary_portion_set_icon(GBinPortion *, cairo_surface_t *); /* Fournit une éventuelle image de représentation de portion. */ cairo_surface_t *g_binary_portion_get_icon(const GBinPortion *); +#endif + /* Attribue une description humaine à une partie de code. */ void g_binary_portion_set_desc(GBinPortion *, const char *); @@ -117,12 +123,16 @@ void g_binary_portion_set_rights(GBinPortion *, PortionAccessRights); /* Fournit les droits associés à une partie de code. */ PortionAccessRights g_binary_portion_get_rights(const GBinPortion *); +#ifdef HAVE_GTK_SUPPORT + /* Prépare une astuce concernant une portion pour son affichage. */ void g_binary_portion_query_tooltip(GBinPortion *, GtkTooltip *); /* Représente la portion sur une bande dédiée. */ void g_binary_portion_draw(const GBinPortion *, GtkStyleContext *, cairo_t *, const GdkRectangle *); +#endif + /* Procède à l'inclusion d'une portion dans une autre. */ void g_binary_portion_include(GBinPortion *, GBinPortion *); @@ -147,14 +157,20 @@ bool g_binary_portion_visit(GBinPortion *, visit_portion_fc, void *); /* ------------------------ PARCOURS D'ENSEMBLES DE PORTIONS ------------------------ */ +#ifdef HAVE_GTK_SUPPORT + /* Compte le nombre de portions présentes dans une arborescence. */ size_t g_binary_portion_count(const GBinPortion *); /* Recherche la portion présente à un point donné. */ GBinPortion *g_binary_portion_find_at_pos(GBinPortion *, gint, GdkRectangle *); +#endif + /* Recherche la portion présente à une adresse donnée. */ -GBinPortion *g_binary_portion_find_at_addr(GBinPortion *, const vmpa2t *, GdkRectangle *); +GBinPortion *g_binary_portion_find_at_addr(GBinPortion *, const vmpa2t *); + +#ifdef HAVE_GTK_SUPPORT /* Fournit la position correspondant à une adresse donnée. */ bool get_binary_portion_addr_from_pos(GBinPortion *, gint, const GdkRectangle *, vmpa2t *); @@ -165,6 +181,8 @@ bool get_binary_portion_pos_from_addr(GBinPortion *, const vmpa2t *, const GdkRe /* Prépare une astuce concernant une portion pour son affichage. */ gboolean query_tooltip_for_binary_portion(GBinPortion *, gint, gint, const GdkRectangle *, GtkTooltip *); +#endif + /* Fournit l'emplacement correspondant à une position physique. */ bool g_binary_portion_translate_offset_into_vmpa(const GBinPortion *, phys_t, vmpa2t *); diff --git a/src/glibext/generators/Makefile.am b/src/glibext/generators/Makefile.am index c448bb7..a332498 100644 --- a/src/glibext/generators/Makefile.am +++ b/src/glibext/generators/Makefile.am @@ -1,21 +1,21 @@ noinst_LTLIBRARIES = libglibextgenerators.la -libglibextgenerators_la_SOURCES = \ - hex.h hex.c \ - prologue.h prologue.c \ - rborder.h rborder.c -libglibextgenerators_la_LDFLAGS = +libglibextgenerators_la_SOURCES = \ + prologue.h prologue.c \ + rborder.h rborder.c +if BUILD_GTK_SUPPORT -devdir = $(includedir)/chrysalide/$(subdir:src/%=core/%) +libglibextgenerators_la_SOURCES += \ + hex.h hex.c -dev_HEADERS = $(libglibextgenerators_la_SOURCES:%c=) +endif +libglibextgenerators_la_CFLAGS = $(TOOLKIT_CFLAGS) $(LIBXML_CFLAGS) -AM_CPPFLAGS = $(LIBGTK_CFLAGS) $(LIBXML_CFLAGS) -AM_CFLAGS = $(DEBUG_CFLAGS) $(WARNING_FLAGS) $(COMPLIANCE_FLAGS) +devdir = $(includedir)/chrysalide/$(subdir:src/%=core/%) -SUBDIRS = +dev_HEADERS = $(libglibextgenerators_la_SOURCES:%c=) diff --git a/src/glibext/generators/hex.c b/src/glibext/generators/hex.c index 7de2d6b..b182176 100644 --- a/src/glibext/generators/hex.c +++ b/src/glibext/generators/hex.c @@ -37,6 +37,9 @@ +/* --------------------------- RENDU AMIQUE D'HEXADECIMAL --------------------------- */ + + /* Tampon pour générateur de lignes hexadécimales (instance) */ struct _GHexGenerator { @@ -79,15 +82,24 @@ static void g_hex_generator_dispose(GHexGenerator *); /* Procède à la libération totale de la mémoire. */ static void g_hex_generator_finalize(GHexGenerator *); + + +/* ------------------------ OFFRE DE CAPACITES DE GENERATION ------------------------ */ + + /* Indique le nombre de ligne prêtes à être générées. */ static size_t g_hex_generator_count_lines(const GHexGenerator *); +#ifdef HAVE_GTK_SUPPORT + /* Retrouve l'emplacement correspondant à une position donnée. */ static void g_hex_generator_compute_cursor(const GHexGenerator *, gint, size_t, size_t, GLineCursor **); /* Détermine si le conteneur s'inscrit dans une plage donnée. */ static int g_hex_generator_contain_cursor(const GHexGenerator *, size_t, size_t, const GLineCursor *); +#endif + /* Renseigne sur les propriétés liées à un générateur. */ static BufferLineFlags g_hex_generator_get_flags(const GHexGenerator *, size_t, size_t); @@ -96,6 +108,11 @@ static void g_hex_generator_print(GHexGenerator *, GBufferLine *, size_t, size_t +/* ---------------------------------------------------------------------------------- */ +/* RENDU AMIQUE D'HEXADECIMAL */ +/* ---------------------------------------------------------------------------------- */ + + /* Détermine le type du générateur de lignes hexadécimales à la volée. */ G_DEFINE_TYPE_WITH_CODE(GHexGenerator, g_hex_generator, G_TYPE_OBJECT, G_IMPLEMENT_INTERFACE(G_TYPE_LINE_GENERATOR, g_hex_generator_interface_init)); @@ -186,8 +203,10 @@ static void g_hex_generator_init(GHexGenerator *generator) static void g_hex_generator_interface_init(GLineGeneratorInterface *iface) { iface->count = (linegen_count_lines_fc)g_hex_generator_count_lines; +#ifdef HAVE_GTK_SUPPORT iface->compute = (linegen_compute_fc)g_hex_generator_compute_cursor; iface->contain = (linegen_contain_fc)g_hex_generator_contain_cursor; +#endif iface->get_flags = (linegen_get_flags_fc)g_hex_generator_get_flags; iface->print = (linegen_print_fc)g_hex_generator_print; @@ -262,6 +281,12 @@ GHexGenerator *g_hex_generator_new(GBinContent *content) } + +/* ---------------------------------------------------------------------------------- */ +/* OFFRE DE CAPACITES DE GENERATION */ +/* ---------------------------------------------------------------------------------- */ + + /****************************************************************************** * * * Paramètres : generator = générateur à consulter. * @@ -291,6 +316,9 @@ static size_t g_hex_generator_count_lines(const GHexGenerator *generator) } +#ifdef HAVE_GTK_SUPPORT + + /****************************************************************************** * * * Paramètres : generator = générateur à consulter. * @@ -407,6 +435,9 @@ static int g_hex_generator_contain_cursor(const GHexGenerator *generator, size_t } +#endif + + /****************************************************************************** * * * Paramètres : generator = générateur à consulter. * diff --git a/src/glibext/generators/prologue.c b/src/glibext/generators/prologue.c index e19107b..944de8e 100644 --- a/src/glibext/generators/prologue.c +++ b/src/glibext/generators/prologue.c @@ -29,14 +29,19 @@ #include "../bufferline.h" -#include "../gbinarycursor.h" +#ifdef HAVE_GTK_SUPPORT +# include "../gbinarycursor.h" +#endif #include "../linegen-int.h" #include "../linesegment.h" +#include "../../core/columns.h" #include "../../format/executable.h" -#include "../../gtkext/gtkblockdisplay.h" +/* ------------------------- MARQUE D'INTRODUCTION DE RENDU ------------------------- */ + + /* Tampon pour générateur de lignes en prologue (instance) */ struct _GIntroGenerator { @@ -72,15 +77,24 @@ static void g_intro_generator_dispose(GIntroGenerator *); /* Procède à la libération totale de la mémoire. */ static void g_intro_generator_finalize(GIntroGenerator *); + + +/* ------------------------ OFFRE DE CAPACITES DE GENERATION ------------------------ */ + + /* Indique le nombre de ligne prêtes à être générées. */ static size_t g_intro_generator_count_lines(const GIntroGenerator *); +#ifdef HAVE_GTK_SUPPORT + /* Retrouve l'emplacement correspondant à une position donnée. */ static void g_intro_generator_compute_cursor(const GIntroGenerator *, gint, size_t, size_t, GLineCursor **); /* Détermine si le conteneur s'inscrit dans une plage donnée. */ static int g_intro_generator_contain_cursor(const GIntroGenerator *, size_t, size_t, const GLineCursor *); +#endif + /* Renseigne sur les propriétés liées à un générateur. */ static BufferLineFlags g_intro_generator_get_flags(const GIntroGenerator *, size_t, size_t); @@ -89,6 +103,11 @@ static void g_intro_generator_print(GIntroGenerator *, GBufferLine *, size_t, si +/* ---------------------------------------------------------------------------------- */ +/* MARQUE D'INTRODUCTION DE RENDU */ +/* ---------------------------------------------------------------------------------- */ + + /* Détermine le type du générateur de lignes d'introduction à la volée. */ G_DEFINE_TYPE_WITH_CODE(GIntroGenerator, g_intro_generator, G_TYPE_OBJECT, G_IMPLEMENT_INTERFACE(G_TYPE_LINE_GENERATOR, g_intro_generator_interface_init)); @@ -153,8 +172,10 @@ static void g_intro_generator_init(GIntroGenerator *generator) static void g_intro_generator_interface_init(GLineGeneratorInterface *iface) { iface->count = (linegen_count_lines_fc)g_intro_generator_count_lines; +#ifdef HAVE_GTK_SUPPORT iface->compute = (linegen_compute_fc)g_intro_generator_compute_cursor; iface->contain = (linegen_contain_fc)g_intro_generator_contain_cursor; +#endif iface->get_flags = (linegen_get_flags_fc)g_intro_generator_get_flags; iface->print = (linegen_print_fc)g_intro_generator_print; @@ -263,6 +284,12 @@ GIntroGenerator *g_intro_generator_new(const GBinFormat *format, const GCodingLa } + +/* ---------------------------------------------------------------------------------- */ +/* OFFRE DE CAPACITES DE GENERATION */ +/* ---------------------------------------------------------------------------------- */ + + /****************************************************************************** * * * Paramètres : generator = générateur à consulter. * @@ -282,6 +309,9 @@ static size_t g_intro_generator_count_lines(const GIntroGenerator *generator) } +#ifdef HAVE_GTK_SUPPORT + + /****************************************************************************** * * * Paramètres : generator = générateur à consulter. * @@ -338,6 +368,9 @@ static int g_intro_generator_contain_cursor(const GIntroGenerator *generator, si } +#endif + + /****************************************************************************** * * * Paramètres : generator = générateur à consulter. * diff --git a/src/glibext/generators/rborder.c b/src/glibext/generators/rborder.c index 97e7a22..b4db5d3 100644 --- a/src/glibext/generators/rborder.c +++ b/src/glibext/generators/rborder.c @@ -30,13 +30,18 @@ #include "../bufferline.h" -#include "../gbinarycursor.h" +#ifdef HAVE_GTK_SUPPORT +# include "../gbinarycursor.h" +#endif #include "../linegen-int.h" #include "../linesegment.h" -#include "../../gtkext/gtkblockdisplay.h" +#include "../../core/columns.h" +/* -------------------------- MARQUE DE BORDURE DE ROUTINE -------------------------- */ + + /* Tampon pour générateur de délimitations de routines (instance) */ struct _GBorderGenerator { @@ -79,15 +84,24 @@ static void g_border_generator_dispose(GBorderGenerator *); /* Procède à la libération totale de la mémoire. */ static void g_border_generator_finalize(GBorderGenerator *); + + +/* ------------------------ OFFRE DE CAPACITES DE GENERATION ------------------------ */ + + /* Indique le nombre de ligne prêtes à être générées. */ static size_t g_border_generator_count_lines(const GBorderGenerator *); +#ifdef HAVE_GTK_SUPPORT + /* Retrouve l'emplacement correspondant à une position donnée. */ static void g_border_generator_compute_cursor(const GBorderGenerator *, gint, size_t, size_t, GLineCursor **); /* Détermine si le conteneur s'inscrit dans une plage donnée. */ static int g_border_generator_contain_cursor(const GBorderGenerator *, size_t, size_t, const GLineCursor *); +#endif + /* Renseigne sur les propriétés liées à un générateur. */ static BufferLineFlags g_border_generator_get_flags(const GBorderGenerator *, size_t, size_t); @@ -96,6 +110,11 @@ static void g_border_generator_print(GBorderGenerator *, GBufferLine *, size_t, +/* ---------------------------------------------------------------------------------- */ +/* MARQUE DE BORDURE DE ROUTINE */ +/* ---------------------------------------------------------------------------------- */ + + /* Détermine le type du générateur de délimitations de routines à la volée. */ G_DEFINE_TYPE_WITH_CODE(GBorderGenerator, g_border_generator, G_TYPE_OBJECT, G_IMPLEMENT_INTERFACE(G_TYPE_LINE_GENERATOR, g_border_generator_interface_init)); @@ -158,8 +177,10 @@ static void g_border_generator_init(GBorderGenerator *generator) static void g_border_generator_interface_init(GLineGeneratorInterface *iface) { iface->count = (linegen_count_lines_fc)g_border_generator_count_lines; +#ifdef HAVE_GTK_SUPPORT iface->compute = (linegen_compute_fc)g_border_generator_compute_cursor; iface->contain = (linegen_contain_fc)g_border_generator_contain_cursor; +#endif iface->get_flags = (linegen_get_flags_fc)g_border_generator_get_flags; iface->print = (linegen_print_fc)g_border_generator_print; @@ -240,6 +261,12 @@ GBorderGenerator *g_border_generator_new(GCodingLanguage *lang, const vmpa2t *ad } + +/* ---------------------------------------------------------------------------------- */ +/* OFFRE DE CAPACITES DE GENERATION */ +/* ---------------------------------------------------------------------------------- */ + + /****************************************************************************** * * * Paramètres : generator = générateur à consulter. * @@ -259,6 +286,9 @@ static size_t g_border_generator_count_lines(const GBorderGenerator *generator) } +#ifdef HAVE_GTK_SUPPORT + + /****************************************************************************** * * * Paramètres : generator = générateur à consulter. * @@ -315,6 +345,9 @@ static int g_border_generator_contain_cursor(const GBorderGenerator *generator, } +#endif + + /****************************************************************************** * * * Paramètres : generator = générateur à consulter. * diff --git a/src/glibext/glinecursor-int.h b/src/glibext/glinecursor-int.h index b440f76..5a2f84d 100644 --- a/src/glibext/glinecursor-int.h +++ b/src/glibext/glinecursor-int.h @@ -26,7 +26,7 @@ #include "glinecursor.h" -#include "../gtkext/gtkstatusstack.h" +#include "notifier.h" diff --git a/src/glibext/glinecursor.h b/src/glibext/glinecursor.h index 5c35c52..549dfbe 100644 --- a/src/glibext/glinecursor.h +++ b/src/glibext/glinecursor.h @@ -32,11 +32,7 @@ #include "../analysis/loaded.h" #include "../common/packed.h" #include "../common/sqlite.h" - - - -/* Depuis ../gtkext/gtkstatusstack.h : abstration d'une gestion de barre de statut (instance) */ -typedef struct _GtkStatusStack GtkStatusStack; +#include "../glibext/notifier.h" diff --git a/src/glibext/linecolumn.c b/src/glibext/linecolumn.c index 38088d2..03fa179 100644 --- a/src/glibext/linecolumn.c +++ b/src/glibext/linecolumn.c @@ -49,7 +49,9 @@ void init_line_column(line_column *column) column->segments = NULL; column->count = 0; +#ifdef HAVE_GTK_SUPPORT column->max_width = 0; +#endif } @@ -81,11 +83,16 @@ void reset_line_column(line_column *column) column->count = 0; +#ifdef HAVE_GTK_SUPPORT column->max_width = 0; +#endif } +#ifdef HAVE_GTK_SUPPORT + + /****************************************************************************** * * * Paramètres : column = colonne de ligne à mettre à jour. * @@ -129,6 +136,9 @@ gint get_column_width(const line_column *column) } +#endif + + /****************************************************************************** * * * Paramètres : column = colonne de ligne à venir compléter. * @@ -157,7 +167,9 @@ size_t append_text_to_line_column(line_column *column, const char *text, size_t column->segments[result] = segment; +#ifdef HAVE_GTK_SUPPORT column->max_width += get_line_segment_width(segment); +#endif return result; @@ -200,11 +212,16 @@ void replace_text_in_line_column(line_column *column, size_t index, const char * column->segments[index] = segment; +#ifdef HAVE_GTK_SUPPORT refresh_line_column_width(column); +#endif } +#ifdef HAVE_GTK_SUPPORT + + /****************************************************************************** * * * Paramètres : column = colonne de ligne de texte à consulter. * @@ -432,6 +449,9 @@ void draw_line_column_segments(const line_column *column, cairo_t *cairo, gint x } +#endif + + /****************************************************************************** * * * Paramètres : column = colonne de ligne de texte à venir consulter. * diff --git a/src/glibext/linecolumn.h b/src/glibext/linecolumn.h index 05624c5..15baa4c 100644 --- a/src/glibext/linecolumn.h +++ b/src/glibext/linecolumn.h @@ -27,7 +27,9 @@ #include #include -#include +#ifdef HAVE_GTK_SUPPORT +# include +#endif #include "linesegment.h" @@ -44,7 +46,9 @@ struct _line_column line_segment **segments; /* Liste des segments contenus */ size_t count; /* Taille de cette liste */ +#ifdef HAVE_GTK_SUPPORT int max_width; /* Largeur max. de l'espace */ +#endif }; @@ -55,18 +59,24 @@ void init_line_column(line_column *); /* Réinitialise une colonne de ligne. */ void reset_line_column(line_column *); +#ifdef HAVE_GTK_SUPPORT + /* Recalcule la largeur d'une colonne de segments. */ void refresh_line_column_width(line_column *); /* Fournit la quantité de pixels requise pour l'impression. */ gint get_column_width(const line_column *); +#endif + /* Ajoute un fragment de texte à une colonne de ligne. */ size_t append_text_to_line_column(line_column *, const char *, size_t, RenderingTagType); /* Remplace un fragment de texte dans une colonne de ligne. */ void replace_text_in_line_column(line_column *, size_t, const char *, size_t); +#ifdef HAVE_GTK_SUPPORT + /* Indique l'indice du premier contenu de la colonne. */ bool get_line_column_first_content_index(const line_column *, size_t *); @@ -85,6 +95,8 @@ line_segment *get_line_column_content_from_index(const line_column *, size_t); /* Imprime le contenu d'une colonne de ligne de texte. */ void draw_line_column_segments(const line_column *, cairo_t *, gint, gint, const segcnt_list *); +#endif + /* Donne le texte représenté par une colonne de ligne de texte. */ char *get_line_column_text(const line_column *, bool); diff --git a/src/glibext/linesegment.c b/src/glibext/linesegment.c index da6fbe2..ec8cc96 100644 --- a/src/glibext/linesegment.c +++ b/src/glibext/linesegment.c @@ -30,13 +30,14 @@ #include #include #include -#include #include "../common/extstr.h" #include "../common/fnv1a.h" #include "../core/paths.h" -#include "../gtkext/rendering.h" +#ifdef HAVE_GTK_SUPPORT +# include "../gtkext/rendering.h" +#endif @@ -80,6 +81,9 @@ static const char *_segment_names[RTT_COUNT] = { }; + +#ifdef HAVE_GTK_SUPPORT + /* Compléments à Cairo */ #define CAIRO_FONT_SLANT_COUNT 3 @@ -96,6 +100,7 @@ typedef struct _segment_rendering cairo_t *font_ctxts[CAIRO_FONTS_COUNT]; /* Contextes de police */ double x_advances[CAIRO_FONTS_COUNT]; /* Largeurs par caractère */ + rendering_pattern_t patterns[RTT_COUNT];/* Modèles d'impression */ } segment_rendering; @@ -104,6 +109,8 @@ typedef struct _segment_rendering /* Configuration globale des rendus */ static segment_rendering _seg_params; +#endif + /* ----------------------- ISOLATION DE CONTENUS PARTAGEABLES ----------------------- */ @@ -114,7 +121,11 @@ struct _line_segment { gint ref_count; /* Compteur de références */ - rendering_pattern_t *pattern; /* Propriétés du rendu */ +#ifdef HAVE_GTK_SUPPORT + rendering_pattern_t *pattern; /* Propriétés du rendu */ +#else + RenderingTagType type; /* Type de rendu attendu */ +#endif fnv64_t hash; /* Empreinte pour comparaisons */ char text[0]; /* Texte brut conservé */ @@ -144,6 +155,8 @@ static void release_shared_segment_content(line_segment *); /* -------------------- GESTION OPTIMALE D'UNE LISTE DE CONTENUS -------------------- */ +#ifdef HAVE_GTK_SUPPORT + /* Liste identifiant un ensemble de segments */ struct _segcnt_list { @@ -158,6 +171,8 @@ struct _segcnt_list /* Indique si le contenu d'un segment est notable ou non. */ bool selection_list_has_segment_content(const segcnt_list *, const line_segment *); +#endif + /* ---------------------------------------------------------------------------------- */ @@ -165,6 +180,9 @@ bool selection_list_has_segment_content(const segcnt_list *, const line_segment /* ---------------------------------------------------------------------------------- */ +#ifdef HAVE_GTK_SUPPORT + + /****************************************************************************** * * * Paramètres : - * @@ -223,6 +241,9 @@ bool load_segment_rendering_parameters(void) } +#endif + + /* ---------------------------------------------------------------------------------- */ /* ISOLATION DE CONTENUS PARTAGEABLES */ @@ -309,7 +330,11 @@ static bool is_line_segment_equal(const line_segment *content, const line_segmen { bool result; /* Résultat à retourner */ +#ifdef HAVE_GTK_SUPPORT result = (content->pattern == other->pattern); +#else + result = (content->type == other->type); +#endif if (result) result = (cmp_fnv_64a(content->hash, other->hash) == 0); @@ -452,7 +477,11 @@ line_segment *get_new_line_segment(RenderingTagType type, const char *text, size else content = (line_segment *)malloc(sizeof(line_segment) + length + 1); +#ifdef HAVE_GTK_SUPPORT content->pattern = &_seg_params.patterns[type]; +#else + content->type = type; +#endif content->hash = fnv_64a_hash(text); @@ -523,7 +552,11 @@ RenderingTagType get_line_segment_type(const line_segment *segment) { RenderingTagType result; /* Résultat à renvoyer */ +#ifdef HAVE_GTK_SUPPORT result = (RenderingTagType)(segment->pattern - _seg_params.patterns); +#else + result = segment->type; +#endif return result; @@ -545,6 +578,16 @@ RenderingTagType get_line_segment_type(const line_segment *segment) char *get_line_segment_text(const line_segment *segment, bool markup) { +#ifndef HAVE_GTK_SUPPORT + + char *result; /* Description à renvoyer */ + + result = strdup(segment->text); + + return result; + +#else + char *result; /* Description à renvoyer */ char color[7]; /* Couleur hexadécimale */ char *valid; @@ -624,9 +667,14 @@ char *get_line_segment_text(const line_segment *segment, bool markup) return result; +#endif + } +#ifdef HAVE_GTK_SUPPORT + + /****************************************************************************** * * * Paramètres : segment = fragment de texte à consulter. * @@ -911,6 +959,9 @@ void export_line_segment_style(buffer_export_context *ctx, BufferExportType type } +#endif + + /****************************************************************************** * * * Paramètres : segment = fragment de texte à manipuler. * @@ -927,12 +978,12 @@ void export_line_segment_style(buffer_export_context *ctx, BufferExportType type void export_line_segment(const line_segment *segment, buffer_export_context *ctx, BufferExportType type) { - size_t index; /* Indice du modèle de rendu */ + RenderingTagType index; /* Indice du modèle de rendu */ switch (type) { case BET_HTML: - index = (segment->pattern - _seg_params.patterns); + index = get_line_segment_type(segment); dprintf(ctx->fd, "", _segment_names[index]); break; default: @@ -959,6 +1010,9 @@ void export_line_segment(const line_segment *segment, buffer_export_context *ctx /* ---------------------------------------------------------------------------------- */ +#ifdef HAVE_GTK_SUPPORT + + /****************************************************************************** * * * Paramètres : - * @@ -1147,3 +1201,6 @@ bool selection_list_has_segment_content(const segcnt_list *list, const line_segm return result; } + + +#endif diff --git a/src/glibext/linesegment.h b/src/glibext/linesegment.h index 3585ffb..99837f9 100644 --- a/src/glibext/linesegment.h +++ b/src/glibext/linesegment.h @@ -27,22 +27,31 @@ #include #include -#include -#include +#ifdef HAVE_GTK_SUPPORT +# include +# include +#endif +#ifdef HAVE_GTK_SUPPORT /* Liste identifiant un ensemble de segments */ typedef struct _segcnt_list segcnt_list; +#endif + /* ------------------------ NATURE POUR UN FRAGMENT DE TEXTE ------------------------ */ +#ifdef HAVE_GTK_SUPPORT + /* Procède à l'initialisation des paramètres de rendu de texte. */ bool load_segment_rendering_parameters(void); +#endif + /* ----------------------- ISOLATION DE CONTENUS PARTAGEABLES ----------------------- */ @@ -127,6 +136,8 @@ RenderingTagType get_line_segment_type(const line_segment *); /* Fournit le texte brut conservé dans le segment. */ char *get_line_segment_text(const line_segment *, bool); +#ifdef HAVE_GTK_SUPPORT + /* Fournit la quantité de pixels requise pour l'impression. */ gint get_line_segment_width(const line_segment *); @@ -139,6 +150,9 @@ bool move_caret_on_line_segment(const line_segment *, gint *, bool, GdkScrollDir /* Imprime le fragment de texte représenté. */ void draw_line_segment(const line_segment *, cairo_t *, gint *, gint, const segcnt_list *); +#endif + + /* Types d'exportation */ typedef enum _BufferExportType { @@ -171,9 +185,13 @@ typedef struct _buffer_export_context } buffer_export_context; +#ifdef HAVE_GTK_SUPPORT + /* Exporte tous les styles utilisés par des segments. */ void export_line_segment_style(buffer_export_context *, BufferExportType); +#endif + /* Exporte le fragment de texte représenté. */ void export_line_segment(const line_segment *, buffer_export_context *, BufferExportType); @@ -182,6 +200,8 @@ void export_line_segment(const line_segment *, buffer_export_context *, BufferEx /* -------------------- GESTION OPTIMALE D'UNE LISTE DE CONTENUS -------------------- */ +#ifdef HAVE_GTK_SUPPORT + /* Initilise une liste de contenus de segments. */ segcnt_list *init_segment_content_list(void); @@ -200,6 +220,8 @@ bool reset_segment_content_list(segcnt_list *); /* Marque le contenu d'un segment comme remarquable. */ bool add_segment_content_to_selection_list(segcnt_list *, const line_segment *); +#endif + #endif /* _GLIBEXT_LINESEGMENT_H */ diff --git a/src/glibext/notifier.h b/src/glibext/notifier.h new file mode 100644 index 0000000..c1023d6 --- /dev/null +++ b/src/glibext/notifier.h @@ -0,0 +1,74 @@ + +/* Chrysalide - Outil d'analyse de fichiers binaires + * notifier.h - prototypes pour les opérations de comparaison d'objets + * + * Copyright (C) 2022 Cyrille Bagard + * + * This file is part of Chrysalide. + * + * Chrysalide is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * Chrysalide is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Foobar. If not, see . + */ + + +#ifndef _GLIBEXT_NOTIFIER_H +#define _GLIBEXT_NOTIFIER_H + + + + + + + + +#ifdef HAVE_GTK_SUPPORT +# include "../gtkext/gtkstatusstack.h" +#else + + + + + + +typedef void GtkStatusStack; + + + +/* -------------------------- STATUT DES SUIVIS D'ACTIVITE -------------------------- */ + + +/* Identifiant unique de rapport de progression */ +typedef unsigned long activity_id_t; + +/* Identifiant particulier pour une absence d'identifiant */ +#define NO_ACTIVITY_ID 0 + + +#define gtk_status_stack_update_current_location(a0, a1, a2, a3) +#define gtk_status_stack_reset_current_location(a0) + +#define gtk_status_stack_add_activity(a0, a1, a2) 0 +#define gtk_status_stack_extend_activity(a0, a1, a2) +#define gtk_status_stack_update_activity(a0, a1, a2) +#define gtk_status_stack_update_activity_value(a0, a1, a2) +#define gtk_status_stack_remove_activity(a0, a1) + + + +#endif + + + + + +#endif /* _GLIBEXT_NOTIFIER_H */ diff --git a/src/glibext/seq.h b/src/glibext/seq.h index c00b4e2..f9051da 100644 --- a/src/glibext/seq.h +++ b/src/glibext/seq.h @@ -30,7 +30,7 @@ #include -#include "../gtkext/gtkstatusstack.h" +#include "notifier.h" diff --git a/src/gtkext/Makefile.am b/src/gtkext/Makefile.am index 8c46615..5bfc55f 100644 --- a/src/gtkext/Makefile.am +++ b/src/gtkext/Makefile.am @@ -32,7 +32,7 @@ libgtkext_la_SOURCES = \ libgtkext_la_LIBADD = \ graph/libgtkextgraph.la -libgtkext_la_LDFLAGS = +libgtkext_la_CFLAGS = $(LIBGTK_CFLAGS) $(LIBXML_CFLAGS) devdir = $(includedir)/chrysalide/$(subdir:src/%=core/%) @@ -40,10 +40,6 @@ devdir = $(includedir)/chrysalide/$(subdir:src/%=core/%) dev_HEADERS = $(libgtkext_la_SOURCES:%c=) -AM_CPPFLAGS = $(LIBGTK_CFLAGS) $(LIBXML_CFLAGS) - -AM_CFLAGS = $(DEBUG_CFLAGS) $(WARNING_FLAGS) $(COMPLIANCE_FLAGS) - SUBDIRS = graph diff --git a/src/gtkext/graph/Makefile.am b/src/gtkext/graph/Makefile.am index c7f1d4b..ba7318e 100644 --- a/src/gtkext/graph/Makefile.am +++ b/src/gtkext/graph/Makefile.am @@ -11,18 +11,9 @@ libgtkextgraph_la_SOURCES = \ rank.h rank.c \ vspace.h vspace.c -libgtkextgraph_la_LIBADD = - -libgtkextgraph_la_LDFLAGS = +libgtkextgraph_la_CFLAGS = $(LIBGTK_CFLAGS) $(LIBXML_CFLAGS) devdir = $(includedir)/chrysalide/$(subdir:src/%=core/%) dev_HEADERS = $(_la_SOURCES:%c=) - - -AM_CPPFLAGS = $(LIBGTK_CFLAGS) $(LIBXML_CFLAGS) - -AM_CFLAGS = $(DEBUG_CFLAGS) $(WARNING_FLAGS) $(COMPLIANCE_FLAGS) - -SUBDIRS = diff --git a/src/gtkext/gtkblockdisplay.h b/src/gtkext/gtkblockdisplay.h index 196fe2e..6c0879c 100644 --- a/src/gtkext/gtkblockdisplay.h +++ b/src/gtkext/gtkblockdisplay.h @@ -48,22 +48,6 @@ typedef struct _GtkBlockDisplay GtkBlockDisplay; typedef struct _GtkBlockDisplayClass GtkBlockDisplayClass; -/* Désignation des colonnes d'une ligne */ -typedef enum _DisassLineColumn -{ - DLC_PHYSICAL, /* Position physique */ - DLC_VIRTUAL, /* Adresse virtuelle */ - DLC_BINARY, /* Contenu sous forme binaire */ - DLC_ASSEMBLY_LABEL, /* Etiquette dans les données */ - DLC_ASSEMBLY_HEAD, /* Instruction pour assembleur */ - DLC_ASSEMBLY, /* Code pour assembleur */ - DLC_COMMENTS, /* Commentaires éventuels */ - - DLC_COUNT, - -} DisassLineColumn; - - /* Détermine le type du composant d'affichage de bloc en langage d'assemblage. */ GType gtk_block_display_get_type(void); diff --git a/src/gtkext/gtkstatusstack.c b/src/gtkext/gtkstatusstack.c index 0b35e1b..499ea88 100644 --- a/src/gtkext/gtkstatusstack.c +++ b/src/gtkext/gtkstatusstack.c @@ -554,7 +554,7 @@ void gtk_status_stack_update_current_location(GtkStatusStack *stack, const GLoad portions = g_exe_format_get_portions(format); - portion = g_binary_portion_find_at_addr(portions, addr, (GdkRectangle []) { { 0 } }); + portion = g_binary_portion_find_at_addr(portions, addr); text = g_binary_portion_get_desc(portion); diff --git a/src/gtkext/hexdisplay.h b/src/gtkext/hexdisplay.h index 45a1da9..9190548 100644 --- a/src/gtkext/hexdisplay.h +++ b/src/gtkext/hexdisplay.h @@ -48,19 +48,6 @@ typedef struct _GtkHexDisplay GtkHexDisplay; typedef struct _GtkHexDisplayClass GtkHexDisplayClass; -/* Désignation des colonnes d'une ligne */ -typedef enum _HexLineColumn -{ - HLC_PHYSICAL, /* Position physique */ - HLC_BINARY, /* Données binaires brutes */ - HLC_PADDING, /* Espacement forcé */ - HLC_TRANSLATION, /* Traduction de contenu */ - - HLC_COUNT, - -} HexLineColumn; - - /* Détermine le type du composant d'affichage sous forme hexadécimale. */ GType gtk_hex_display_get_type(void); diff --git a/src/gtkext/rendering.h b/src/gtkext/rendering.h index d80c096..9adfe1a 100644 --- a/src/gtkext/rendering.h +++ b/src/gtkext/rendering.h @@ -27,7 +27,7 @@ #include -#include +#include diff --git a/src/gui/Makefile.am b/src/gui/Makefile.am index fcb0298..058b36e 100644 --- a/src/gui/Makefile.am +++ b/src/gui/Makefile.am @@ -25,7 +25,7 @@ libgui_la_LIBADD = \ panels/libguipanels.la \ tb/libguitb.la -libgui_la_LDFLAGS = +libgui_la_CFLAGS = $(LIBGTK_CFLAGS) $(LIBXML_CFLAGS) devdir = $(includedir)/chrysalide/$(subdir:src/%=core/%) @@ -33,10 +33,6 @@ devdir = $(includedir)/chrysalide/$(subdir:src/%=core/%) dev_HEADERS = $(libgui_la_SOURCES:%c=) -AM_CPPFLAGS = $(LIBGTK_CFLAGS) $(LIBXML_CFLAGS) - -AM_CFLAGS = $(DEBUG_CFLAGS) $(WARNING_FLAGS) $(COMPLIANCE_FLAGS) - SUBDIRS = core dialogs menus panels tb diff --git a/src/gui/core/Makefile.am b/src/gui/core/Makefile.am index ebe1278..2077c4b 100644 --- a/src/gui/core/Makefile.am +++ b/src/gui/core/Makefile.am @@ -20,7 +20,7 @@ libguicore_la_SOURCES = \ resources.h resources.c \ theme.h theme.c -libguicore_la_LDFLAGS = $(LIBGTK_LIBS) $(LIBXML_LIBS) +libguicore_la_CFLAGS = $(LIBGTK_CFLAGS) $(LIBXML_CFLAGS) devdir = $(includedir)/chrysalide/$(subdir:src/%=core/%) @@ -28,13 +28,6 @@ devdir = $(includedir)/chrysalide/$(subdir:src/%=core/%) dev_HEADERS = $(libguicore_la_SOURCES:%c=) -AM_CPPFLAGS = $(LIBGTK_CFLAGS) $(LIBXML_CFLAGS) - -AM_CFLAGS = $(DEBUG_CFLAGS) $(WARNING_FLAGS) $(COMPLIANCE_FLAGS) - -SUBDIRS = - - resources.c: gresource.xml $(RES_FILES) glib-compile-resources --target=$@ --sourcedir=$(srcdir) --generate-source --c-name gui_core gresource.xml diff --git a/src/gui/dialogs/Makefile.am b/src/gui/dialogs/Makefile.am index a8e7b93..5716f14 100644 --- a/src/gui/dialogs/Makefile.am +++ b/src/gui/dialogs/Makefile.am @@ -31,7 +31,7 @@ libguidialogs_la_SOURCES = \ snapshots.h snapshots.c \ storage.h storage.c -libguidialogs_la_LDFLAGS = +libguidialogs_la_CFLAGS = $(LIBGTK_CFLAGS) $(LIBXML_CFLAGS) devdir = $(includedir)/chrysalide/$(subdir:src/%=core/%) @@ -39,13 +39,6 @@ devdir = $(includedir)/chrysalide/$(subdir:src/%=core/%) dev_HEADERS = $(libguidialogs_la_SOURCES:%c=) -AM_CPPFLAGS = $(LIBGTK_CFLAGS) $(LIBXML_CFLAGS) - -AM_CFLAGS = $(DEBUG_CFLAGS) $(WARNING_FLAGS) $(COMPLIANCE_FLAGS) - -SUBDIRS = - - resources.c: gresource.xml $(UI_FILES) glib-compile-resources --target=$@ --sourcedir=$(srcdir) --generate-source --c-name gui_dialogs gresource.xml diff --git a/src/gui/menus/Makefile.am b/src/gui/menus/Makefile.am index 3959044..727c0cf 100644 --- a/src/gui/menus/Makefile.am +++ b/src/gui/menus/Makefile.am @@ -11,18 +11,9 @@ libguimenus_la_SOURCES = \ project.h project.c \ view.h view.c -libguimenus_la_LDFLAGS = - -libguimenus_la_LIBADD = $(LIBINTL) +libguimenus_la_CFLAGS = $(LIBGTK_CFLAGS) $(LIBXML_CFLAGS) devdir = $(includedir)/chrysalide/$(subdir:src/%=core/%) dev_HEADERS = $(libguimenus_la_SOURCES:%c=) - - -AM_CPPFLAGS = $(LIBGTK_CFLAGS) $(LIBXML_CFLAGS) - -AM_CFLAGS = $(DEBUG_CFLAGS) $(WARNING_FLAGS) $(COMPLIANCE_FLAGS) - -SUBDIRS = diff --git a/src/gui/panels/Makefile.am b/src/gui/panels/Makefile.am index 0bde9bf..83e173b 100644 --- a/src/gui/panels/Makefile.am +++ b/src/gui/panels/Makefile.am @@ -33,7 +33,7 @@ libguipanels_la_SOURCES = \ view.h view.c \ welcome.h welcome.c -libguipanels_la_LDFLAGS = +libguipanels_la_CFLAGS = $(LIBGTK_CFLAGS) $(LIBXML_CFLAGS) devdir = $(includedir)/chrysalide/$(subdir:src/%=core/%) @@ -41,13 +41,6 @@ devdir = $(includedir)/chrysalide/$(subdir:src/%=core/%) dev_HEADERS = $(libguipanels_la_SOURCES:%c=) -AM_CPPFLAGS = $(LIBGTK_CFLAGS) $(LIBXML_CFLAGS) - -AM_CFLAGS = $(DEBUG_CFLAGS) $(WARNING_FLAGS) $(COMPLIANCE_FLAGS) - -SUBDIRS = - - resources.c: gresource.xml $(UI_FILES) glib-compile-resources --target=$@ --sourcedir=$(srcdir) --generate-source --c-name gui_panels gresource.xml diff --git a/src/gui/panels/strings.c b/src/gui/panels/strings.c index f9d6b00..4627850 100644 --- a/src/gui/panels/strings.c +++ b/src/gui/panels/strings.c @@ -859,7 +859,7 @@ static void reload_strings_for_new_list_view(const GStringsPanel *panel, GtkStat vmpa2_phys_to_string(addr, size, phys, NULL); vmpa2_virt_to_string(addr, size, virt, NULL); - portion = g_binary_portion_find_at_addr(portions, addr, (GdkRectangle []) { { 0 } }); + portion = g_binary_portion_find_at_addr(portions, addr); area = g_binary_portion_get_desc(portion); g_object_unref(G_OBJECT(portion)); diff --git a/src/gui/tb/Makefile.am b/src/gui/tb/Makefile.am index 3286757..a519d05 100644 --- a/src/gui/tb/Makefile.am +++ b/src/gui/tb/Makefile.am @@ -6,16 +6,9 @@ libguitb_la_SOURCES = \ tbitem-int.h \ tbitem.h tbitem.c -libguitb_la_LDFLAGS = +libguitb_la_CFLAGS = $(LIBGTK_CFLAGS) $(LIBXML_CFLAGS) devdir = $(includedir)/chrysalide/$(subdir:src/%=core/%) dev_HEADERS = $(libguitb_la_SOURCES:%c=) - - -AM_CPPFLAGS = $(LIBGTK_CFLAGS) $(LIBXML_CFLAGS) - -AM_CFLAGS = $(DEBUG_CFLAGS) $(WARNING_FLAGS) $(COMPLIANCE_FLAGS) - -SUBDIRS = diff --git a/src/hub.c b/src/hub.c index 574bb1c..8a5b6f4 100644 --- a/src/hub.c +++ b/src/hub.c @@ -31,7 +31,9 @@ #include #include #include -#include +#ifdef HAVE_GTK_SUPPORT +# include +#endif #include @@ -354,7 +356,9 @@ int main(int argc, char **argv) /* Initialisation de GTK */ g_set_prgname("Chrysalide Hub"); +#ifdef HAVE_GTK_SUPPORT gtk_init(&argc, &argv); +#endif /* Initialisation du programme */ diff --git a/src/main.c b/src/main.c index 356e796..4e9bf1c 100644 --- a/src/main.c +++ b/src/main.c @@ -31,7 +31,9 @@ #include #include #include -#include +#ifdef HAVE_GTK_SUPPORT +# include +#endif #include @@ -50,9 +52,11 @@ #include "core/paths.h" #include "core/queue.h" #include "glibext/delayed.h" -#include "gui/editor.h" -#include "gui/core/core.h" -#include "gui/core/global.h" +#ifdef HAVE_GTK_SUPPORT +# include "gui/editor.h" +# include "gui/core/core.h" +# include "gui/core/global.h" +#endif #include "plugins/pglist.h" @@ -63,9 +67,13 @@ static void show_chrysalide_help(const char *); /* Affiche des indications sur la version courante du programme. */ static void show_chrysalide_version(void); +#ifdef HAVE_GTK_SUPPORT + /* Recharge le dernier projet ouvert s'il existe. */ static gboolean load_last_project(GGenConfig *); +#endif + /* Ouvre les éventuels fichiers fournis au démarrage. */ static int open_binaries(char **, int); @@ -186,16 +194,20 @@ int main(int argc, char **argv) bool show_help; /* Affichage de l'aide ? */ bool show_version; /* Affichage de la version ? */ LogMessageType verbosity; /* Niveau de filtre de message */ +#ifdef HAVE_GTK_SUPPORT bool batch_mode; /* Exécution sans GUI ? */ +#endif bool save; /* Sauvegarde du cache ? */ char *prj_filename; /* Chemin vers un projet */ int index; /* Indice d'argument */ int ret; /* Bilan d'un appel */ char *edir; /* Répertoire de base effectif */ bool status; /* Bilan d'opérations */ +#ifdef HAVE_GTK_SUPPORT GtkWidget *editor; /* Fenêtre graphique */ GGenConfig *config; /* Configuration globale */ bool welcome; /* Affichage de la bienvenue ? */ +#endif char resolved[PATH_MAX]; /* Résolution de nom de fichier*/ GStudyProject *project; /* Nouveau projet courant */ @@ -225,7 +237,9 @@ int main(int argc, char **argv) show_version = false; verbosity = LMT_INFO; +#ifdef HAVE_GTK_SUPPORT batch_mode = false; +#endif save = false; prj_filename = NULL; @@ -249,7 +263,9 @@ int main(int argc, char **argv) break; case 'b': +#ifdef HAVE_GTK_SUPPORT batch_mode = true; +#endif break; case 's': @@ -294,11 +310,15 @@ int main(int argc, char **argv) /* Initialisation de GTK */ g_set_prgname("Chrysalide"); +#ifdef HAVE_GTK_SUPPORT gtk_init(&argc, &argv); +#endif /* Initialisation du programme */ +#ifdef HAVE_GTK_SUPPORT if (batch_mode) +#endif set_batch_mode(); set_log_verbosity(verbosity); @@ -308,6 +328,8 @@ int main(int argc, char **argv) /* Création de l'interface */ +#ifdef HAVE_GTK_SUPPORT + if (!batch_mode) { editor = create_editor(); @@ -330,8 +352,12 @@ int main(int argc, char **argv) else editor = NULL; +#endif + init_all_plugins(true); +#ifdef HAVE_GTK_SUPPORT + config = get_main_configuration(); if (!batch_mode) @@ -340,6 +366,8 @@ int main(int argc, char **argv) if (!status) goto exit_complete_gui; } +#endif + /* Lancement du serveur local */ status = ensure_internal_connections_setup(); @@ -354,6 +382,8 @@ int main(int argc, char **argv) /* Charge le dernier projet ? */ +#ifdef HAVE_GTK_SUPPORT + if (batch_mode) welcome = true; else @@ -363,6 +393,9 @@ int main(int argc, char **argv) g_idle_add((GSourceFunc)load_last_project, config); else + +#endif + { if (prj_filename != NULL) { @@ -382,7 +415,11 @@ int main(int argc, char **argv) if (ret == 0) { +#ifdef HAVE_GTK_SUPPORT project = g_study_project_open(prj_filename, !batch_mode); +#else + project = g_study_project_open(prj_filename, false); +#endif if (project == NULL) goto bad_project; } @@ -410,7 +447,12 @@ int main(int argc, char **argv) result = open_binaries(argv + optind, argc - optind); +#ifdef HAVE_GTK_SUPPORT + if (batch_mode) + +#endif + { wait_for_all_global_works(); @@ -422,16 +464,22 @@ int main(int argc, char **argv) } +#ifdef HAVE_GTK_SUPPORT + else gtk_main(); +#endif + set_current_project(NULL); bad_project: no_internal_server: +#ifdef HAVE_GTK_SUPPORT exit_complete_gui: +#endif #ifdef TRACK_GOBJECT_LEAKS remember_gtypes_for_leaks(); @@ -439,6 +487,8 @@ int main(int argc, char **argv) exit_all_plugins(); +#ifdef HAVE_GTK_SUPPORT + if (!batch_mode) unload_all_gui_components(); @@ -449,6 +499,8 @@ int main(int argc, char **argv) failed_to_load_editor: +#endif + unload_all_core_components(true); #ifdef TRACK_GOBJECT_LEAKS @@ -462,6 +514,9 @@ int main(int argc, char **argv) } +#ifdef HAVE_GTK_SUPPORT + + /****************************************************************************** * * * Paramètres : cfg = configuration globale sur laquelle s'appuyer. * @@ -492,6 +547,9 @@ static gboolean load_last_project(GGenConfig *cfg) } +#endif + + /****************************************************************************** * * * Paramètres : files = noms de fichier fournis en ligne de commande. * diff --git a/src/mangling/Makefile.am b/src/mangling/Makefile.am index c1a9427..4c868f7 100644 --- a/src/mangling/Makefile.am +++ b/src/mangling/Makefile.am @@ -7,18 +7,9 @@ libmangling_la_SOURCES = \ demangler-int.h \ demangler.h demangler.c -libmangling_la_LDFLAGS = - -libmangling_la_LIBADD = +libmangling_la_CFLAGS = $(TOOLKIT_CFLAGS) $(LIBXML_CFLAGS) devdir = $(includedir)/chrysalide/$(subdir:src/%=core/%) dev_HEADERS = $(libmangling_la_SOURCES:%c=) - - -AM_CPPFLAGS = $(LIBGTK_CFLAGS) $(LIBXML_CFLAGS) - -AM_CFLAGS = $(DEBUG_CFLAGS) $(WARNING_FLAGS) $(COMPLIANCE_FLAGS) - -SUBDIRS = diff --git a/src/plugins/Makefile.am b/src/plugins/Makefile.am index b4ac1d5..6cb8d34 100644 --- a/src/plugins/Makefile.am +++ b/src/plugins/Makefile.am @@ -11,18 +11,9 @@ libplugins_la_SOURCES = \ plugin.h plugin.c \ self.h -libplugins_la_CFLAGS = $(AM_CFLAGS) - -libplugins_la_LDFLAGS = +libplugins_la_CFLAGS = $(TOOLKIT_CFLAGS) $(LIBXML_CFLAGS) devdir = $(includedir)/chrysalide/$(subdir:src/%=core/%) dev_HEADERS = $(libplugins_la_SOURCES:%c=) - - -AM_CPPFLAGS = $(LIBGTK_CFLAGS) $(LIBXML_CFLAGS) - -AM_CFLAGS = $(DEBUG_CFLAGS) $(WARNING_FLAGS) $(COMPLIANCE_FLAGS) - -SUBDIRS = diff --git a/src/plugins/pglist.h b/src/plugins/pglist.h index e0aec3f..9cc6aee 100644 --- a/src/plugins/pglist.h +++ b/src/plugins/pglist.h @@ -27,7 +27,9 @@ #include -#include +#ifdef HAVE_GTK_SUPPORT +# include +#endif #include "plugin-def.h" diff --git a/src/plugins/plugin-int.h b/src/plugins/plugin-int.h index 88e0fbb..db1cbb0 100644 --- a/src/plugins/plugin-int.h +++ b/src/plugins/plugin-int.h @@ -57,6 +57,8 @@ typedef void (* pg_handle_content_fc) (const GPluginModule *, PluginAction, GBin /* Procède à une opération liée à un contenu chargé. */ typedef void (* pg_handle_loaded_fc) (const GPluginModule *, PluginAction, GLoadedContent *, wgroup_id_t, GtkStatusStack *); +#ifdef HAVE_GTK_SUPPORT + /* Complète une liste de resources pour thème. */ typedef void (* pg_include_theme_fc) (const GPluginModule *, PluginAction, gboolean, char ***, size_t *); @@ -66,6 +68,8 @@ typedef void (* pg_notify_panel_fc) (const GPluginModule *, PluginAction, GPanel /* Rend compte d'un affichage ou d'un retrait de panneau. */ typedef void (* pg_notify_docking_fc) (const GPluginModule *, PluginAction, GPanelItem *, bool); +#endif + /* Assure l'interprétation d'un format en différé. */ typedef bool (* pg_handle_format_analysis_fc) (const GPluginModule *, PluginAction, GKnownFormat *, wgroup_id_t, GtkStatusStack *); @@ -115,9 +119,11 @@ struct _GPluginModuleClass pg_get_modname_fc get_modname; /* Fourniture du nom brut */ +#ifdef HAVE_GTK_SUPPORT pg_include_theme_fc include_theme; /* Extension d'un thème */ pg_notify_panel_fc notify_panel; /* Création de panneau */ pg_notify_docking_fc notify_docking; /* Affichage ou retrait */ +#endif pg_handle_content_fc handle_content; /* Explorations ou résolutions */ pg_handle_loaded_fc handle_loaded; /* Traitement de contenu chargé*/ diff --git a/src/plugins/plugin.c b/src/plugins/plugin.c index e563817..1ef90fb 100644 --- a/src/plugins/plugin.c +++ b/src/plugins/plugin.c @@ -669,8 +669,10 @@ static void g_plugin_module_init_gclass(GPluginModuleClass *class, GModule *modu switch (action) { case PGA_GUI_THEME: +#ifdef HAVE_GTK_SUPPORT load_plugin_symbol(module, "chrysalide_plugin_include_theme", &class->include_theme); +#endif break; default: @@ -686,13 +688,17 @@ static void g_plugin_module_init_gclass(GPluginModuleClass *class, GModule *modu switch (action) { case PGA_PANEL_CREATION: +#ifdef HAVE_GTK_SUPPORT load_plugin_symbol(module, "chrysalide_plugin_on_panel_creation", &class->notify_panel); +#endif break; case PGA_PANEL_DOCKING: +#ifdef HAVE_GTK_SUPPORT load_plugin_symbol(module, "chrysalide_plugin_on_panel_docking", &class->notify_docking); +#endif break; default: @@ -1423,6 +1429,9 @@ gpointer g_plugin_module_build_type_instance(GPluginModule *plugin, PluginAction } +#ifdef HAVE_GTK_SUPPORT + + /****************************************************************************** * * * Paramètres : plugin = greffon à manipuler. * @@ -1501,6 +1510,9 @@ void g_plugin_module_notify_panel_docking(const GPluginModule *plugin, PluginAct } +#endif + + /****************************************************************************** * * * Paramètres : plugin = greffon à manipuler. * diff --git a/src/plugins/plugin.h b/src/plugins/plugin.h index ff456b3..aac5f0d 100644 --- a/src/plugins/plugin.h +++ b/src/plugins/plugin.h @@ -36,8 +36,10 @@ #include "../format/known.h" #include "../format/preload.h" #include "../glibext/configuration.h" -#include "../gtkext/gtkstatusstack.h" +#include "../glibext/notifier.h" +#ifdef HAVE_GTK_SUPPORT #include "../gui/panel.h" +#endif @@ -119,6 +121,8 @@ void g_plugin_module_notify_plugins_loaded(GPluginModule *, PluginAction, void * /* Crée une instance à partir d'un type dynamique externe. */ gpointer g_plugin_module_build_type_instance(GPluginModule *, PluginAction, GType); +#ifdef HAVE_GTK_SUPPORT + /* Complète une liste de resources pour thème. */ void g_plugin_module_include_theme(const GPluginModule *, PluginAction, gboolean, char ***, size_t *); @@ -128,6 +132,8 @@ void g_plugin_module_notify_panel_creation(const GPluginModule *, PluginAction, /* Rend compte d'un affichage ou d'un retrait de panneau. */ void g_plugin_module_notify_panel_docking(const GPluginModule *, PluginAction, GPanelItem *, bool); +#endif + /* Procède à une opération liée à un contenu binaire. */ void g_plugin_module_handle_binary_content(const GPluginModule *, PluginAction, GBinContent *, wgroup_id_t, GtkStatusStack *); -- cgit v0.11.2-87-g4458