# Makefile for GB2PS
# CFONT -- the absolute path of Chinese font files (ie. if the font files are in
#	   /home/william/gb2ps, then CFONT=/home/william/gb2ps/ )
# 	-- default is current directory 
# COVERPAGE -- the absolute path and name of coverpage PS file
# 	    -- default is current directory 

CFONT=./

COVERPAGE=./cover.ps

CFLAGS	= -DCFONT=\"${CFONT}\" -DCOVERPAGE=\"${COVERPAGE}\"
     
all: gb2ps

gb2ps:gbmain.o gbchar.o gbinit.o gbpage.o cover.o
	cc ${CFLAGS} -o gb2ps gbmain.o gbchar.o gbinit.o \
			gbpage.o cover.o
    
cover.o:cover.c  Makefile
	cc ${CFLAGS} -c cover.c

gbmain.o: gbmain.c Makefile
	cc ${CFLAGS} -c gbmain.c
gbchar.o: gbchar.c Makefile
	cc ${CFLAGS} -c gbchar.c
gbinit.o: gbinit.c Makefile
	cc ${CFLAGS} -c gbinit.c
gbpage.o: gbpage.c Makefile
	cc ${CFLAGS} -c gbpage.c
gbpost.o: gbpost.c Makefile
	cc ${CFLAGS} -c gbpost.c

clean:
	rm -f *.o core gb2ps plib2ccf
