summaryrefslogtreecommitdiffabout
path: root/Makefile
blob: 5651d9315126d61376e89c29b622a0eba38589e6 (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
CFLAGS=-ggdb -Wall
PREFIX=/usr/local
BINDIR=$(PREFIX)/bin
MANDIR=$(PREFIX)/share/man
PACKAGE=upev
VERSION=1.0
DISTFILES=Makefile dircond.c dlist.c

dircond: dircond.c dlist.c
	cc -odircond $(CFLAGS) dircond.c

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

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

install: install-bin install-man

distdir = $(PACKAGE)-$(VERSION)

distdir:
	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
	(cd $(distdir)/_inst; find . -type f)|sort|cut -c2- | \
           cmp - instlist
	make dist

clean:
	rm -f dircond

Return to:

Send suggestions and report system problems to the System administrator.