summaryrefslogtreecommitdiffabout
path: root/Makefile
blob: e6eb882e86a9a58a1afa0614da66fe41e55f48fd (plain)
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
49
50
51
52
53
54
CFLAGS=-O2 -g
PREFIX=/usr/local
BINDIR=$(PREFIX)/bin
MANDIR=$(PREFIX)/share/man
PACKAGE=alck
VERSION=1.0
DISTFILES=COPYING README Makefile gram.y lex.l $(SRCS) $(INCS) alck.1
SRCS=lex.yy.c y.tab.c alck.c slist.c
OBJS=$(SRCS:.c=.o)
INCS=alck.h y.tab.h

alck: $(OBJS)
	cc $(CFLAGS) -o alck $(OBJS)

y.tab.c y.tab.h: gram.y
	yacc -vtd gram.y

lex.yy.c: lex.l
	lex -d lex.l

lex.yy.o: lex.yy.c y.tab.h

clean:;	rm -f *.o ckaliases

allclean: all
	rm -f lex.yy.c y.tab.[ch]

install-bin: alck
	mkdir -p $(DESTDIR)$(BINDIR)
	cp alck $(DESTDIR)$(BINDIR)

install-man: alck.1
	mkdir -p $(DESTDIR)$(MANDIR)/man1
	cp alck.1 $(DESTDIR)$(MANDIR)/man1

install: install-bin install-man

distdir = $(PACKAGE)-$(VERSION)

distdir: $(DISTFILES)
	rm -rf $(distdir)
	mkdir $(distdir)
	cp $(DISTFILES) $(distdir)

dist: distdir
	tar cfz $(distdir).tar.gz $(distdir)
	rm -rf $(distdir)

distcheck: distdir
	mkdir $(distdir)/_inst; \
	cd $(distdir) || exit 2;\
	make || exit 2; \
	make DESTDIR=`pwd`/_inst install || exit 2
	make dist

Return to:

Send suggestions and report system problems to the System administrator.