#
#   $Id: Makefile.in,v 1.18 2004/05/21 16:39:32 aono Exp $
#

#
# FreeWnn is a network-extensible Kana-to-Kanji conversion system.
# This file is part of FreeWnn.
# 
# Copyright Kyoto University Research Institute for Mathematical Sciences
#                 1987, 1988, 1989, 1990, 1991, 1992
# Copyright OMRON Corporation. 1987, 1988, 1989, 1990, 1991, 1992, 1999
# Copyright ASTEC, Inc. 1987, 1988, 1989, 1990, 1991, 1992
# Copyright FreeWnn Project 1999, 2000, 2001, 2002, 2003, 2004
# 
# Maintainer:  FreeWnn Project   <freewnn@tomo.gr.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 version 2 of the License, 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 this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
#

include @top_builddir@/makerule.mk
  top_srcdir = @top_srcdir@
top_builddir = @top_builddir@

INSTALL      = @INSTALL@ $(INSTALLFLAGS)

 JSERVERDEFINES = -DJSERVER -DWRITE_CHECK
       INCLUDES = -I$(CWNNINCLUDESRC) -I$(top_builddir)
        DEFINES = $(CWNNDEFINES) $(JSERVERDEFINES) $(WNNTERM) $(CWNNLANGDEF)
LOCAL_INSTFLAGS = $(INSTUIDFLAGS) -o $(WNNOWNER)
  SERVERINITDEF = -DSERVER_INIT_FILE=\"/$(CWNNLANG)/cserverrc\"
    HINSIDEFINE = -DHINSIDATA_FILE=\"/$(CWNNLANG)/cixing.data\"
 TSERVERINITDEF = -DSERVER_INIT_FILE=\"/$(TWNNLANG)/tserverrc\"
   THINSIDEFINE = -DHINSIDATA_FILE=\"/$(TWNNLANG)/cixing.data\"
        WRAPLIB = @WRAPLIB@

HDRS = ddefine.h de_header.h fzk.h kaiseki.h

SRC0 = de.c
SRC1= dispatch.c 	do_dic_env.c 	do_dic_no.c 	do_filecom.c 	error.c 	jbiki.c 	jbiki_b.c 	jishoop.c 	rd_jishoop.c 	readfile.c 	b_index.c 	jishosub.c 	jmt0.c 	mknode0.c 	mknode1.c 	mknode2.c 	renbn_kai.c 	bnsetu_kai.c 	daibn_kai.c 	jikouho.c 	jikouho_d.c 	fzk.c 	atojis.c 	get_kaiarea.c 	snd_rcv.c 	do_henkan.c 	do_henkan1.c 	do_env.c 	do_hindo_s.c 	initjserv.c 	hinsi_list.c 	sisheng.c 	w_string.c

OBJ0= de.o
OBJ1= dispatch.o 	do_dic_env.o 	do_dic_no.o 	do_filecom.o 	error.o 	jbiki.o 	jbiki_b.o 	jishoop.o 	rd_jishoop.o 	readfile.o 	b_index.o 	jishosub.o 	jmt0.o 	mknode0.o 	mknode1.o 	mknode2.o 	renbn_kai.o 	bnsetu_kai.o 	daibn_kai.o 	jikouho.o 	jikouho_d.o 	fzk.o 	atojis.o 	get_kaiarea.o 	snd_rcv.o 	do_henkan.o 	do_henkan1.o 	do_env.o 	do_hindo_s.o 	initjserv.o 	hinsi_list.o 	sisheng.o 	w_string.o

SRC3= $(CWNNJLIBSRC)/wnnerrmsg.c
OBJ3= wnnerrmsg.o

SRC4= $(CWNNETCSRC)/strings.c
OBJ4= strings.o
SRC5= $(CWNNETCSRC)/sstrings.c
OBJ5= sstrings.o
SRC6= $(CWNNETCSRC)/bdic.c
OBJ6= bdic.o
SRC7= $(CWNNETCSRC)/dic_atojis.c
OBJ7= dic_atojis.o
SRCGETHINSI= $(CWNNETCSRC)/gethinsi.c
OBJGETHINSI= gethinsi.o
SRC9= $(CWNNETCSRC)/revdic.c
OBJ9= revdic.o
SRC10= $(CWNNETCSRC)/hindo.c
OBJ10= hindo.o
SRC11= $(CWNNETCSRC)/pwd.c
OBJ11= pwd.o
SRC12= $(CWNNETCSRC)/bcopy.c
OBJ12= bcopy.o
SRC13= $(CWNNETCSRC)/msg.c
OBJ13= msg.o
SRC14= $(CWNNETCSRC)/xutoj.c
OBJ14= xutoj.o
SRC20= $(CWNNETCSRC)/getopt.c
OBJ20= getopt.o
SRC21= $(CWNNETCSRC)/getopt1.c
OBJ21= getopt1.o
TSRC0= de_t.c
TOBJ0= de_t.o
TSRCGETHINSI= gethinsi_t.c
TOBJGETHINSI= gethinsi_t.o
OBJSUPPORT = @JS_SUPPORTOBJS@
TSRCS= $(TSRC0) $(TSRCGETHINSI)
SRCS= $(SRC0) $(SRC1) $(SRC3) $(SRC4) $(SRC5) $(SRC6) $(SRC7) \
    $(SRCGETHINSI) $(SRC9) $(SRC10) $(SRC11) $(SRC12) $(SRC13) $(SRC14) \
    $(SRC20) $(SRC21) $(TSRCS)

OBJS= $(OBJ0) $(OBJ1) $(OBJ3) $(OBJ4) $(OBJ5) $(OBJ6) $(OBJ7) \
    $(OBJGETHINSI) $(OBJ9) $(OBJ10) $(OBJ11) $(OBJ12) $(OBJ13) $(OBJ14) \
    $(OBJ20) $(OBJ21) $(OBJSUPPORT)

TOBJS= $(TOBJ0) $(OBJ1) $(OBJ3) $(OBJ4) $(OBJ5) $(OBJ6) $(OBJ7) \
    $(TOBJGETHINSI) $(OBJ9) $(OBJ10) $(OBJ11) $(OBJ12) $(OBJ13) $(OBJ14) \
    $(OBJ20) $(OBJ21) $(OBJSUPPORT)

all:: $(HDRS) $(SRC0) $(SRC1) $(TSRCS) cserver tserver

#all:: cserver

#all:: tserver

cserver: $(OBJS)
	$(RM) $@
	$(LIBTOOL) --mode=link $(CCLINK) -o $@ $(LDOPTIONS) $(OBJS) @LIBS@ $(WRAPLIB)

clean::
	$(RM) cserver
	$(RM) -r .libs
	$(RM) *.lo *.la

tserver: $(TOBJS)
	$(RM) $@
	$(LIBTOOL) --mode=link $(CCLINK) -o $@ $(LDOPTIONS) $(TOBJS) @LIBS@ $(WRAPLIB)

clean::
	$(RM) tserver
	$(RM) -r .libs
	$(RM) *.lo *.la

instserver:: install

install:: cserver
	@if [ -d $(DESTDIR)$(CWNNBINDIR) ]; then set +x; \
	else (set -x; $(MKDIRHIER) $(DESTDIR)$(CWNNBINDIR)); fi
	$(LIBTOOL) --mode=install $(INSTALL) $(INSTPGMFLAGS) $(LOCAL_INSTFLAGS) cserver $(DESTDIR)$(CWNNBINDIR)/cserver

install:: tserver
	@if [ -d $(DESTDIR)$(CWNNBINDIR) ]; then set +x; \
	else (set -x; $(MKDIRHIER) $(DESTDIR)$(CWNNBINDIR)); fi
	$(LIBTOOL) --mode=install $(INSTALL) $(INSTPGMFLAGS) $(LOCAL_INSTFLAGS) tserver $(DESTDIR)$(CWNNBINDIR)/tserver

includes:: $(HDRS) $(SRC0) $(SRC1) $(TSRCS)

