aboutsummaryrefslogtreecommitdiff
path: root/Makefile
blob: 8b6dec7e31619f7735f7a933d533cb1df56d3b4b (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
PREFIX=/usr/local
PROJECT=addts
VERSION=1.0

# Installation directories:
INSTALLDIR=$(PREFIX)/bin
MANDIR=$(PREFIX)/share/man
MAN1DIR=$(MANDIR)/man1

addts: addts.c
	$(CC) $(CFLAGS) $(CPPFLAGS) -oaddts addts.c

clean:
	rm -f *.o addts

install: addts
	install addts $(DESTDIR)$(INSTALLDIR)
	install addts.1 $(DESTDIR)$(MAN1DIR)

DISTDIR=$(PROJECT)-$(VERSION)
DISTFILES=addts.c addts.1 Makefile 

distdir:
	test -d $(DISTDIR) || mkdir $(DISTDIR)
	cp $(DISTFILES) $(DISTDIR)

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

distcheck: dist
	tar xfz $(DISTDIR).tar.gz
	if $(MAKE) -C $(DISTDIR) $(DISTCHECKFLAGS); then \
	  echo "$(DISTDIR).tar.gz ready for distribution"; \
	  rm -rf $(DISTDIR); \
        else \
          exit 2; \
	fi

Return to:

Send suggestions and report system problems to the System administrator.