#
# Makefile
#
# Engdic Makefile
#
# Author: Oh Junseon <hollywar@mail.holywar.net>
# Date  : $Date: 1999/09/06 02:48:50 $ 
#
# $Revision: 1.6 $
#
# Targets:
#   make all .......... Create ${PROG} [* default *]
#   make install ...... Install ${PROG} to ${DESTDIR}
#   make clean ........ Clean working files (e.g., .o)
#   make clobber ...... Cleanup (clean + ${PROG})
#
# Folowing targets are only for developers
#   make update ....... CVS update (Repository -> current directory)
#   make commit ....... CVS commit (current directory -> Repository)
#

PROG	= engdic
DATA	= data/*.dic.gz

# If you want to show only default color , remove "-DANSI_COLOR"
LDADD= -lz -ltermcap
CFLAGS += -DANSI_COLOR -DLINT -DTERMIOS
DESTDIR	= /usr/local/bin/
DATA_DESTDIR = /usr/local/share/engdic/
RM = rm -f *.o 
CC = gcc

all: engdic

engdic.o: engdic.c engdic.h
	$(CC) -c engdic.c $(CFLAGS)

screen.o: screen.c engdic.h
	$(CC) -c screen.c $(CFLAGS)

engdic: engdic.o screen.o
	@echo; echo Linking english dictionary main file.
	$(CC) -o engdic engdic.o screen.o $(CFLAGS) $(LDADD)

install: all
	strip ${PROG}
	install -d ${DESTDIR}
	install -d ${DATA_DESTDIR}
	install -c -m 755 ${PROG} ${DESTDIR}
	install -c -m 644 ${DATA} ${DATA_DESTDIR}
	ln -sf ${DESTDIR}${PROG} ${DESTDIR}edic

clean:
	${RM}

clobber: clean
	${RM} ${PROG}

#
# Developer only targets
#

update: clobber
	cvs update

commit: clobber
	cvs commit

#
# $Id: Makefile,v 1.6 1999/09/06 02:48:50 hollywar Exp $
#
# Local Variables:
# mode: makefile
# mode: font-lock
# version-control: t
# delete-old-versions: t
# End:
#
# -*- End-Of-File -*-
