-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathMakefile.in
49 lines (38 loc) · 1.19 KB
/
Makefile.in
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
# Makefile for mstoical
#
# See src/config.h for build options.
VERS= @PACKAGE_VERSION@
META= Makefile
OBJS= kernel.o term.o mem.o hash.o dict.o debug.o string.o signal.o
SRCS= kernel.c term.c dict.c string.c hash.c debug.c mem.c signal.c
PREFIX= @prefix@
NAME = mstoical-$(VERS)
LIBROOT= $(PREFIX)/lib/mstoical
CFLAGS= -c -DVERSION=\"$(VERS)\" -DLIBROOT=\"$(LIBROOT)\" -Wall @CFLAGS@
LIBS= @LIBS@
all: src/.depend
cd src && $(MAKE)
src/.depend:
@echo Generating dependencies
@cd src && $(CC) -MM $(SRCS) > .depend
doc:
@echo Generating documentation
@./mstoical -l lib util/docex src/words.c lib/def doc/words.d
@echo Generating Vim syntax
@mkdir -p vim/syntax
@./mstoical -l lib util/genvim doc/words.d >vim/syntax/mstoical.vim
@cat doc/words.d/* >doc/words; rm -rf doc/words.d
test:
cd $@ && $(MAKE)
install: all doc
install -s mstoical $(PREFIX)/bin
mkdir -p $(LIBROOT); cp -R lib/* $(LIBROOT)
gzip -c doc/mstoical.1 > /usr/share/man/man1/mstoical.1.gz
clean:
rm -f mstoical
cd src && $(MAKE) $@
distclean: clean
rm -f Makefile src/Makefile config.cache config.h config.log
echo -e 'all:\n%:\n\t./configure && $(MAKE) $$@' > Makefile
.PHONY: doc test clean
.EXPORT_ALL_VARIABLES: