ECHO ?= echo
INSTALL ?= install
SED ?= sed
+CAT ?= cat
prefix ?= ~
bindir ?= $(prefix)/bin
-casl2libdir ?= $(prefix)/yacasl2/casl2lib
+casl2libdir ?= $(prefix)/lib/casl2
VERSIONFILES = include/package.h test/system/casl2/opt_v/0.txt test/system/comet2/opt_v/0.txt test/system/dumpword/opt_v/0.txt
all: build info html gtags
-build: version
+build:
$(MAKE) -C src all
gtags:
uninstall-casl2lib:
@$(MAKE) -C as/casl2lib uninstall-casl2lib
-version: $(VERSIONFILES)
+version: VERSION $(VERSIONFILES)
+ @$(ECHO) "YACASL2 Version:" `$(CAT) VERSION`
-$(VERSIONFILES):
- for f in $(VERSIONFILES); do $(SED) -e "s/@@VERSION@@/`cat VERSION`/g" $$f.version >$$f; done
+$(VERSIONFILES): VERSION
+ $(SED) -e "s/@@VERSION@@/`cat VERSION`/g" $@.version >$@
clean: clean-src clean-gtags clean-doc clean-doc-inner clean-version
ASSRC := assemble.c token.c label.c
EXECSRC := exec.c dump.c
-.PHONY: all clean
+.PHONY: all version clean
-all: ../casl2 ../comet2 ../dumpword ctags etags
+all: version ../casl2 ../comet2 ../dumpword ctags etags
+
+version:
+ $(MAKE) -C .. version
../casl2: casl2.o $(subst .c,.o,$(COMMONSRC) $(CASL2SRC) $(ASSRC) $(EXECSRC))
$(CC) $(CFLAGS) -o $@ $^
-Usage: ../../../../casl2 [-slLaAtTdh] [-oO[<OBJECTFILE>]] [-M <MEMORYSIZE>] [-C <CLOCKS>] FILE1[ FILE2 ...]
+Usage: ../../../../casl2 [-slLaAtTdvh] [-oO[<OBJECTFILE>]] [-M <MEMORYSIZE>] [-C <CLOCKS>] FILE1[ FILE2 ...]
-Usage: ../../../../casl2 [-slLaAtTdh] [-oO[<OBJECTFILE>]] [-M <MEMORYSIZE>] [-C <CLOCKS>] FILE1[ FILE2 ...]
+Usage: ../../../../casl2 [-slLaAtTdvh] [-oO[<OBJECTFILE>]] [-M <MEMORYSIZE>] [-C <CLOCKS>] FILE1[ FILE2 ...]
--- /dev/null
+casl2 of YACASL2 version 0.2p2
-Usage: ../../../../comet2 [-tTdh] [-M <MEMORYSIZE>] [-C <CLOCKS>] FILE
+Usage: ../../../../comet2 [-tTdvh] [-M <MEMORYSIZE>] [-C <CLOCKS>] FILE
-Usage: ../../../../comet2 [-tTdh] [-M <MEMORYSIZE>] [-C <CLOCKS>] FILE
+Usage: ../../../../comet2 [-tTdvh] [-M <MEMORYSIZE>] [-C <CLOCKS>] FILE
--- /dev/null
+comet2 of YACASL2 version 0.2p2
--- /dev/null
+dumpword of YACASL2 version 0.2p2