--- Makefile.orig 1995-10-05 08:21:32 UTC +++ Makefile @@ -1,6 +1,9 @@ SHELL = /bin/sh SHELL = /bin/sh -CFLAGS = -O -DUNDEFCHAR=0xa1f5 +CC?= cc +CFLAGS?= -O -pipe +CFLAGS+= -DUNDEFCHAR=0xa1f5 +PREFIX?= /usr/local TABLEC = JX0208GB2312.c JX0208GB8565.c JX0212GB2312.c JX0212GB8565.c \ MSSJISGB2312.c MSSJISJX0208.c MSSJISJX0212.c @@ -13,19 +16,20 @@ TABLEO = JX0208GB2312.o JX0208GB8565.o JX0212GB2312.o ./t2c $< $@ .c.o: - cc $(CFLAGS) -c $< + $(CC) $(CFLAGS) -c $< .t.o: ./t2c $< $*.c - cc $(CFLAGS) -c $*.c + $(CC) $(CFLAGS) -c $*.c jis2gb: $(TABLEO) jis2gb.o - cc jis2gb.o $(TABLEO) -o jis2gb - strip jis2gb + $(CC) jis2gb.o $(TABLEO) -o jis2gb +# strip jis2gb install: jis2gb jis2gb.1 - cp jis2gb /usr/local/bin/jis2gb - cp jis2gb.1 /usr/local/man/man1/jis2gb.1 + ${BSD_INSTALL_PROGRAM} jis2gb ${DESTDIR}${PREFIX}/bin/jis2gb + ${BSD_INSTALL_MAN} jis2gb.1 ${DESTDIR}${PREFIX}/share/man/man1/jis2gb.1 + ${BSD_INSTALL_DATA} jis2gb.el ${DESTDIR}${PREFIX}/share/emacs/site-lisp/jis2gb.el # nroff -man jis2gb.1 > /usr/local/catman/C/u_man/cat1/jis2gb.1 clean: @@ -36,7 +40,7 @@ t2c: t2c.c -egrep '0x([2-9]|a[1-b]|f[0-9]|..[2-9])' JX0208GB8565.c JX0212GB8565.c t2c: t2c.c - cc $(CFLAGS) t2c.c -o t2c + $(CC) $(CFLAGS) t2c.c -o t2c strip t2c $(TABLEC): t2c