File: Makefile

package info (click to toggle)
mt-st 0.8-1
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 196 kB
  • ctags: 424
  • sloc: ansic: 1,860; makefile: 93; sh: 39
file content (36 lines) | stat: -rw-r--r-- 871 bytes parent folder | download
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
INSTALL= install
INSTALL_MAN=$(INSTALL) -c -m 444
INSTALL_BIN=$(INSTALL) $(INSTALL_STRIP_OPT)
INSTALL_STRIP_OPT=
CFLAGS=  -Wall -O2
SBINDIR= /sbin
BINDIR=  /bin
MANDIR= /usr/share/man

all:	mt stinit

mt:	mt.c
	$(CC) $(CFLAGS) -o mt mt.c

stinit:	stinit.c
	$(CC) $(CFLAGS) -o stinit stinit.c

install: mt stinit
	$(INSTALL_BIN) mt $(BINDIR)
	$(INSTALL_MAN) mt.1 $(MANDIR)/man1
	(if [ -f $(MANDIR)/man1/mt.1.gz ] ; then \
	  rm -f $(MANDIR)/man1/mt.1.gz; gzip $(MANDIR)/man1/mt.1; fi)
	$(INSTALL_BIN) stinit $(SBINDIR)
	$(INSTALL_MAN) stinit.8 $(MANDIR)/man8
	(if [ -f $(MANDIR)/man8/stinit.8.gz ] ; then \
	  rm -f $(MANDIR)/man8/stinit.8.gz; gzip $(MANDIR)/man8/stinit.8; fi)

install-strip:
	@$(MAKE) install INSTALL_STRIP_OPT=-s

dist:	clean
	(mydir=`basename \`pwd\``;\
	cd .. && tar cvvf - $$mydir | gzip -9 > $${mydir}.tar.gz)

clean:
	rm -f *~ \#*\# *.o mt stinit