summaryrefslogtreecommitdiff
path: root/plugins/pe/Makefile.am
blob: e9cd4827e61c9ae87e50bb939c11fddba7d192ad (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66

DEFAULT_INCLUDES = -idirafter. -I$(top_builddir)

lib_LTLIBRARIES = libpe.la

libdir = $(pluginslibdir)


if BUILD_PYTHON_PACKAGE

RUN_PATH = -Wl,-rpath,'$$ORIGIN/../chrysalide-libs'

endif

if BUILD_PYTHON3_BINDINGS

PYTHON3_LIBADD = python/libpepython.la

if BUILD_DISCARD_LOCAL

if BUILD_PYTHON_PACKAGE
PYTHON3_RUN_PATH = -Wl,-rpath,'$$ORIGIN/..'
else
PYTHON3_RUN_PATH = -Wl,-rpath,'$$ORIGIN'
endif

else

PYTHON3_RUN_PATH = -Wl,-rpath,$(abs_top_srcdir)/plugins/pychrysalide/.libs

endif

PYTHON3_LDFLAGS = $(PYTHON3_RUN_PATH) -L$(top_srcdir)/plugins/pychrysalide/.libs -l:pychrysalide.so

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						\
	symbols.h symbols.c

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	\
	$(RUN_PATH) $(PYTHON3_LDFLAGS)


devdir = $(includedir)/chrysalide/$(subdir)

dev_HEADERS = $(libpe_la_SOURCES:%c=)


SUBDIRS = $(PYTHON3_SUBDIRS)