#
# @(#)$Id: Makefile,v 1.5 1994/09/28 17:21:20 shin Exp shin $
#
#	@(#)ccf: Chinese Code Conversion Filter
#		 for major Taiwanese and Mainland coding schemes
#		 which also supports
#		 decoding the mixture of HZ and B5E3 7-bit Big5 code
#
#	- by Jing-Shin Chang (shin@hermes.ee.nthu.edu.tw)
#
#	- sources of the conversion functions are CopyRighted by
#		the Institute for Information Industry, Taiwan, R.O.C.
#	- sources of the GB2BIG5 conversion functions are CopyRighted by
#		Yongguang Zhang (ygz@cs.purdue.edu)
#
#	- Please read the copyright statements first.
#
CCFPROG = ccf
CCFSRCS = ccf.c util.c compat.c \
		cnvtcode.c \
		ccvt.c b5encode.c b5decode.c \
		b2g.c b2g_tables.c
CCFOBJS = $(CCFSRCS:.c=.o)
CCFHDRS = ccode.h hzb5.h
#
MANDIR = /usr/man/man1
MANFIL = ./doc/ccf.1
#
MAKE = make
#
CFLAGS = -g
LDFLAGS =			# -Bstatic
ARCH =				# SUN4
MFLAGS = # -DNO_BZERO -DNO_BCOPY	# machine/cc-dependent flags
# CCFCONF= -DCCVT_FILTER	# functional config. flags
#				# default is to serve as a filter (no more used)

all: $(CCFPROG)

# General steps to Makefile
CCF: $(CCFOBJS)
	cc $(LDFLAGS) -o $@ $(CCFOBJS)
	strip $@
	chmod 755 $@
	mv CCF ccf

$(CCFOBJS): $(@:.o=.c) $(CCFHDRS)
	cc $(CFLAGS) $(MFLAGS) $(CCFCONF) -c -o $@ $(@:.o=.c)

# act as a filter

ccf:
	$(MAKE) CCF

#	$(MAKE) CCFCONF='-DCCVT_FILTER' CCF

solaris:
	$(MAKE) MFLAGS='-DNO_BZERO -DNO_BCOPY' CCF

# preserve original interface

clear:
	rm -f $(CCFOBJS)

clean:
	rm -f $(CCFPROG) $(CCFOBJS)

man:
	cp -p $(MANFIL) $(MANDIR)
#
# History:
#
# $Log: Makefile,v $
# Revision 1.1  1994/03/19  15:04:20  shin
# Initial revision
#
