examples/unsorted/eolian_cxx/Makefile.examples

48 lines
1.4 KiB
Makefile

CXX=g++
CC=gcc
EOLIAN_GEN=eolian_gen
EOLIAN_CXX=eolian_cxx
COMMON_FLAGS=`pkg-config --libs --cflags eina,ecore,evas,ecore-evas,emotion,eolian,eolian-cxx,eo-cxx,eina-cxx` -DEFL_BETA_API_SUPPORT
EOLIAN_FLAGS=`pkg-config --variable=eolian_flags eo` -I.
EOS = ns_colourable.eo ns_colourablesquare.eo
IMPL = colourable.c colourablesquare.c
GENERATED = \
ns_colourable.eo.c \
ns_colourable.eo.h \
ns_colourable.eo.hh \
ns_colourablesquare.eo.c \
ns_colourablesquare.eo.h \
ns_colourablesquare.eo.hh
EXAMPLES = eolian_cxx_simple_01 \
eolian_cxx_callbacks_01
OBJS = colourable.o colourablesquare.o
all: $(OBJS) examples
codegen:
$(EOLIAN_CXX) $(EOLIAN_FLAGS) ./ns_colourable.eo -o ns_colourable.eo.hh
$(EOLIAN_CXX) $(EOLIAN_FLAGS) ./ns_colourablesquare.eo -o ns_colourablesquare.eo.hh
$(EOLIAN_GEN) $(EOLIAN_FLAGS) -gc -o c:ns_colourable.eo.c ns_colourable.eo
$(EOLIAN_GEN) $(EOLIAN_FLAGS) -gc -o c:ns_colourablesquare.eo.c ns_colourablesquare.eo
$(EOLIAN_GEN) $(EOLIAN_FLAGS) -gh -o h:ns_colourable.eo.h ns_colourable.eo
$(EOLIAN_GEN) $(EOLIAN_FLAGS) -gh -o h:ns_colourablesquare.eo.h ns_colourablesquare.eo
$(OBJS): codegen
$(CC) -c colourable.c $(COMMON_FLAGS)
$(CC) -c colourablesquare.c $(COMMON_FLAGS)
examples: $(EXAMPLES)
$(EXAMPLES):
$(CXX) -o $@ $@.cc $(OBJS) $(COMMON_FLAGS) -std=c++11
clean:
@echo "Cleaning up built objects..."
@rm -Rf $(EXAMPLES)