From 2a7c16cfa1be2a1c90be2fb29650eb2e10ab1728 Mon Sep 17 00:00:00 2001
From: Cyrille Bagard <nocbos@gmail.com>
Date: Wed, 20 Jun 2018 00:34:34 +0200
Subject: Updated Makefiles to create only one _PyGObject_API structure.

---
 plugins/arm/Makefile.am                | 4 +---
 plugins/arm/python/Makefile.am         | 2 +-
 plugins/arm/python/v7/Makefile.am      | 2 +-
 plugins/arm/v7/Makefile.am             | 2 --
 plugins/arm/v7/opcodes/Makefile.am     | 2 --
 plugins/arm/v7/operands/Makefile.am    | 2 --
 plugins/arm/v7/registers/Makefile.am   | 2 --
 plugins/dalvik/Makefile.am             | 4 +---
 plugins/dalvik/operands/Makefile.am    | 2 --
 plugins/dalvik/pseudo/Makefile.am      | 2 --
 plugins/dalvik/v35/Makefile.am         | 4 +---
 plugins/dalvik/v35/opcodes/Makefile.am | 2 --
 plugins/devdbg/Makefile.am             | 2 --
 plugins/dex/python/Makefile.am         | 2 +-
 plugins/dexbnf/Makefile.am             | 2 --
 plugins/dexbnf/python/Makefile.am      | 2 +-
 plugins/elf/Makefile.am                | 2 +-
 plugins/elf/python/Makefile.am         | 2 +-
 plugins/fmtp/Makefile.am               | 2 --
 plugins/libcsem/Makefile.am            | 4 +---
 plugins/lnxsyscalls/Makefile.am        | 2 --
 plugins/mobicore/Makefile.am           | 2 --
 plugins/readdex/Makefile.am            | 2 --
 plugins/readelf/Makefile.am            | 4 +---
 plugins/readmc/Makefile.am             | 4 +---
 plugins/ropgadgets/Makefile.am         | 2 --
 26 files changed, 12 insertions(+), 52 deletions(-)

diff --git a/plugins/arm/Makefile.am b/plugins/arm/Makefile.am
index 14eff6f..8b28e95 100644
--- a/plugins/arm/Makefile.am
+++ b/plugins/arm/Makefile.am
@@ -21,8 +21,6 @@ libarm_la_LIBADD =						\
 	python/libarmpython.la				\
 	v7/libarmv7.la
 
-libarm_la_CFLAGS = $(AM_CFLAGS)
-
 libarm_la_LDFLAGS =													\
 	-L$(top_srcdir)/src/.libs -lchrysacore							\
 	-Wl,-rpath,$(abs_top_srcdir)/plugins/pychrysalide/.libs			\
@@ -34,7 +32,7 @@ devdir = $(includedir)/chrysalide-$(subdir)
 dev_HEADERS = $(libarm_la_SOURCES:%c=)
 
 
-AM_CPPFLAGS = $(LIBGTK_CFLAGS) $(LIBPYTHON_CFLAGS) $(LIBPYGOBJECT_CFLAGS) $(LIBXML_CFLAGS) -I$(top_srcdir)/src
+AM_CPPFLAGS = $(LIBGTK_CFLAGS) $(LIBXML_CFLAGS) -I$(top_srcdir)/src
 
 AM_CFLAGS = $(DEBUG_CFLAGS) $(WARNING_FLAGS) $(COMPLIANCE_FLAGS)
 
diff --git a/plugins/arm/python/Makefile.am b/plugins/arm/python/Makefile.am
index 0ad7f10..8edc5dc 100644
--- a/plugins/arm/python/Makefile.am
+++ b/plugins/arm/python/Makefile.am
@@ -18,7 +18,7 @@ dev_HEADERS = $(libarmpython_la_SOURCES:%c=)
 
 
 AM_CPPFLAGS = $(LIBGTK_CFLAGS) $(LIBXML_CFLAGS) $(LIBPYTHON_CFLAGS) $(LIBPYGOBJECT_CFLAGS) \
-	-I$(top_srcdir)/src
+	-I$(top_srcdir)/src -DNO_IMPORT_PYGOBJECT
 
 AM_CFLAGS = $(DEBUG_CFLAGS) $(WARNING_FLAGS) $(COMPLIANCE_FLAGS)
 
