]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - contrib/libpam/modules/pam_warn/Makefile
Initial import of virgin Linux-PAM 0.65, slightly stripped down.
[FreeBSD/FreeBSD.git] / contrib / libpam / modules / pam_warn / Makefile
1 #
2 # $Id: Makefile,v 1.2 1997/04/05 06:20:16 morgan Exp $
3 #
4 # This Makefile controls a build process of $(TITLE) module for
5 # Linux-PAM. You should not modify this Makefile (unless you know
6 # what you are doing!).
7 #
8 # $Log: Makefile,v $
9 # Revision 1.2  1997/04/05 06:20:16  morgan
10 # fixed fakeroot
11 #
12 # Revision 1.1  1996/12/01 03:12:22  morgan
13 # Initial revision
14 #
15 #
16 # Created by Andrew Morgan <morgan@parc.power.net> 1996/11/14
17 #
18
19 TITLE=pam_warn
20
21 #
22
23 LIBSRC = $(TITLE).c
24 LIBOBJ = $(TITLE).o
25 LIBOBJD = $(addprefix dynamic/,$(LIBOBJ))
26 LIBOBJS = $(addprefix static/,$(LIBOBJ))
27
28 dynamic/%.o : %.c
29         $(CC) $(CFLAGS) $(DYNAMIC) $(CPPFLAGS) $(TARGET_ARCH) -c $< -o $@
30
31 static/%.o : %.c
32         $(CC) $(CFLAGS) $(STATIC) $(CPPFLAGS) $(TARGET_ARCH) -c $< -o $@
33
34
35 ifdef DYNAMIC
36 LIBSHARED = $(TITLE).so
37 endif
38
39 ifdef STATIC
40 LIBSTATIC = lib$(TITLE).o
41 endif
42
43 ####################### don't edit below #######################
44
45 dummy:
46
47         @echo "**** This is not a top-level Makefile "
48         exit
49
50 all: dirs $(LIBSHARED) $(LIBSTATIC) register
51
52 dirs:
53 ifdef DYNAMIC
54         $(MKDIR) ./dynamic
55 endif
56 ifdef STATIC
57         $(MKDIR) ./static
58 endif
59
60 register:
61 ifdef STATIC
62         ( cd .. ; ./register_static $(TITLE) $(TITLE)/$(LIBSTATIC) )
63 endif
64
65 ifdef DYNAMIC
66 $(LIBOBJD): $(LIBSRC)
67
68 $(LIBSHARED):   $(LIBOBJD)
69         $(LD_D) -o $@ $(LIBOBJD)
70 endif
71
72 ifdef STATIC
73 $(LIBOBJS): $(LIBSRC)
74
75 $(LIBSTATIC): $(LIBOBJS)
76         $(LD) -r -o $@ $(LIBOBJS)
77 endif
78
79 install: all
80         $(MKDIR) $(FAKEROOT)$(SECUREDIR)
81 ifdef DYNAMIC
82         $(INSTALL) -m $(SHLIBMODE) $(LIBSHARED) $(FAKEROOT)$(SECUREDIR)
83 endif
84
85 remove:
86         rm -f $(FAKEROOT)$(SECUREDIR)/$(TITLE).so
87
88 clean:
89         rm -f $(LIBOBJD) $(LIBOBJS) core *~
90
91 extraclean: clean
92         rm -f *.a *.o *.so *.bak dynamic/* static/*
93
94 .c.o:   
95         $(CC) $(CFLAGS) -c $<
96