2 # $Id: Makefile,v 1.8 1997/04/05 06:33:25 morgan Exp morgan $
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!).
9 # Revision 1.8 1997/04/05 06:33:25 morgan
12 # Revision 1.7 1997/02/15 19:02:27 morgan
13 # updated email address
15 # Revision 1.6 1996/11/10 20:14:34 morgan
16 # cross platform support
18 # Revision 1.5 1996/09/05 06:32:45 morgan
21 # Revision 1.4 1996/05/26 15:49:25 morgan
22 # make dynamic and static dirs
24 # Revision 1.3 1996/05/26 04:04:26 morgan
25 # automated static support
27 # Revision 1.2 1996/03/16 17:56:38 morgan
31 # Created by Andrew Morgan <morgan@parc.power.net> 1996/3/11
34 # Convenient defaults for compiling independently of the full source
36 ifndef FULL_LINUX_PAM_SOURCE_TREE
37 export DYNAMIC=-DPAM_DYNAMIC
39 export CFLAGS=-O2 -Dlinux -DLINUX_PAM \
40 -ansi -D_POSIX_SOURCE -Wall -Wwrite-strings \
41 -Wpointer-arith -Wcast-qual -Wcast-align -Wtraditional \
42 -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs -Winline \
43 -Wshadow -pedantic -fPIC
45 export LD_D=gcc -shared -Xlinker -x
57 LIBOBJD = $(addprefix dynamic/,$(LIBOBJ))
58 LIBOBJS = $(addprefix static/,$(LIBOBJ))
61 LIBSHARED = $(TITLE).so
65 LIBSTATIC = lib$(TITLE).o
68 ####################### don't edit below #######################
70 all: dirs $(LIBSHARED) $(LIBSTATIC) register
73 $(CC) $(CFLAGS) $(DYNAMIC) $(TARGET_ARCH) -c $< -o $@
76 $(CC) $(CFLAGS) $(STATIC) $(TARGET_ARCH) -c $< -o $@
88 ( cd .. ; ./register_static $(TITLE) $(TITLE)/$(LIBSTATIC) )
96 $(LIBSHARED): $(LIBOBJD)
97 $(LD_D) -o $@ $(LIBOBJD)
101 $(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 $<