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 $
5 # This Makefile controls a build process of $(TITLE) module for
6 # Linux-PAM. You should not modify this Makefile (unless you know
7 # what you are doing!).
10 # Revision 1.7 1997/04/05 06:43:41 morgan
11 # full-source-tree and fakeroot
13 # Revision 1.6 1997/02/15 19:04:27 morgan
16 # Revision 1.5 1996/11/10 20:11:48 morgan
17 # crossplatform support
19 # Revision 1.4 1996/09/05 06:50:12 morgan
22 # Revision 1.3 1996/05/26 15:48:38 morgan
23 # make dynamic and static dirs
25 # Revision 1.2 1996/05/26 04:00:16 morgan
26 # changes for automated static/dynamic modules
28 # Revision 1.1 1996/03/16 17:47:36 morgan
32 # Created by Andrew Morgan <morgan@parc.power.net> 1996/3/11
35 # Convenient defaults for compiling independently of the full source
37 ifndef FULL_LINUX_PAM_SOURCE_TREE
38 export DYNAMIC=-DPAM_DYNAMIC
40 export CFLAGS=-O2 -Dlinux -DLINUX_PAM \
41 -ansi -D_POSIX_SOURCE -Wall -Wwrite-strings \
42 -Wpointer-arith -Wcast-qual -Wcast-align -Wtraditional \
43 -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs -Winline \
44 -Wshadow -pedantic -fPIC
46 export LD_D=gcc -shared -Xlinker -x
57 LIBOBJD = $(addprefix dynamic/,$(LIBOBJ))
58 LIBOBJS = $(addprefix static/,$(LIBOBJ))
61 $(CC) $(CFLAGS) $(DYNAMIC) $(CPPFLAGS) $(TARGET_ARCH) -c $< -o $@
64 $(CC) $(CFLAGS) $(STATIC) $(CPPFLAGS) $(TARGET_ARCH) -c $< -o $@
68 LIBSHARED = $(TITLE).so
71 LIBSTATIC = lib$(TITLE).o
74 ####################### don't edit below #######################
77 @echo "**** This is not a top-level Makefile "
80 all: dirs $(LIBSHARED) $(LIBSTATIC) register
92 ( cd .. ; ./register_static $(TITLE) $(TITLE)/$(LIBSTATIC) )
98 $(LIBSHARED): $(LIBOBJD)
99 $(LD_D) -o $@ $(LIBOBJD)
103 $(LIBOBJS): $(LIBSRC)
105 $(LIBSTATIC): $(LIBOBJS)
106 $(LD) -r -o $@ $(LIBOBJS)
110 $(MKDIR) $(FAKEROOT)$(SECUREDIR)
112 $(INSTALL) -m $(SHLIBMODE) $(LIBSHARED) $(FAKEROOT)$(SECUREDIR)
116 rm -f $(FAKEROOT)$(SECUREDIR)/$(TITLE).so
119 rm -f $(LIBOBJD) $(LIBOBJS) core *~
122 rm -f *.a *.o *.so *.bak
125 $(CC) $(CFLAGS) -c $<