-CFLAGS = -g -O -Wall
+SHELL = /bin/sh
-INSTALLBINDIR = ../bin
+CFLAGS = -g -O2 -Wall
+
+LOCALBINDIR = ../bin
+
+VPATH = . $(LOCALBINDIR)
#
# $(PREFIX) is defined in top-level directory, so don't do a
# The programs johab2ucs2, unifontchojung, and unifontksx are
# only used for generation of Hangul syllables.
#
-PPROGS = bdfimplode hex2bdf hex2sfd hexbraille hexdraw hexmerge \
- johab2ucs2 unifontchojung unifontksx
+PPROGS = bdfimplode hex2bdf hex2sfd hexbraille hexdraw hexkinya hexmerge \
+ johab2ucs2 unifontchojung unifontksx unihex2png unihexfill \
+ unipng2hex unifont-viewer
PROGS = $(CPROGS) $(PPROGS)
-all: $(CPROGS)
- install -m0755 -d $(INSTALLBINDIR)
- install -s -m0755 $(CPROGS) $(INSTALLBINDIR)
- install -m0755 $(PPROGS) $(INSTALLBINDIR)
+all: $(CPROGS) bin
+
+.c:
+
+bin: bin-stamp
+
+bin-stamp: $(CPROGS) $(PPROGS) $(PNGPROGS)
+ install -m0755 -d $(LOCALBINDIR)
+# install -m0755 $? $(LOCALBINDIR)
+ install -s -m0755 $(CPROGS) $(LOCALBINDIR)
+ install -m0755 $(PPROGS) $(LOCALBINDIR)
\rm -f $(CPROGS)
+ touch $@
install:
if [ x$(PREFIX) = x ] ; \
then \
- echo "Fatal error: PREFIX directory is not defined." ; \
- echo "Run 'make install' from top-level directory" ; \
+ echo "Fatal error: PREFIX directory is not defined." && \
+ echo "Run 'make install' from top-level directory" && \
exit 1 ; \
fi
install -m0755 -d $(INSTALLDIR)
- set -e ; \
- cd $(INSTALLBINDIR) ; \
+ set -e && \
+ cd $(LOCALBINDIR) && \
install -s -m0755 $(CPROGS) $(INSTALLDIR)
- set -e ; \
- cd ../bin ; \
+ set -e && \
+ cd ../bin && \
install -m0755 $(PPROGS) $(INSTALLDIR)
#
# The *.dSYM is for Mac OS X.
#
clean:
- \rm -f $(CPROGS)
+ \rm -f $(CPROGS) *.o
+ \rm -f *~
\rm -f *.exe
\rm -rf *.dSYM
distclean: clean
+ \rm -f bin-stamp *~
-.PHONY: all install clean distclean
+.PHONY: all bin install clean distclean