
include version.mk

# You can add flags to the compilation with:
# CFLAGS += my_flags

# Add some C preprocessor flags
CFLAGS += -DSEME_VERSION_MAJOR=$(SEME_VERSION_MAJOR)
CFLAGS += -DSEME_VERSION_MINOR=$(SEME_VERSION_MINOR)
CFLAGS += -DSEME_VERSION_STR=\"$(SEME_VERSION_STR)\"


# Note: GNU make automatically re-update included makefiles

AUTOGEN_MAKEFILE = autogen.mk

SOURCES = plugin.cc sememngr.cc semeprop.cc sememap.cc semefile.cc semenew.cc \
          semestr.cc semedata.cc semenbr.cc semebool.cc semecol.cc \
          semeaddl.cc semeaddp.cc semetile.cc semedlg.cc

PROGRAM = seme$(EXE)

# Includes the makefile generated by emetool (unless we're going to remove it)
ifneq '$(MAKECMDGOALS)' 'distclean'
include $(AUTOGEN_MAKEFILE)
endif

# Create the makefile
$(AUTOGEN_MAKEFILE):
	../emetool --makefile $(PROGRAM) $(SOURCES) > $@

distclean: clean
	-$(RM) $(AUTOGEN_MAKEFILE)

.PHONY: distclean clean

# vim: syntax=make noet
