# Makefile for Hindawi chhattisgarhi, in the form of Chintamani's guru/Makefile: each transducer goes through the script
# filter and Romenagri (uni2acii, acii2cf) before flex. Generated by lang/hindawi/tools/complete_cells.py.
ROOT ?= $(abspath ../../../..)
ROMENAGRI ?= $(ROOT)/.build/chintamani/Romenagri
FILTER ?= python3 $(ROOT)/lang/hindawi/tools/script_filters.py prepare chhattisgarhi
FLEX ?= flex
ALL = h2c c2h h2cpp cpp2h h2asm asm2h h2java java2h h2b b2h h2py py2h h2yacc yacc2h h2l l2h h2logo logo2h
all: $(ALL)
%: %.uhin
	cat $< | $(FILTER) | iconv -f utf-8 -t utf-16 | $(ROMENAGRI)/uni2acii | $(ROMENAGRI)/acii2cf > $@.lex
	$(FLEX) -8 -o $@_lex.c $@.lex
	gcc -o $@ $@_lex.c -lfl
clean:
	rm -f $(ALL) *.lex *_lex.c
