File: Makefile

package info (click to toggle)
renattach 1.1.1-3
  • links: PTS
  • area: main
  • in suites: woody
  • size: 144 kB
  • ctags: 45
  • sloc: ansic: 694; sh: 209; makefile: 62
file content (25 lines) | stat: -rw-r--r-- 659 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
BINDIR=/${prefix}/usr/sbin
CONFDIR=/${prefix}/etc
CC=gcc
CFLAGS=-Wall -O2

renattach : renattach.o settings.o
	$(CC) $(CFLAGS) -o renattach renattach.o settings.o

clean:
	rm -f renattach
	rm -f *.o

install: renattach
	@if [ ! -r $(BINDIR) ] ; then mkdir -p $(BINDIR) ; fi
	@if [ ! -r $(CONFDIR) ] ; then mkdir -p $(CONFDIR) ; fi
	./install.sh renattach $(BINDIR) -s -m 755
	@if [ -r $(CONFDIR)/renattach.conf ] ; \
		then echo "Not replacing existing .conf file" ; \
		else ./install.sh renattach.conf $(CONFDIR) -m 644 ; \
		echo "./install.sh renattach.conf $(CONFDIR) -m 644" ; fi

uninstall:
	rm -f $(BINDIR)/renattach
	rm -i $(CONFDIR)/renattach.conf