$(TSRC0):  $(SRC0)
	$(RM) $@
	$(LN) $? $@

$(TSRCGETHINSI):  $(SRCGETHINSI)
	$(RM) $@
	$(LN) $? $@

ddefine.h:  $(WNNJSERVERSRC)/ddefine.h
	$(RM) $@
	$(LN) $? $@

includes:: ddefine.h

depend:: ddefine.h

clean::
	$(RM) ddefine.h

de_header.h:  $(WNNJSERVERSRC)/de_header.h
	$(RM) $@
	$(LN) $? $@

includes:: de_header.h

depend:: de_header.h

clean::
	$(RM) de_header.h

fzk.h:  $(WNNJSERVERSRC)/fzk.h
	$(RM) $@
	$(LN) $? $@

includes:: fzk.h

depend:: fzk.h

clean::
	$(RM) fzk.h

kaiseki.h:  $(WNNJSERVERSRC)/kaiseki.h
	$(RM) $@
	$(LN) $? $@

includes:: kaiseki.h

depend:: kaiseki.h

clean::
	$(RM) kaiseki.h

de.c:  $(WNNJSERVERSRC)/de.c
	$(RM) $@
	$(LN) $? $@

includes:: de.c

depend:: de.c

clean::
	$(RM) de.c

dispatch.c:  $(WNNJSERVERSRC)/dispatch.c
	$(RM) $@
	$(LN) $? $@

includes:: dispatch.c

depend:: dispatch.c

clean::
	$(RM) dispatch.c

do_dic_env.c:  $(WNNJSERVERSRC)/do_dic_env.c
	$(RM) $@
	$(LN) $? $@

includes:: do_dic_env.c

depend:: do_dic_env.c

clean::
	$(RM) do_dic_env.c

do_dic_no.c:  $(WNNJSERVERSRC)/do_dic_no.c
	$(RM) $@
	$(LN) $? $@

includes:: do_dic_no.c

depend:: do_dic_no.c

clean::
	$(RM) do_dic_no.c

do_filecom.c:  $(WNNJSERVERSRC)/do_filecom.c
	$(RM) $@
	$(LN) $? $@

includes:: do_filecom.c

depend:: do_filecom.c

clean::
	$(RM) do_filecom.c

error.c:  $(WNNJSERVERSRC)/error.c
	$(RM) $@
	$(LN) $? $@

includes:: error.c

depend:: error.c

clean::
	$(RM) error.c

jbiki.c:  $(WNNJSERVERSRC)/jbiki.c
	$(RM) $@
	$(LN) $? $@

includes:: jbiki.c

depend:: jbiki.c

clean::
	$(RM) jbiki.c

jbiki_b.c:  $(WNNJSERVERSRC)/jbiki_b.c
	$(RM) $@
	$(LN) $? $@

includes:: jbiki_b.c

depend:: jbiki_b.c

clean::
	$(RM) jbiki_b.c

jishoop.c:  $(WNNJSERVERSRC)/jishoop.c
	$(RM) $@
	$(LN) $? $@

includes:: jishoop.c

depend:: jishoop.c

clean::
	$(RM) jishoop.c

rd_jishoop.c:  $(WNNJSERVERSRC)/rd_jishoop.c
	$(RM) $@
	$(LN) $? $@

includes:: rd_jishoop.c

depend:: rd_jishoop.c

clean::
	$(RM) rd_jishoop.c

readfile.c:  $(WNNJSERVERSRC)/readfile.c
	$(RM) $@
	$(LN) $? $@

includes:: readfile.c

depend:: readfile.c

clean::
	$(RM) readfile.c

b_index.c:  $(WNNJSERVERSRC)/b_index.c
	$(RM) $@
	$(LN) $? $@

includes:: b_index.c

depend:: b_index.c

clean::
	$(RM) b_index.c

jishosub.c:  $(WNNJSERVERSRC)/jishosub.c
	$(RM) $@
	$(LN) $? $@

includes:: jishosub.c

depend:: jishosub.c

clean::
	$(RM) jishosub.c

jmt0.c:  $(WNNJSERVERSRC)/jmt0.c
	$(RM) $@
	$(LN) $? $@

includes:: jmt0.c

depend:: jmt0.c

clean::
	$(RM) jmt0.c

mknode0.c:  $(WNNJSERVERSRC)/mknode0.c
	$(RM) $@
	$(LN) $? $@

includes:: mknode0.c

depend:: mknode0.c

clean::
	$(RM) mknode0.c

mknode1.c:  $(WNNJSERVERSRC)/mknode1.c
	$(RM) $@
	$(LN) $? $@

includes:: mknode1.c

depend:: mknode1.c

clean::
	$(RM) mknode1.c

mknode2.c:  $(WNNJSERVERSRC)/mknode2.c
	$(RM) $@
	$(LN) $? $@

includes:: mknode2.c

depend:: mknode2.c

clean::
	$(RM) mknode2.c

renbn_kai.c:  $(WNNJSERVERSRC)/renbn_kai.c
	$(RM) $@
	$(LN) $? $@

includes:: renbn_kai.c

depend:: renbn_kai.c

clean::
	$(RM) renbn_kai.c

bnsetu_kai.c:  $(WNNJSERVERSRC)/bnsetu_kai.c
	$(RM) $@
	$(LN) $? $@

includes:: bnsetu_kai.c

depend:: bnsetu_kai.c

clean::
	$(RM) bnsetu_kai.c

daibn_kai.c:  $(WNNJSERVERSRC)/daibn_kai.c
	$(RM) $@
	$(LN) $? $@

includes:: daibn_kai.c

depend:: daibn_kai.c

clean::
	$(RM) daibn_kai.c

jikouho.c:  $(WNNJSERVERSRC)/jikouho.c
	$(RM) $@
	$(LN) $? $@

includes:: jikouho.c

depend:: jikouho.c

clean::
	$(RM) jikouho.c

jikouho_d.c:  $(WNNJSERVERSRC)/jikouho_d.c
	$(RM) $@
	$(LN) $? $@

includes:: jikouho_d.c

depend:: jikouho_d.c

clean::
	$(RM) jikouho_d.c

fzk.c:  $(WNNJSERVERSRC)/fzk.c
	$(RM) $@
	$(LN) $? $@

includes:: fzk.c

depend:: fzk.c

clean::
	$(RM) fzk.c

atojis.c:  $(WNNJSERVERSRC)/atojis.c
	$(RM) $@
	$(LN) $? $@

includes:: atojis.c

depend:: atojis.c

clean::
	$(RM) atojis.c

get_kaiarea.c:  $(WNNJSERVERSRC)/get_kaiarea.c
	$(RM) $@
	$(LN) $? $@

includes:: get_kaiarea.c

depend:: get_kaiarea.c

clean::
	$(RM) get_kaiarea.c

snd_rcv.c:  $(WNNJSERVERSRC)/snd_rcv.c
	$(RM) $@
	$(LN) $? $@

includes:: snd_rcv.c

depend:: snd_rcv.c

clean::
	$(RM) snd_rcv.c

do_henkan.c:  $(WNNJSERVERSRC)/do_henkan.c
	$(RM) $@
	$(LN) $? $@

includes:: do_henkan.c

depend:: do_henkan.c

clean::
	$(RM) do_henkan.c

do_henkan1.c:  $(WNNJSERVERSRC)/do_henkan1.c
	$(RM) $@
	$(LN) $? $@

includes:: do_henkan1.c

depend:: do_henkan1.c

clean::
	$(RM) do_henkan1.c

do_env.c:  $(WNNJSERVERSRC)/do_env.c
	$(RM) $@
	$(LN) $? $@

includes:: do_env.c

depend:: do_env.c

clean::
	$(RM) do_env.c

do_hindo_s.c:  $(WNNJSERVERSRC)/do_hindo_s.c
	$(RM) $@
	$(LN) $? $@

includes:: do_hindo_s.c

depend:: do_hindo_s.c

clean::
	$(RM) do_hindo_s.c

