X-Git-Url: http://j8takagi.net/cgi-bin/gitweb.cgi?p=YACASL2.git;a=blobdiff_plain;f=Makefile;h=c5e491ed4deb97f94490356bea12a359a5bbf3e5;hp=06cf19d4f811f6d407a730fb25d03a4fc4d6c873;hb=e72664a66c5c05ca8e0a71e5aa625a31c27f6032;hpb=1e636c95bf237645b6c9117e3eb64aa2d8aa4c90 diff --git a/Makefile b/Makefile index 06cf19d..c5e491e 100644 --- a/Makefile +++ b/Makefile @@ -1,19 +1,27 @@ -INSTALLDIR = /usr/local/bin -.PHPNY: all clean check install uninstall -all: - make -C src ../casl2 ../comet2 +ifndef prefix + prefix = $(HOME) +endif +CLEANDIR = src test/integration test/unit as/casl2lib +.PHPNY: all build clean check doc casl2lib install uninstall +all: build casl2lib +build: + make -C src +casl2lib: + @make -C as/casl2lib check: - make -C test/astest + @make -sC test/integration +doc: + @make -sC doc clean: - make -C src clean - make -C test/astest clean - make -C test/utest clean -install: casl2 comet2 - @if test -d $(INSTALLDIR); then \ - install -s ./casl2 $(INSTALLDIR)/casl2; \ - install -s ./comet2 $(INSTALLDIR)/comet2; \ + @for target in $(CLEANDIR); do $(MAKE) -sC $$target clean; done; \ + rm -f casl2 comet2 dumpword +install: all + @if test -d $(prefix); then \ + install -s ./casl2 $(prefix)/casl2; \ + install -s ./comet2 $(prefix)/comet2; \ + install -s ./dumpword $(prefix)/dumpword; \ fi uninstall: - @if test -d $(INSTALLDIR); then \ - rm -f $(INSTALLDIR)/casl2 $(INSTALLDIR)/comet2; \ + @if test -d $(prefix); then \ + rm -f $(prefix)/casl2 $(prefix)/comet2 $(prefix)/dumpword; \ fi