Add the DragonFly cvs id and perform general cleanups on cvs/rcs/sccs ids. Most
[dragonfly.git] / contrib / libpam / modules / pam_deny / Makefile
1 #
2 # $Id: Makefile,v 1.7 1997/04/05 06:43:41 morgan Exp morgan $
3 # $FreeBSD: src/contrib/libpam/modules/pam_deny/Makefile,v 1.3.4.2 2001/06/11 15:28:17 markm Exp $
4 # $DragonFly: src/contrib/libpam/modules/pam_deny/Attic/Makefile,v 1.2 2003/06/17 04:24:03 dillon Exp $
5 #
6 # This Makefile controls a build process of $(TITLE) module for
7 # Linux-PAM. You should not modify this Makefile (unless you know
8 # what you are doing!).
9 #
10 # $Log: Makefile,v $
11 # Revision 1.7  1997/04/05 06:43:41  morgan
12 # full-source-tree and fakeroot
13 #
14 # Revision 1.6  1997/02/15 19:04:27  morgan
15 # fixed email
16 #
17 # Revision 1.5  1996/11/10 20:11:48  morgan
18 # crossplatform support
19 #
20 # Revision 1.4  1996/09/05 06:50:12  morgan
21 # ld --> gcc
22 #
23 # Revision 1.3  1996/05/26 15:48:38  morgan
24 # make dynamic and static dirs
25 #
26 # Revision 1.2  1996/05/26 04:00:16  morgan
27 # changes for automated static/dynamic modules
28 #
29 # Revision 1.1  1996/03/16 17:47:36  morgan
30 # Initial revision
31 #
32 #
33 # Created by Andrew Morgan <morgan@parc.power.net> 1996/3/11
34 #
35
36 # Convenient defaults for compiling independently of the full source
37 # tree.
38 ifndef FULL_LINUX_PAM_SOURCE_TREE
39 export DYNAMIC=-DPAM_DYNAMIC
40 export CC=gcc
41 export CFLAGS=-O2 -Dlinux -DLINUX_PAM \
42        -ansi -D_POSIX_SOURCE -Wall -Wwrite-strings \
43        -Wpointer-arith -Wcast-qual -Wcast-align -Wtraditional \
44        -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs -Winline \
45        -Wshadow -pedantic -fPIC
46 export MKDIR=mkdir -p
47 export LD_D=gcc -shared -Xlinker -x
48 endif
49
50 #
51
52 TITLE=pam_deny
53
54 #
55
56 LIBSRC = $(TITLE).c
57 LIBOBJ = $(TITLE).o
58 LIBOBJD = $(addprefix dynamic/,$(LIBOBJ))
59 LIBOBJS = $(addprefix static/,$(LIBOBJ))
60
61 dynamic/%.o : %.c
62         $(CC) $(CFLAGS) $(DYNAMIC) $(CPPFLAGS) $(TARGET_ARCH) -c $< -o $@
63
64 static/%.o : %.c
65         $(CC) $(CFLAGS) $(STATIC) $(CPPFLAGS) $(TARGET_ARCH) -c $< -o $@
66
67
68 ifdef DYNAMIC
69 LIBSHARED = $(TITLE).so
70 endif
71 ifdef STATIC
72 LIBSTATIC = lib$(TITLE).o
73 endif
74
75 ####################### don't edit below #######################
76
77 dummy:
78         @echo "**** This is not a top-level Makefile "
79         exit
80
81 all: dirs $(LIBSHARED) $(LIBSTATIC) register
82
83 dirs:
84 ifdef DYNAMIC
85         $(MKDIR) ./dynamic
86 endif
87 ifdef STATIC
88         $(MKDIR) ./static
89 endif
90
91 register:
92 ifdef STATIC
93         ( cd .. ; ./register_static $(TITLE) $(TITLE)/$(LIBSTATIC) )
94 endif
95
96 ifdef DYNAMIC
97 $(LIBOBJD): $(LIBSRC)
98
99 $(LIBSHARED):   $(LIBOBJD)
100                 $(LD_D) -o $@ $(LIBOBJD)
101 endif
102
103 ifdef STATIC
104 $(LIBOBJS): $(LIBSRC)
105
106 $(LIBSTATIC): $(LIBOBJS)
107         $(LD) -r -o $@ $(LIBOBJS)
108 endif
109
110 install: all
111         $(MKDIR) $(FAKEROOT)$(SECUREDIR)
112 ifdef DYNAMIC
113         $(INSTALL) -m $(SHLIBMODE) $(LIBSHARED) $(FAKEROOT)$(SECUREDIR)
114 endif
115
116 remove:
117         rm -f $(FAKEROOT)$(SECUREDIR)/$(TITLE).so
118
119 clean:
120         rm -f $(LIBOBJD) $(LIBOBJS) core *~
121
122 extraclean: clean
123         rm -f *.a *.o *.so *.bak
124
125 .c.o:   
126         $(CC) $(CFLAGS) -c $<
127