diff --git a/plugins/arm/python/v7/Makefile.am b/plugins/arm/python/v7/Makefile.am
index 6970b63..0e96605 100644
--- a/plugins/arm/python/v7/Makefile.am
+++ b/plugins/arm/python/v7/Makefile.am
@@ -15,6 +15,6 @@ dev_HEADERS = $(libarmpythonv7_la_SOURCES:%c=)
 
 
 AM_CPPFLAGS = $(LIBGTK_CFLAGS) $(LIBXML_CFLAGS) $(LIBPYTHON_CFLAGS) $(LIBPYGOBJECT_CFLAGS) \
-	-I$(top_srcdir)/src
+	-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 35b8133..1bf2342 100644
--- a/plugins/arm/v7/Makefile.am
+++ b/plugins/arm/v7/Makefile.am
@@ -22,8 +22,6 @@ libarmv7_la_LIBADD =					\
 	operands/libarmv7operands.la		\
 	registers/libarmv7registers.la
 
-libarmv7_la_CFLAGS = $(AM_CFLAGS)
-
 
 devdir = $(includedir)/chrysalide-$(subdir)
 
diff --git a/plugins/arm/v7/opcodes/Makefile.am b/plugins/arm/v7/opcodes/Makefile.am
index 3f5b000..13088e6 100644
--- a/plugins/arm/v7/opcodes/Makefile.am
+++ b/plugins/arm/v7/opcodes/Makefile.am
@@ -15,8 +15,6 @@ libarmv7opcodes_la_SOURCES = $(GENERATED_FILES)
 
 libarmv7opcodes_la_LIBADD =
 
-libarmv7opcodes_la_CFLAGS = $(AM_CFLAGS)
-
 
 devdir = $(includedir)/chrysalide-$(subdir)
 
diff --git a/plugins/arm/v7/operands/Makefile.am b/plugins/arm/v7/operands/Makefile.am
index ac08569..e94665b 100644
--- a/plugins/arm/v7/operands/Makefile.am
+++ b/plugins/arm/v7/operands/Makefile.am
@@ -15,8 +15,6 @@ libarmv7operands_la_SOURCES = 			\
 
 libarmv7operands_la_LIBADD =
 
-libarmv7operands_la_CFLAGS = $(AM_CFLAGS)
-
 
 devdir = $(includedir)/chrysalide-$(subdir)
 
diff --git a/plugins/arm/v7/registers/Makefile.am b/plugins/arm/v7/registers/Makefile.am
index 49f7f82..46e4baf 100644
--- a/plugins/arm/v7/registers/Makefile.am
+++ b/plugins/arm/v7/registers/Makefile.am
@@ -10,8 +10,6 @@ libarmv7registers_la_SOURCES = 			\
 
 libarmv7registers_la_LIBADD =
 
-libarmv7registers_la_CFLAGS = $(AM_CFLAGS)
-
 
 devdir = $(includedir)/chrysalide-$(subdir)
 
diff --git a/plugins/dalvik/Makefile.am b/plugins/dalvik/Makefile.am
index c32eba7..11101d2 100644
--- a/plugins/dalvik/Makefile.am
+++ b/plugins/dalvik/Makefile.am
@@ -23,8 +23,6 @@ libdalvik_la_LIBADD =					\
 	pseudo/libdalvikpseudo.la			\
 	v35/libdalvik35.la
 
-libdalvik_la_CFLAGS = $(AM_CFLAGS)
-
 libdalvik_la_LDFLAGS =						\
 	-L$(top_srcdir)/src/.libs -lchrysacore	\
 	-L$(top_srcdir)/plugins/dex/.libs -ldex
@@ -35,7 +33,7 @@ devdir = $(includedir)/chrysalide-$(subdir)
 dev_HEADERS = $(libdalvik_la_SOURCES:%c=)
 
 
-AM_CPPFLAGS = $(LIBGTK_CFLAGS) $(LIBPYTHON_CFLAGS) $(LIBPYGOBJECT_CFLAGS) $(LIBXML_CFLAGS) -I$(top_srcdir)/src
+AM_CPPFLAGS = $(LIBGTK_CFLAGS) $(LIBXML_CFLAGS) -I$(top_srcdir)/src
 
 AM_CFLAGS = $(DEBUG_CFLAGS) $(WARNING_FLAGS) $(COMPLIANCE_FLAGS)
 
