summaryrefslogtreecommitdiff
path: root/src/examples/eolian_cxx/Makefile.am
blob: 2b9cf913e386a27ec729ee83dcb52f1a5b550e3d (plain) (blame)
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
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
MAINTAINERCLEANFILES = Makefile.in
CLEANFILES =

EOLIAN_FLAGS = \
  -I$(srcdir) \
  -I$(top_srcdir)/src/lib/eo \
  -I$(top_srcdir)/src/lib/evas/canvas \
  -I$(top_srcdir)/src/lib/edje \
  -I$(top_srcdir)/src/lib/efl \
  -I$(top_srcdir)/src/lib/ecore_audio

include $(top_srcdir)/src/Makefile_Eolian_Helper.am
include $(top_srcdir)/src/Makefile_Eolian_Cxx_Helper.am

AM_CXXFLAGS = \
	-I$(srcdir) \
	-I$(builddir) \
	-I$(top_srcdir)/src/lib/efl \
	-I$(top_builddir)/src/lib/efl \
	-I$(top_srcdir)/src/lib/efl/interfaces \
	-I$(top_builddir)/src/lib/efl/interfaces \
	-I$(top_srcdir)/src/lib/eina \
	-I$(top_builddir)/src/lib/eina \
	-I$(top_srcdir)/src/lib/eo \
	-I$(top_builddir)/src/lib/eo \
	-I$(top_srcdir)/src/bindings/eo_cxx \
	-I$(top_builddir)/src/bindings/eo_cxx \
	-I$(top_srcdir)/src/bindings/eina_cxx \
	-I$(top_builddir)/src/bindings/eina_cxx \
	-I$(top_srcdir)/src/bindings/ecore_cxx \
	-I$(top_builddir)/src/bindings/ecore_cxx \
	-I$(top_srcdir)/src/lib/evas/ \
	-I$(top_builddir)/src/lib/evas/ \
	-I$(top_srcdir)/src/lib/evas/common \
	-I$(top_builddir)/src/lib/evas/common \
	-I$(top_srcdir)/src/lib/evas/canvas \
	-I$(top_builddir)/src/lib/evas/canvas \
	-I$(top_srcdir)/src/lib/ecore \
	-I$(top_builddir)/src/lib/ecore \
	-I$(top_srcdir)/src/lib/ecore_evas \
	-I$(top_builddir)/src/lib/ecore_evas

AM_CFLAGS = $(AM_CXXFLAGS)

AM_LDFLAGS = \
	-L$(top_builddir)/src/lib/efl \
	-L$(top_builddir)/src/lib/eina \
	-L$(top_builddir)/src/lib/eo \
  -L$(top_builddir)/src/lib/evas \
	-L$(top_builddir)/src/lib/ecore \
	-L$(top_builddir)/src/lib/ecore_evas \
	-lefl -leina -levas -leo -lecore -lecore_evas -pthread

LDADD = \
	$(top_builddir)/src/lib/efl/libefl.la \
	$(top_builddir)/src/lib/eo/libeo.la \
	$(top_builddir)/src/lib/eina/libeina.la \
	$(top_builddir)/src/lib/evas/libevas.la \
	$(top_builddir)/src/lib/ecore_evas/libecore_evas.la

GENERATED = \
	colourable.eo.c \
	colourable.eo.h \
	colourable.eo.hh \
	colourablesquare.eo.c \
	colourablesquare.eo.h \
	colourablesquare.eo.hh

BUILT_SOURCES = $(GENERATED)
CLEANFILES += $(BUILT_SOURCES)

ECXX_EXAMPLE_EOS = \
	colourable.eo \
	colourablesquare.eo

IMPL = \
	colourable.c \
	colourable_cxx.cc \
	colourablesquare.c \
	colourablesquare_cxx.cc \
	colourable_stub.c \
	colourablesquare_stub.c

SRCS = \
	eolian_cxx_simple_01.cc \
	eolian_cxx_inherit_01.cc \
	eolian_cxx_callbacks_01.cc \
	eolian_cxx_eo_events_01.cc \
	eolian_cxx_complex_types_01.cc \
	$(IMPL)

EXTRA_PROGRAMS = \
	eolian_cxx_simple_01 \
	eolian_cxx_simple_01_cxx_impl \
	eolian_cxx_inherit_01 \
	eolian_cxx_callbacks_01 \
	eolian_cxx_eo_events_01 \
	eolian_cxx_complex_types_01

DATA_FILES = Makefile.examples $(ECXX_EXAMPLE_EOS)
EXTRA_DIST = $(DATA_FILES)

eolian_cxx_simple_01_SOURCES = \
	eolian_cxx_simple_01.cc \
	colourable.c \
	colourablesquare.c
eolian_cxx_simple_01.$(OBJEXT): $(GENERATED)

eolian_cxx_simple_01_cxx_impl_SOURCES = \
	eolian_cxx_simple_01.cc \
	colourable_stub.c \
	colourable_stub.h \
	colourablesquare_stub.c \
	colourablesquare_stub.h \
	colourable_cxx.cc \
	colourablesquare_cxx.cc
eolian_cxx_simple_01_cxx_impl.$(OBJEXT): $(GENERATED)

eolian_cxx_inherit_01_SOURCES = \
	eolian_cxx_inherit_01.cc \
	colourable.c \
	colourablesquare.c
eolian_cxx_inherit_01.$(OBJEXT): $(GENERATED)

eolian_cxx_callbacks_01_SOURCES = eolian_cxx_callbacks_01.cc

eolian_cxx_eo_events_01_SOURCES = eolian_cxx_eo_events_01.cc

eolian_cxx_complex_types_01_SOURCES = eolian_cxx_complex_types_01.cc

%.eo.hh: %.eo
	$(AM_V_EOLCXX)$(EOLIAN_CXX) $(EOLIAN_FLAGS) -I${abs_srcdir} -o $@ $<

%.eo.c: %.eo
	$(AM_V_EOL)$(EOLIAN_GEN) --eo --legacy $(EOLIAN_FLAGS) --gc -o $@ $<

%.eo.h: %.eo
	$(AM_V_EOL)$(EOLIAN_GEN) --eo $(EOLIAN_FLAGS) --gh -o $@ $<

examples: $(ECXX_EXAMPLE_EOS) $(GENERATED) $(EXTRA_PROGRAMS)

clean-local:
	rm -f $(EXTRA_PROGRAMS) $(GENERATED)

install-examples:
	$(MKDIR_P) $(datadir)/eolian_cxx/examples
	cd $(abs_srcdir) && $(install_sh_DATA) -c $(SRCS) $(DATA_FILES) $(datadir)/eolian_cxx/examples

uninstall-local:
	for f in $(SRCS) $(DATA_FILES); do \
	  rm -f $(datadir)/eolian_cxx/examples/$$f ; \
	done

if ALWAYS_BUILD_EXAMPLES
noinst_PROGRAMS = $(EXTRA_PROGRAMS)
endif