File: Makefile

package info (click to toggle)
ttysnoop 0.12d-1
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 88 kB
  • ctags: 66
  • sloc: ansic: 608; makefile: 75
file content (51 lines) | stat: -rw-r--r-- 1,081 bytes parent folder | download | duplicates (7)
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
#
# Makefile for the ttysnoop programs
#

CC	= gcc

# Without shadow support

#CCOPTS	= -O2
#LIBS	= -lcrypt # remove -lcrypt if your system doesn't have it

# For shadow support

CCOPTS	= -O2 -DSHADOW_PWD
LIBS	= -lcrypt

SERVEROBJS	= ttysnoops.o common.o logwtmp.o
CLIENTOBJS	= ttysnoop.o common.o
SERVERSRCS	= ttysnoops.c
CLIENTSRCS	= ttysnoop.c
INCLUDES	= config.h common.h

all:		ttysnoops ttysnoop

ttysnoops:	$(SERVEROBJS)
		$(CC) $(SERVEROBJS) -o ttysnoops $(LIBS)

ttysnoop:	$(CLIENTOBJS)
		$(CC) $(CLIENTOBJS) -o ttysnoop $(LIBS)

ttysnoops.o:	$(SERVERSRCS) $(INCLUDES)
		$(CC) $(CCOPTS) -c -o ttysnoops.o $(SERVERSRCS)

ttysnoop.o:	$(CLIENTSRCS) $(INCLUDES)
		$(CC) $(CCOPTS) -c -o ttysnoop.o $(CLIENTSRCS)

common.o:	common.c common.h
		$(CC) $(CCOPTS) -c -o common.o common.c

logwtmp.o:	common.c common.h
		$(CC) $(CCOPTS) -c -o logwtmp.o logwtmp.c

clean:
		rm -f *.o core ttysnoop ttysnoops

install:
		install -s ttysnoop /sbin
		install -s ttysnoops /sbin
		install -m 644 ttysnoop.8 /usr/man/man8/
		@echo ... copy snooptab.dist to /etc/snooptab and edit it ...