Home | History | Annotate | Download | only in pam_cap
      1 # simple make file for the pam_cap module
      2 
      3 topdir=$(shell pwd)/..
      4 include ../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!
     10 LDLIBS += -L../libcap -lcap
     11 
     12 all: pam_cap.so
     13 	$(MAKE) testcompile
     14 
     15 install: all
     16 	mkdir -p -m 0755 $(FAKEROOT)$(LIBDIR)/security
     17 	install -m 0755 pam_cap.so $(FAKEROOT)$(LIBDIR)/security
     18 
     19 pam_cap.so: pam_cap.o
     20 	$(LD) $(LDFLAGS) -o pam_cap.so $< $(LDLIBS)
     21 
     22 pam_cap.o: pam_cap.c
     23 	$(CC) $(CFLAGS) $(IPATH) -c $< -o $@
     24 
     25 testcompile: test.c pam_cap.o
     26 	$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $+ -lpam -ldl $(LDLIBS)
     27 
     28 clean:
     29 	rm -f *.o *.so testcompile *~
     30