ver = 1.3.1-jshin
PRG = hpscat
OBJ = hpscat.o fillbuf.o init.o misc.o ps.o showbuf.o ps_idx.o user.o paper.o
SRC = $(OBJ:.o=.c)

# define if you have a hangul PS printer 
#DHPS = -DHPS 
DHPS =
# define if you know in advance Hangul fonts available to you
# and add names of Hangul fonts  in hpscat.h and hpscat.c
DADVHF = -DADV_HFONT
#DADVHF = 
# define if you want to make the default paper size US letter instead of A4
DUS = -DUS_VERSION
#DUS =
CFLAGS = -O $(DHPS) $(DADVHF) $(DUS)
LDFLAGS = -s

$(PRG): $(OBJ)
	$(CC) $(LDFLAGS) -o $@ $(OBJ)

clean:
	rm -f $(OBJ)

dist: $(SRC)
	tar cf - $(SRC) hpscat.h ps.h paper.h Makefile README | gzip > hpscat-${ver}.tar.z

fillbuf.o: hpscat.h paper.h
hpscat.o: hpscat.h paper.h
init.o: hpscat.h paper.h
misc.o: hpscat.h paper.h
ps.o: hpscat.h paper.h
paper.o: paper.h hpscat.h
showbuf.o: hpscat.h ps.h paper.h
user.o: hpscat.h paper.h
