File: Makefile.am

package info (click to toggle)
dia 0.97.3%2Bgit20160930-6
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 52,952 kB
  • ctags: 17,146
  • sloc: ansic: 155,065; xml: 16,326; python: 6,641; cpp: 4,935; makefile: 3,826; sh: 540; perl: 137; sed: 19
file content (98 lines) | stat: -rw-r--r-- 2,481 bytes parent folder | download | duplicates (3)
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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
## Process this file with automake to produce Makefile.in

if HAVE_CPLUSPLUS
libpython_bindings = _dia.la
endif

## without SWIG we wont have/build this
## but to avoid bit-rotting we build the rest
if WITH_SWIG
BUILT_SOURCES = \
	dia-python.cpp
endif

## needs just Python
if WITH_PYTHON
PYTHON_EXTRA_SOURCE = \
	dia-python-extra.cpp \
	dia-python-extra.h \
	$(BUILT_SOURCES)
endif

## the rest of the sources is independent of SWIG and Python

## nothing to be installed yet
if WITH_SWIG
## this is not working yet (link error)
#pkgpyexec_LTLIBRARIES = $(libpython_bindings)
# the python part (import dia;)
#pkgpython_PYTHON = dia.py
else
#pkgpython_PYTHON = 
endif
noinst_LTLIBRARIES = $(libpython_bindings)

# c++ wrapper over Dia's C api
_dia_la_SOURCES = \
        dia-connections.cpp \
        dia-connections.h \
	dia-properties.cpp \
	dia-properties.h \
	dia-object.cpp \
	dia-object.h \
	dia-renderer.cpp \
	dia-renderer.h \
	dia-diagramdata.cpp \
	dia-diagramdata.h \
	\
	dia-extra.cpp \
	dia-extra.h \
	\
	$(PYTHON_EXTRA_SOURCE)

_dia_la_CPPFLAGS = $(PYTHON_INCLUDES) -I$(top_srcdir)/lib
_dia_la_LDFLAGS = -module -avoid-version -export-symbols-regex init_dia
## must link ../lib/libdia.la but don't know how;(
_dia_la_LIBADD = $(PYTHON_LIBS) $(GTK_LIBS) $(top_builddir)/lib/libdia.la

# trial and error adaption from pygimp;)
#_diadir = $(libdir)/lib
#_dia_LTLIBRARIES = $(top_builddir)/lib/libdia.la

INCLUDES = \
	$(DEBUG_FLAGS) \
	-I$(top_srcdir) \
	-I$(top_srcdir)/lib \
	$(GTK_CFLAGS) \
	$(PYTHON_INCLUDES) \
	$(XML_CFLAGS) $(UNICODE_CFLAGS) 

# called INTERFACES in makefile.msc, what swig processes
INTERFACES = \
	dia.swig \
	dia-properties.h \
	dia-object.h \
	dia-renderer.h \
	dia-diagramdata.h \
	dia-connections.h

SWIG_PYTHON_OPT = -python -modern -extranative -c++

if WITH_SWIG
dia-python.cpp : $(INTERFACES)
	$(SWIG) $(SWIG_PYTHON_OPT) -I$(top_srcdir) -I../lib -o $@ $<
else
dia-python.cpp : $(INTERFACES)
	echo /* No SWIG */ > $@
endif

GCCXMLINC = -I.. -I../lib -I/usr/include/gtk-2.0 -I/usr/lib64/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/libxml2 -I/usr/include/libart-2.0   -I/usr/include/python2.5 -I/usr/include/libxml2
$(srcdir)/dia-object.xml : $(INTERFACES)
	gccxml --gccxml-cxxflags '$(GTK_CFLAGS) $(XML_CFLAGS)' -I$(top_srcdir) -I ../lib dia-object.cpp -fxml=$@

EXTRA_DIST = \
	dia.swig \
	makefile.msc \
	Doxyfile \
	test.py