]> granicus.if.org Git - linux-pam/blob - examples/Makefile
Relevant BUGIDs: 111927, 117240
[linux-pam] / examples / Makefile
1 #
2 # $Id$
3 #
4
5 include ../Make.Rules
6
7 PROGS = blank xsh check_user
8 SRCS = blank.c xsh.c check_user.c
9 PROGSUID =
10
11 CFLAGS += -I../libpam_misc/inlcude -I../libpamc/include
12
13 LOADLIBES = -L../libpam -L../libpamc -L../libpam_misc -lpam -lpam_misc
14
15 all: $(PROGS)
16
17 check_user: check_user.o
18         $(CC) $(CFLAGS) -o $@ $< $(LOADLIBES)
19
20 blank: blank.o
21         $(CC) $(CFLAGS) -o $@ $< $(LOADLIBES)
22
23 xsh: xsh.o
24         $(CC) $(CFLAGS) -o $@ $< $(LOADLIBES)
25
26 clean:
27         rm -f *.a *.so *.o *~ $(PROGS) $(PROGSUID)
28         rm -f *.a *.out *.o *.so
29
30 # note, the programs are test programs, they should not be
31 # installed on your system!
32
33 install: all
34         if [ -n "$(PROGS)" ]; then cp $(PROGS) ../bin ; fi
35         if [ -n "$(PROGSUID)" ]; then \
36                 $(INSTALL) -m 4555 $(PROGSUID) ../bin ; fi
37
38 remove:
39         cd ../bin ; rm -f $(PROGS) $(PROGSUID)
40         for x in $(PROGS) $(PROGSUID) ; do rm -f ../bin/$$x ; done