# this makefile has been taken from gerodic. 

include @top_builddir@/makerule.mk
  top_srcdir = @top_srcdir@
      srcdir = @srcdir@
top_builddir = @top_builddir@
 WNNJUTILOBJ = $(top_builddir)/Wnn/jutil

INSTALL         = @INSTALL@ $(INSTALLFLAGS)
LOCAL_INSTFLAGS = -o ${WNNOWNER}

ATOD=${WNNJUTILOBJ}/atod

WNNTOUCH=${WNNJUTILOBJ}/wnntouch

HINSI=${PUBDICPLUSSRC}/hinsi.data

2CHDIR=${JWNNDICDIR}/misc

SRC=$(srcdir)/2ch.u $(srcdir)/2ch_face.u
OBJ=2ch.dic 2ch_face.dic

.SUFFIXES: .dic .u

all:: ${OBJ}

install:: ${OBJ}
	@if [ -d $(DESTDIR)$(2CHDIR) ]; then set +x; \
	else (set -x; $(MKDIRHIER) $(DESTDIR)$(2CHDIR)); fi
	chown ${WNNOWNER} $(DESTDIR)$(2CHDIR)
	$(INSTALL) $(INSTDATFLAGS) $(LOCAL_INSTFLAGS) ${OBJ} $(DESTDIR)$(2CHDIR)
	for i in ${OBJ}; do \
		${WNNTOUCH} $(DESTDIR)$(2CHDIR)/$$i; \
	done

clean::
	$(RM) ${OBJ}

.u.dic:
	${ATOD} -h ${HINSI} $@ < $<
