PKG_CPPFLAGS=-I. -Ihunspell -DBUILDING_LIBHUNSPELL
PKG_CXXFLAGS=$(C_VISIBILITY)
CXX_STD=CXX11

#Add Windows-only flags (ifeq is a GNU extension...)
WINRICONV=$(subst 64,-lRiconv,$(subst 32,64,$(WIN)))
PKG_LIBS=-Lhunspell -lstathunspell $(WINRICONV)

LIBHUNSPELL=parsers/textparser.o parsers/latexparser.o parsers/manparser.o \
	parsers/xmlparser.o parsers/htmlparser.o \
  hunspell/affentry.o hunspell/affixmgr.o hunspell/filemgr.o \
  hunspell/hashmgr.o hunspell/hunspell.o hunspell/hunzip.o hunspell/phonet.o \
  hunspell/replist.o hunspell/suggestmgr.o hunspell/csutil.o

#all: clean

STATLIB = hunspell/libstathunspell.a

$(SHLIB): $(STATLIB)

$(STATLIB): $(LIBHUNSPELL)
	$(AR) rcs $(STATLIB) $(LIBHUNSPELL)

clean:
	rm -f $(SHLIB) $(LIBHUNSPELL) $(OBJECTS) $(STATLIB)

.PHONY: all clean