diff --git a/plugins/dalvik/operands/Makefile.am b/plugins/dalvik/operands/Makefile.am
index 1c04231..4dbae7f 100644
--- a/plugins/dalvik/operands/Makefile.am
+++ b/plugins/dalvik/operands/Makefile.am
@@ -6,8 +6,6 @@ libdalvikoperands_la_SOURCES =			\
 	pool.h pool.c						\
 	register.h register.c
 
-libdalvikoperands_la_CFLAGS = $(AM_CFLAGS)
-
 
 devdir = $(includedir)/chrysalide-$(subdir)
 
diff --git a/plugins/dalvik/pseudo/Makefile.am b/plugins/dalvik/pseudo/Makefile.am
index 422c314..5db4b51 100644
--- a/plugins/dalvik/pseudo/Makefile.am
+++ b/plugins/dalvik/pseudo/Makefile.am
@@ -7,8 +7,6 @@ libdalvikpseudo_la_SOURCES =			\
 
 libdalvikpseudo_la_LIBADD = 
 
-libdalvikpseudo_la_CFLAGS = $(AM_CFLAGS)
-
 
 devdir = $(includedir)/chrysalide-$(subdir)
 
diff --git a/plugins/dalvik/v35/Makefile.am b/plugins/dalvik/v35/Makefile.am
index eecdeba..c612756 100644
--- a/plugins/dalvik/v35/Makefile.am
+++ b/plugins/dalvik/v35/Makefile.am
@@ -10,15 +10,13 @@ libdalvik35_la_SOURCES =				\
 libdalvik35_la_LIBADD =					\
 	opcodes/libdalvik35opcodes.la
 
-libdalvik35_la_CFLAGS = $(AM_CFLAGS)
-
 
 devdir = $(includedir)/chrysalide-$(subdir)
 
 dev_HEADERS = $(libdalvik35_la_SOURCES:%c=)
 
 
-AM_CPPFLAGS = $(LIBGTK_CFLAGS) $(LIBPYTHON_CFLAGS) $(LIBPYGOBJECT_CFLAGS) $(LIBXML_CFLAGS) -I$(top_srcdir)/src
+AM_CPPFLAGS = $(LIBGTK_CFLAGS) $(LIBXML_CFLAGS) -I$(top_srcdir)/src
 
 AM_CFLAGS = $(DEBUG_CFLAGS) $(WARNING_FLAGS) $(COMPLIANCE_FLAGS)
 
diff --git a/plugins/dalvik/v35/opcodes/Makefile.am b/plugins/dalvik/v35/opcodes/Makefile.am
index 986c759..9f4e51e 100644
--- a/plugins/dalvik/v35/opcodes/Makefile.am
+++ b/plugins/dalvik/v35/opcodes/Makefile.am
@@ -15,8 +15,6 @@ libdalvik35opcodes_la_SOURCES = $(GENERATED_FILES)
 
 libdalvik35opcodes_la_LIBADD =
 
-libdalvik35opcodes_la_CFLAGS = $(AM_CFLAGS)
-
 
 devdir = $(includedir)/chrysalide-$(subdir)
 
diff --git a/plugins/devdbg/Makefile.am b/plugins/devdbg/Makefile.am
index 3e258bd..5c19f47 100644
--- a/plugins/devdbg/Makefile.am
+++ b/plugins/devdbg/Makefile.am
@@ -7,8 +7,6 @@ libdir = $(pluginsdir)
 libspeed_la_SOURCES =					\
 	speed.h speed.c
 
-libspeed_la_CFLAGS = $(AM_CFLAGS)
-
 libspeed_la_LDFLAGS = -L$(top_srcdir)/src/.libs -lchrysacore
 
 
diff --git a/plugins/dex/python/Makefile.am b/plugins/dex/python/Makefile.am
index 8988eb8..2bf98bc 100644
--- a/plugins/dex/python/Makefile.am
+++ b/plugins/dex/python/Makefile.am
@@ -19,6 +19,6 @@ dev_HEADERS = $(libdexpython_la_SOURCES:%c=)
 
 
 AM_CPPFLAGS = $(LIBGTK_CFLAGS) $(LIBXML_CFLAGS) $(LIBPYTHON_CFLAGS) $(LIBPYGOBJECT_CFLAGS) \
-	-I$(top_srcdir)/src
+	-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 f6081d7..677e4a6 100644
--- a/plugins/dexbnf/Makefile.am
+++ b/plugins/dexbnf/Makefile.am
@@ -12,8 +12,6 @@ libdexbnf_la_SOURCES =					\
 	shorty.h shorty.c					\
 	type.h type.c
 
