File: Makefile

package info (click to toggle)
xtell 2.9
  • links: PTS
  • area: main
  • in suites: woody
  • size: 188 kB
  • ctags: 73
  • sloc: ansic: 982; sh: 117; makefile: 78; python: 22
file content (70 lines) | stat: -rw-r--r-- 1,484 bytes parent folder | download | duplicates (6)
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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
DESTDIR =
BINDIR=$(DESTDIR)/usr/bin
SBINDIR=$(DESTDIR)/usr/sbin
MANDIR=$(DESTDIR)/usr/man

CC = gcc 

CFLAGS = -g -Wall 
# -Wsurprising

#if you have GNU libreadline and libident.so, you can use it:
#LDFLAGS = -lreadline -lident

#use the following line in case you have only libident.a, not shared 
#library (or you want to link staticly against libident)
LDFLAGS = -lreadline /usr/lib/libident.a

#LDFLAGS should stay empty if you do not have libident and GNU libreadline at all
#LDFLAGS =

#SunOS needs following:
#LDFLAGS = -lreadline -lcurses -lsocket -lnsl

#some OSes (e.g. OpenBSD) need -lcurses as well if you are using readline

#for QNX:
#LDFLAGS = -lsocket



all: xtell xtelld

xtelld: xtelld.o daemon.o child.o tty.o common.o
	$(CC) $(CFLAGS) xtelld.o daemon.o child.o tty.o common.o $(LDFLAGS) -o xtelld
#	strip xtelld

xtell: xtell.o common.o
	$(CC) $(CFLAGS) xtell.o common.o $(LDFLAGS) -o xtell

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

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

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

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

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

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

clean:
	rm -f *~ *.o xtell xtelld

install: xtelld xtell
	cp xtelld $(SBINDIR)
	cp xtell $(BINDIR)

install-doc: 
	mkdir -p $(MANDIR)/man1 $(MANDIR)/man8
	mkdir -p $(MANDIR)/man1 $(MANDIR)/man1
	gzip -9 xtell.1 -c >$(MANDIR)/man1/xtell.1.gz
	gzip -9 xtelld.8 -c >$(MANDIR)/man8/xtelld.8.gz