summaryrefslogtreecommitdiffabout
path: root/Makefile
Unidiff
Diffstat (limited to 'Makefile') (more/less context) (ignore whitespace changes)
-rw-r--r--Makefile49
1 files changed, 45 insertions, 4 deletions
diff --git a/Makefile b/Makefile
index 00f7ea0..e6eb882 100644
--- a/Makefile
+++ b/Makefile
@@ -1,6 +1,16 @@
1CFLAGS=-ggdb 1CFLAGS=-O2 -g
2alck: lex.yy.o y.tab.o alck.o slist.o 2PREFIX=/usr/local
3 cc -ggdb -o $@ $^ 3BINDIR=$(PREFIX)/bin
4MANDIR=$(PREFIX)/share/man
5PACKAGE=alck
6VERSION=1.0
7DISTFILES=COPYING README Makefile gram.y lex.l $(SRCS) $(INCS) alck.1
8SRCS=lex.yy.c y.tab.c alck.c slist.c
9OBJS=$(SRCS:.c=.o)
10INCS=alck.h y.tab.h
11
12alck: $(OBJS)
13 cc $(CFLAGS) -o alck $(OBJS)
4 14
5y.tab.c y.tab.h: gram.y 15y.tab.c y.tab.h: gram.y
6 yacc -vtd gram.y 16 yacc -vtd gram.y
@@ -10,4 +20,35 @@ lex.yy.c: lex.l
10 20
11lex.yy.o: lex.yy.c y.tab.h 21lex.yy.o: lex.yy.c y.tab.h
12 22
13 clean:;rm -rf *.o ckaliases \ No newline at end of file 23 clean:;rm -f *.o ckaliases
24
25allclean: all
26 rm -f lex.yy.c y.tab.[ch]
27
28install-bin: alck
29 mkdir -p $(DESTDIR)$(BINDIR)
30 cp alck $(DESTDIR)$(BINDIR)
31
32install-man: alck.1
33 mkdir -p $(DESTDIR)$(MANDIR)/man1
34 cp alck.1 $(DESTDIR)$(MANDIR)/man1
35
36install: install-bin install-man
37
38distdir = $(PACKAGE)-$(VERSION)
39
40distdir: $(DISTFILES)
41 rm -rf $(distdir)
42 mkdir $(distdir)
43 cp $(DISTFILES) $(distdir)
44
45dist: distdir
46 tar cfz $(distdir).tar.gz $(distdir)
47 rm -rf $(distdir)
48
49distcheck: distdir
50 mkdir $(distdir)/_inst; \
51 cd $(distdir) || exit 2;\
52 make || exit 2; \
53 make DESTDIR=`pwd`/_inst install || exit 2
54 make dist

Return to:

Send suggestions and report system problems to the System administrator.