/* $Id: Imakefile,v 1.1.1.1 2002/10/19 08:27:29 aida_s Exp $ */
#include "../Canna.conf"

#ifdef SunArchitecture
CC = /usr/5bin/cc
#endif

#ifdef SYSV386
CC = cc
#endif

#ifdef usemalloc
SYS_LIBRARIES = -lmalloc -lcurses
#else
#ifdef RsArchitecture
SYS_LIBRARIES = -lcurses
#else
#ifdef i386Architecture
SYS_LIBRARIES = -lncurses
#else
SYS_LIBRARIES = -ltermcap -lcurses
#endif
#endif
#endif

CANNAROOT = ..
INCLUDES = -I$(CANNAROOT)/include
DEFINES = -DCANNALIBDIR=\"$(cannaLibDir)\" $(pointerIntegerDef)
OBJS = ccustom.o  parse.o lisp.o lex.o gram.o set.o wcanna.o util.o wiroha.o
SRCS = keydef.h iroha.h canna.h mfdef.h set.h \
		lisp.h symbolname.h \
		ccustom.c parse.c wcanna.c set.c lisp.c util.c \
		lex.l gram.y wiroha.c
TARGET = ccustom

AllTarget($(TARGET))

depend:: gram.h gram.c lex.c
gram.h gram.c:  gram.y iroha.h mfdef.h
	$(YACC) -d gram.y
	mv y.tab.h gram.h
	mv y.tab.c gram.c

lex.c: gram.o lex.l

clean::
	$(RM) y.tab.h y.tab.c lex.yy.c gram.h gram.c lex.c

NormalProgramTarget($(TARGET),$(OBJS),,,$(SYS_LIBRARIES))
InstallProgram($(TARGET),$(cannaBinDir))
InstallManPage($(TARGET),$(cannaManDir))
DependTarget()
LintTarget()