-libdexbnf_la_CFLAGS = $(AM_CFLAGS)
-
 libdexbnf_la_LIBADD =					\
 	python/libdexbnfpython.la
 
diff --git a/plugins/dexbnf/python/Makefile.am b/plugins/dexbnf/python/Makefile.am
index 135fd5a..50a3575 100644
--- a/plugins/dexbnf/python/Makefile.am
+++ b/plugins/dexbnf/python/Makefile.am
@@ -14,6 +14,6 @@ dev_HEADERS = $(libdexbnfpython_la_SOURCES:%c=)
 
 
 AM_CPPFLAGS = $(LIBGTK_CFLAGS) $(LIBXML_CFLAGS) $(LIBPYTHON_CFLAGS) $(LIBPYGOBJECT_CFLAGS) \
-	-I$(top_srcdir)/src
+	-I$(top_srcdir)/src -DNO_IMPORT_PYGOBJECT
 
 AM_CFLAGS = $(DEBUG_CFLAGS) $(WARNING_FLAGS) $(COMPLIANCE_FLAGS)
diff --git a/plugins/elf/Makefile.am b/plugins/elf/Makefile.am
index fb95824..084e7b5 100644
--- a/plugins/elf/Makefile.am
+++ b/plugins/elf/Makefile.am
@@ -32,7 +32,7 @@ devdir = $(includedir)/chrysalide-$(subdir)
 dev_HEADERS = $(libelf_la_SOURCES:%c=)
 
 
-AM_CPPFLAGS = $(LIBGTK_CFLAGS) $(LIBPYTHON_CFLAGS) $(LIBPYGOBJECT_CFLAGS) $(LIBXML_CFLAGS) -I$(top_srcdir)/src
+AM_CPPFLAGS = $(LIBGTK_CFLAGS) $(LIBXML_CFLAGS) -I$(top_srcdir)/src
 
 AM_CFLAGS = $(DEBUG_CFLAGS) $(WARNING_FLAGS) $(COMPLIANCE_FLAGS)
 
diff --git a/plugins/elf/python/Makefile.am b/plugins/elf/python/Makefile.am
index 4912254..c777dc1 100644
--- a/plugins/elf/python/Makefile.am
+++ b/plugins/elf/python/Makefile.am
@@ -20,6 +20,6 @@ dev_HEADERS = $(libelfpython_la_SOURCES:%c=)
 
 
 AM_CPPFLAGS = $(LIBGTK_CFLAGS) $(LIBXML_CFLAGS) $(LIBPYTHON_CFLAGS) $(LIBPYGOBJECT_CFLAGS) \
-	-I$(top_srcdir)/src
+	-I$(top_srcdir)/src -DNO_IMPORT_PYGOBJECT
 
 AM_CFLAGS = $(DEBUG_CFLAGS) $(WARNING_FLAGS) $(COMPLIANCE_FLAGS)
diff --git a/plugins/fmtp/Makefile.am b/plugins/fmtp/Makefile.am
index 5bfe450..d2d6611 100644
--- a/plugins/fmtp/Makefile.am
+++ b/plugins/fmtp/Makefile.am
@@ -8,8 +8,6 @@ libfmtp_la_SOURCES =					\
 	def.h								\
 	parser.h parser.c
 
-libfmtp_la_CFLAGS = $(AM_CFLAGS)
-
 libfmtp_la_LDFLAGS = -L$(top_srcdir)/src/.libs -lchrysacore
 
 
diff --git a/plugins/libcsem/Makefile.am b/plugins/libcsem/Makefile.am
index 5a7babc..8f9333d 100644
--- a/plugins/libcsem/Makefile.am
+++ b/plugins/libcsem/Makefile.am
@@ -8,8 +8,6 @@ liblibcsem_la_SOURCES =					\
 	exit.h exit.c						\
 	semantic.h semantic.c
 
-liblibcsem_la_CFLAGS = $(AM_CFLAGS)
-
 liblibcsem_la_LDFLAGS = -L$(top_srcdir)/src/.libs -lchrysacore
 
 
@@ -18,6 +16,6 @@ devdir = $(includedir)/chrysalide-$(subdir)
 dev_HEADERS = $(liblibcsem_la_SOURCES:%c=)
 
 
