File: Makefile

package info (click to toggle)
pam-shield 0.9.2-3.3~squeeze1
  • links: PTS
  • area: main
  • in suites: squeeze
  • size: 216 kB
  • ctags: 113
  • sloc: ansic: 988; sh: 461; makefile: 102
file content (61 lines) | stat: -rw-r--r-- 1,324 bytes parent folder | download | duplicates (3)
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
#
#	pam_shield	WJ106
#

bindir=/usr/sbin
confdir=/etc/security
pamdir=/lib/security
crondir=/etc/cron.daily

CC = gcc
LD = ld
RM = rm -f
MKDIR = mkdir
INSTALL = install

CFLAGS = -Wall -Wstrict-prototypes -fPIC
LFLAGS = -shared -Xlinker -x
PAM_LIB = -lpam
GDBM_LIB = -lgdbm
LIBS =

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

all: .depend pam_shield.so shield-purge

include .depend

pam_shield.so: pam_shield.o
	$(CC) $(LFLAGS) -o pam_shield.so pam_shield.o $(PAM_LIB) $(GDBM_LIB) $(LIBS)

shield-purge: shield_purge.o
	$(CC) shield_purge.o -o shield-purge $(GDBM_LIB) $(LIBS)

clean:
	$(RM) core pam_shield.so pam_shield.o shield_purge.o shield-purge

mrproper: clean
	$(RM) db
	> .depend

dep depend .depend:
	$(CC) -M pam_shield.c shield_purge.c > .depend

install: all
	$(INSTALL) -s -o root -g root -m 644 pam_shield.so ${pamdir}
	$(INSTALL) -o root -g root -m 755 -T pam_shield.cron ${crondir}/pam-shield
	$(INSTALL) -o root -g root -m 755 shield-trigger.sh ${bindir}
	$(INSTALL) -s -o root -g root -m 755 shield-purge ${bindir}
	$(INSTALL) -o root -g root -m 644 shield.conf ${confdir}
	$(MKDIR) -p -m 700 /var/lib/pam_shield

uninstall:
	$(RM) ${pamdir}/pam_shield.so
	$(RM) ${crondir}/pam-shield
	$(RM) ${bindir}/shield-trigger.sh
	$(RM) ${bindir}/shield-purge
	$(RM) ${confdir}/shield.conf
	$(RM) -r /var/lib/pam_shield

# EOB