#
#  KAKASI (Kanji Kana Simple inversion program)
#  $Header: Makefile,v 2.2 92/08/02 takahasi Locked $
#  Copyright (C) 1992
#  Hironobu Takahashi (takahasi@tiny.or.jp)
# 
#  This program is free software; you can redistribute it and/or modify
#  it under the terms of the GNU General Public License as published by
#  the Free Software Foundation; either versions 2, or (at your option)
#  any later version.
# 
#  This program is distributed in the hope that it will be useful
#  but WITHOUT ANY WARRANTY; without even the implied warranty of
#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#  GNU General Public License for more details.
# 
#  You should have received a copy of the GNU General Public License
#  along with KAKASI, see the file COPYING.  If not, write to the Free
#  Software Foundation Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
#
#  $Log:	Makefile,v $
# Revision 2.1  92/07/19  09:24:20  takahasi
# 
# Revision 2.0  92/07/18  15:17:12  takahasi
# 

# Please assign next values.

BINDIR=/usr/local/bin
LIBDIR=/usr/local/lib/kakasi
OPTIONS=-O

CFLAGS= $(OPTIONS) \
       -DITAIJIDICT=\"$(LIBDIR)/itaijidict\" \
       -DKANWADICT=\"$(LIBDIR)/kanwadict\"

SOURCES= kakasi.c a2.c j2.c g2.c k2.c E2.c H2.c K2.c J2.c dict.c itaiji.c kanjiio.c 78_83.c
OBJECTS= kakasi.o a2.o j2.o g2.o k2.o E2.o H2.o K2.o J2.o dict.o itaiji.o kanjiio.o 78_83.o

KSOURCES= mkkanwa.c dict.c itaiji.c
KOBJECTS= mkkanwa.o dict.o itaiji.o

ATOBJECTS= atoc-conv.o conv-util.o
RDOBJECTS= rdic-conv.o conv-util.o

STDDICTS=itaijidict

all: kakasi mkkanwa atoc-conv rdic-conv

kakasi: $(OBJECTS)
	$(CC) $(CFLAGS) -o $@ $(OBJECTS)

mkkanwa: $(KOBJECTS)
	$(CC) -o $@ $(KOBJECTS)

atoc-conv: $(ATOBJECTS)
	$(CC) -o $@ $(ATOBJECTS)

rdic-conv: $(RDOBJECTS)
	$(CC) -o $@ $(RDOBJECTS)

lint: $(SOURCES)
	lint $(CFLAGS) $(SOURCES)

install: kakasi mkkanwa atoc-conv rdic-conv
	cp kakasi $(BINDIR)
	cp $(STDDICTS) mkkanwa atoc-conv rdic-conv $(LIBDIR)
	mkkanwa $(LIBDIR)/kanwadict kakasidict

clean: 
	rm -rf $(OBJECTS) *~ kakasi mkkanwa atoc-conv rdic-conv

kakasi.o: kakasi.c kakasi.h
a2.o: a2.c kakasi.h
j2.o: j2.c kakasi.h
g2.o: g2.c kakasi.h
k2.o: k2.c kakasi.h
E2.o: E2.c kakasi.h
H2.o: H2.c kakasi.h
K2.o: K2.c kakasi.h
J2.o: J2.c kakasi.h J2.h
dict.o: dict.c J2.h
itaiji.o: itaiji.c
kanjiio.o: kanjiio.c kakasi.h
78_83.o: 78_83.c kakasi.h
mkkanwa.o: mkkanwa.c
atoc-conv.o: atoc-conv.c
rdic-conv.o: rdic-conv.c
conv-util.o: conv-util.c
