• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# simple make file for the pam_cap module
2
3topdir=$(shell pwd)/..
4include ../Make.Rules
5
6# Note (as the author of much of the Linux-PAM library, I am confident
7# that this next line does *not* require -lpam on it.) If you think it
8# does, *verify that it does*, and if you observe that it fails as
9# written (and you know why it fails), email me and explain why. Thanks!
10LDLIBS += -L../libcap -lcap
11
12all: pam_cap.so
13	$(MAKE) testcompile
14
15install: all
16	mkdir -p -m 0755 $(FAKEROOT)$(LIBDIR)/security
17	install -m 0755 pam_cap.so $(FAKEROOT)$(LIBDIR)/security
18
19pam_cap.so: pam_cap.o
20	$(LD) $(LDFLAGS) -o pam_cap.so $< $(LDLIBS)
21
22pam_cap.o: pam_cap.c
23	$(CC) $(CFLAGS) $(IPATH) -c $< -o $@
24
25testcompile: test.c pam_cap.o
26	$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $+ -lpam -ldl $(LDLIBS)
27
28clean:
29	rm -f *.o *.so testcompile *~
30