examples: fix eolian_cxx Makefile.am to work with --with-eolian-cxx.
authorSavio Sena <savio@expertisesolutions.com.br>
Fri, 9 May 2014 12:55:26 +0000 (14:55 +0200)
committerCedric Bail <cedric.bail@free.fr>
Fri, 9 May 2014 13:35:51 +0000 (15:35 +0200)
Summary:
Includes Makefile_Eolian*_Helper.am and -- since
_EOLIAN_GEN_DEP and _EOLIAN_CXX_DEP can't be resolved from
src/examples -- redefine the generation rules locally.

Reviewers: cedric, stefan, stefan_schmidt

CC: felipealmeida, cedric
Differential Revision: https://phab.enlightenment.org/D836

Signed-off-by: Cedric Bail <cedric.bail@free.fr>
src/examples/eolian_cxx/Makefile.am

index 8127e65..3d126df 100644 (file)
@@ -2,6 +2,17 @@
 AUTOMAKE_OPTIONS = subdir-objects
 
 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/ecore_audio
+
+include $(top_srcdir)/src/Makefile_Eolian_Helper.am
+include $(top_srcdir)/src/Makefile_Eolian_Cxx_Helper.am
 
 AM_CXXFLAGS = \
        -I$(srcdir) \
@@ -51,6 +62,9 @@ GENERATED = \
        colourablesquare.eo.h \
        colourablesquare.eo.hh
 
+BUILT_SOURCES = $(GENERATED)
+CLEANFILES += $(BUILT_SOURCES)
+
 EOS = \
        colourable.eo \
        colourablesquare.eo
@@ -71,30 +85,27 @@ EXTRA_PROGRAMS = \
 DATA_FILES = Makefile.examples $(EOS)
 CLEANFILES =
 
-eolian_cxx_simple_01_SOURCES = eolian_cxx_simple_01.cc $(IMPL)
-eolian_cxx_simple_01_DEPENDENCIES = $(GENERATED)
+eolian_cxx_simple_01_SOURCES = \
+       eolian_cxx_simple_01.cc \
+       colourable.c \
+       colourablesquare.c
 
-eolian_cxx_inherit_01_SOURCES = eolian_cxx_inherit_01.cc $(IMPL)
-eolian_cxx_inherit_01_DEPENDENCIES = $(GENERATED)
+eolian_cxx_simple_01.$(OBJEXT): $(GENERATED)
 
-EOLIAN_GEN = $(top_builddir)/src/bin/eolian/eolian_gen${EXEEXT}
-EOLIAN_CXX = $(top_builddir)/src/bin/eolian_cxx/eolian_cxx${EXEEXT}
-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/ecore_audio
+eolian_cxx_inherit_01_SOURCES = \
+       eolian_cxx_inherit_01.cc \
+       colourable.c \
+       colourablesquare.c
 
-SUFFIXES = .eo .eo.c .eo.h .eo.hh
+eolian_cxx_inherit_01.$(OBJEXT): $(GENERATED)
 
-%.eo.hh: %.eo $(EOLIAN_CXX)
-       $(AM_V_EOLCXX)$(EOLIAN_CXX) $(EOLIAN_FLAGS) -I./$< -o $@
+%.eo.hh: %.eo
+       $(AM_V_EOLCXX)$(EOLIAN_CXX) $(EOLIAN_FLAGS) -I$< -o $@
 
-%.eo.c: %.eo $(EOLIAN_GEN)
+%.eo.c: %.eo
        $(AM_V_EOL)$(EOLIAN_GEN) --eo --legacy $(EOLIAN_FLAGS) --gc -o $@ $<
 
-%.eo.h: %.eo $(EOLIAN_GEN)
+%.eo.h: %.eo
        $(AM_V_EOL)$(EOLIAN_GEN) --eo $(EOLIAN_FLAGS) --gh -o $@ $<
 
 examples: $(EOS) $(GENERATED) $(EXTRA_PROGRAMS)