X-Git-Url: http://j8takagi.net/cgi-bin/gitweb.cgi?p=YACASL2.git;a=blobdiff_plain;f=Makefile;h=8066daa7e9608e6ebfb9b730af861b470e2f4941;hp=06cf19d4f811f6d407a730fb25d03a4fc4d6c873;hb=3f7c17da3a4728cca94609014f6a29625eb1cb20;hpb=44cde08e6cf148928a219593c78a57abfd89b424 diff --git a/Makefile b/Makefile index 06cf19d..8066daa 100644 --- a/Makefile +++ b/Makefile @@ -1,19 +1,32 @@ -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 +.PHONY: all build clean check doc install uninstall + +all: build + +build: + make -C src + 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