2 # $Id: Makefile,v 1.8 1997/04/05 06:33:25 morgan Exp morgan $
3 # $FreeBSD: src/contrib/libpam/modules/pam_permit/Makefile,v 1.3.4.2 2001/06/11 15:28:23 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.8 1997/04/05 06:33:25 morgan
13 # Revision 1.7 1997/02/15 19:02:27 morgan
14 # updated email address
16 # Revision 1.6 1996/11/10 20:14:34 morgan
17 # cross platform support
19 # Revision 1.5 1996/09/05 06:32:45 morgan
22 # Revision 1.4 1996/05/26 15:49:25 morgan
23 # make dynamic and static dirs
25 # Revision 1.3 1996/05/26 04:04:26 morgan
26 # automated static support
28 # Revision 1.2 1996/03/16 17:56:38 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
58 LIBOBJD = $(addprefix dynamic/,$(LIBOBJ))
59 LIBOBJS = $(addprefix static/,$(LIBOBJ))
62 LIBSHARED = $(TITLE).so
66 LIBSTATIC = lib$(TITLE).o
69 ####################### don't edit below #######################
71 all: dirs $(LIBSHARED) $(LIBSTATIC) register
74 $(CC) $(CFLAGS) $(DYNAMIC) $(TARGET_ARCH) -c $< -o $@
77 $(CC) $(CFLAGS) $(STATIC) $(TARGET_ARCH) -c $< -o $@
89 ( cd .. ; ./register_static $(TITLE) $(TITLE)/$(LIBSTATIC) )
97 $(LIBSHARED): $(LIBOBJD)
98 $(LD_D) -o $@ $(LIBOBJD)
102 $(LIBOBJS): $(LIBSRC)
106 $(LIBSTATIC): $(LIBOBJS)
107 $(LD) -r -o $@ $(LIBOBJS)
111 $(MKDIR) $(FAKEROOT)$(SECUREDIR)
113 $(INSTALL) -m $(SHLIBMODE) $(LIBSHARED) $(FAKEROOT)$(SECUREDIR)
117 rm -f $(FAKEROOT)$(SECUREDIR)/$(TITLE).so
120 rm -f $(LIBOBJD) $(LIBOBJS) core *~
123 rm -f *.a *.o *.so *.bak
126 $(CC) $(CFLAGS) -c $<