-AM_CPPFLAGS = $(LIBGTK_CFLAGS) $(LIBXML_CFLAGS) -I$(top_srcdir)/src -I$(top_srcdir)
+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 e483447..5ca358a 100644
--- a/plugins/lnxsyscalls/Makefile.am
+++ b/plugins/lnxsyscalls/Makefile.am
@@ -14,8 +14,6 @@ liblnxsyscalls_la_SOURCES =				\
 	syscall.h syscall.c					\
 	writer.h writer.c
 
-liblnxsyscalls_la_CFLAGS = $(AM_CFLAGS)
-
 liblnxsyscalls_la_LIBADD = 
 
 liblnxsyscalls_la_LDFLAGS =					\
diff --git a/plugins/mobicore/Makefile.am b/plugins/mobicore/Makefile.am
index 63bf19d..ed8fd00 100644
--- a/plugins/mobicore/Makefile.am
+++ b/plugins/mobicore/Makefile.am
@@ -11,8 +11,6 @@ libmobicore_la_SOURCES =				\
 	mobicore.h mobicore.c				\
 	symbols.h symbols.c
 
-libmobicore_la_CFLAGS = $(AM_CFLAGS)
-
 libmobicore_la_LDFLAGS = -L$(top_srcdir)/src/.libs -lchrysacore
 
 
diff --git a/plugins/readdex/Makefile.am b/plugins/readdex/Makefile.am
index 5009d97..b773dc5 100644
--- a/plugins/readdex/Makefile.am
+++ b/plugins/readdex/Makefile.am
@@ -11,8 +11,6 @@ libreaddex_la_SOURCES =					\
 	ids.h ids.c							\
 	reader.h reader.c
 
-libreaddex_la_CFLAGS = $(AM_CFLAGS)
-
 libreaddex_la_LDFLAGS =							\
 	-L$(top_srcdir)/src/.libs -lchrysacore		\
 	-L$(top_srcdir)/plugins/dex/.libs -ldex		\
diff --git a/plugins/readelf/Makefile.am b/plugins/readelf/Makefile.am
index 463bca5..5c80023 100644
--- a/plugins/readelf/Makefile.am
+++ b/plugins/readelf/Makefile.am
@@ -11,8 +11,6 @@ libreadelf_la_SOURCES =					\
 	section.h section.c					\
 	strtab.h strtab.c
 
-libreadelf_la_CFLAGS = $(AM_CFLAGS)
-
 libreadelf_la_LDFLAGS =							\
 	-L$(top_srcdir)/src/.libs -lchrysacore		\
 	-L$(top_srcdir)/plugins/elf/.libs -lelf		\
@@ -23,6 +21,6 @@ devdir = $(includedir)/chrysalide-$(subdir)
 dev_HEADERS = $(libreadelf_la_SOURCES:%c=)
 
 
-AM_CPPFLAGS = $(LIBGTK_CFLAGS) $(LIBXML_CFLAGS) -I$(top_srcdir)/src -I$(top_srcdir)
+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 2cf600c..7bd5fa5 100644
--- a/plugins/readmc/Makefile.am
+++ b/plugins/readmc/Makefile.am
@@ -12,8 +12,6 @@ libreadmc_la_SOURCES =					\
 	v23.h v23.c							\
 	v24.h v24.c
 
-libreadmc_la_CFLAGS = $(AM_CFLAGS)
-
 libreadmc_la_LDFLAGS =									\
 	-L$(top_srcdir)/src/.libs -lchrysacore				\
 	-L$(top_srcdir)/plugins/mobicore/.libs -lmobicore	\
@@ -25,6 +23,6 @@ devdir = $(includedir)/chrysalide-$(subdir)
 dev_HEADERS = $(libreadmc_la_SOURCES:%c=)
 
 
-AM_CPPFLAGS = $(LIBGTK_CFLAGS) $(LIBXML_CFLAGS) -I$(top_srcdir)/src -I$(top_srcdir)
+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 7ca97be..50ded08 100644
--- a/plugins/ropgadgets/Makefile.am
+++ b/plugins/ropgadgets/Makefile.am
@@ -10,8 +10,6 @@ libropgadgets_la_SOURCES =				\
 	plugin.h plugin.c					\
 	select.h select.c
 
-libropgadgets_la_CFLAGS = $(AM_CFLAGS)
-
 libropgadgets_la_LDFLAGS =					\
 	-L$(top_srcdir)/src/.libs -lchrysacore	\
 	-L$(top_srcdir)/plugins/arm/.libs -larm
-- 
cgit v0.11.2-87-g4458