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
|
# simple make file for the pam_cap module
topdir=$(shell pwd)/..
include ../Make.Rules
CFLAGS := $(filter-out -fPIE,$(CFLAGS))
LDFLAGS := $(filter-out -fPIE,$(filter-out -pie,$(LDFLAGS)))
# Note (as the author of much of the Linux-PAM library, I am confident
# that this next line does *not* require -lpam on it.) If you think it
# does, *verify that it does*, and if you observe that it fails as
# written (and you know why it fails), email me and explain why. Thanks!
LDLIBS += -L../libcap -lcap -lpam
all: pam_cap.so
$(MAKE) testcompile
install: all
mkdir -p -m 0755 $(FAKEROOT)$(LIBDIR)/security
install -m 0755 pam_cap.so $(FAKEROOT)$(LIBDIR)/security
pam_cap.so: pam_cap.o
$(LD) $(LDFLAGS) -o pam_cap.so $< $(LDLIBS)
pam_cap.o: pam_cap.c
$(CC) $(CFLAGS) $(CPPFLAGS) $(IPATH) -c $< -o $@
testcompile: test.c pam_cap.o
$(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o $@ $+ -lpam -ldl $(LDLIBS)
clean:
rm -f *.o *.so testcompile *~
|