initjserv.c:  $(WNNJSERVERSRC)/initjserv.c
	$(RM) $@
	$(LN) $? $@

includes:: initjserv.c

depend:: initjserv.c

clean::
	$(RM) initjserv.c

hinsi_list.c:  $(WNNJSERVERSRC)/hinsi_list.c
	$(RM) $@
	$(LN) $? $@

includes:: hinsi_list.c

depend:: hinsi_list.c

clean::
	$(RM) hinsi_list.c

sisheng.c:  $(WNNJSERVERSRC)/sisheng.c
	$(RM) $@
	$(LN) $? $@

includes:: sisheng.c

depend:: sisheng.c

clean::
	$(RM) sisheng.c

w_string.c:  $(WNNJSERVERSRC)/w_string.c
	$(RM) $@
	$(LN) $? $@

includes:: w_string.c

depend:: w_string.c

clean::
	$(RM) w_string.c

$(OBJ0) : $(SRC0)
	$(CC) -c $(CFLAGS) $(SERVERINITDEF) ./`basename $@ .o`.c

$(OBJ3) : $(SRC3)
	$(CC) -c $(CFLAGS)  $(CWNNJLIBSRC)/`basename $@ .o`.c

$(OBJ4) : $(SRC4)
	$(CC) -c $(CFLAGS)  $(CWNNETCSRC)/`basename $@ .o`.c

$(OBJ5) : $(SRC5)
	$(CC) -c $(CFLAGS)  $(CWNNETCSRC)/`basename $@ .o`.c

$(OBJ6) : $(SRC6)
	$(CC) -c $(CFLAGS)  $(CWNNETCSRC)/`basename $@ .o`.c

$(OBJ7) : $(SRC7)
	$(CC) -c $(CFLAGS)  $(CWNNETCSRC)/`basename $@ .o`.c

$(OBJGETHINSI) : $(SRCGETHINSI)
	$(CC) -c $(CFLAGS) $(HINSIDEFINE) $(CWNNETCSRC)/`basename $@ .o`.c

$(OBJ9) : $(SRC9)
	$(CC) -c $(CFLAGS)  $(CWNNETCSRC)/`basename $@ .o`.c

$(OBJ10) : $(SRC10)
	$(CC) -c $(CFLAGS)  $(CWNNETCSRC)/`basename $@ .o`.c

$(OBJ11) : $(SRC11)
	$(CC) -c $(CFLAGS)  $(CWNNETCSRC)/`basename $@ .o`.c

$(OBJ12) : $(SRC12)
	$(CC) -c $(CFLAGS)  $(CWNNETCSRC)/`basename $@ .o`.c

$(OBJ13) : $(SRC13)
	$(CC) -c $(CFLAGS)  $(CWNNETCSRC)/`basename $@ .o`.c

$(OBJ14) : $(SRC14)
	$(CC) -c $(CFLAGS)  $(CWNNETCSRC)/`basename $@ .o`.c

$(OBJ20) : $(SRC20) $(CWNNINCLUDESRC)/getopt.h
	$(CC) -c $(CFLAGS)  $(CWNNETCSRC)/`basename $@ .o`.c

$(OBJ21) : $(SRC21) $(CWNNINCLUDESRC)/getopt.h
	$(CC) -c $(CFLAGS)  $(CWNNETCSRC)/`basename $@ .o`.c

vasprintf.o : $(WNNETCSRC)/vasprintf.c
	$(CC) -c $(CFLAGS)  $?

mkdir.o : $(WNNETCSRC)/mkdir.c
	$(CC) -c $(CFLAGS)  $?

$(TOBJ0) : $(TSRC0)
	$(CC) -c $(CFLAGS) $(TSERVERINITDEF) $(TWNNLANGDEF) ./`basename $@ .o`.c

$(TOBJGETHINSI) : $(TSRCGETHINSI)
	$(CC) -c $(CFLAGS) $(THINSIDEFINE) $(TWNNLANGDEF) ./`basename $@ .o`.c

depend:: .depend

clean::
	$(RM) $(HDRS) $(SRC0) $(SRC1) $(TSRCS)
