1 # $FreeBSD: src/contrib/libpam/libpam_misc/Makefile,v 1.1.1.1.6.2 2001/06/11 15:28:15 markm Exp $
2 # $Header: /home/morgan/pam/Linux-PAM-0.57/libpam_misc/RCS/Makefile,v 1.10 1997/04/05 07:00:18 morgan Exp $
5 # Revision 1.10 1997/04/05 07:00:18 morgan
8 # Revision 1.9 1997/02/15 15:46:56 morgan
9 # inherit major and minor numbers from top level
11 # Revision 1.8 1997/01/04 20:20:11 morgan
12 # update for .55 and make -> $(MAKE)
14 # Revision 1.7 1996/12/01 03:28:11 morgan
19 @echo "*** This is not a top-level Makefile!"
21 # ///////////////////////////////////////////////////////////////////
23 # uncomment if you wnat libpam_misc to be made as a dynamic library
24 # AGM has had some segfaulting from libdl when I did this. I have not
25 # investigated the cause...
29 ifeq ($(DEBUG_REL),yes)
37 FILES=misc_conv help_env
40 # Probably no need to alter anything below here.
43 # build dynamic library names
45 LIBDYNAMIC=lib$(LIBNAME).$(DYNTYPE)
46 LIBDYNMAJ=$(LIBDYNAMIC).$(LIBMAJOR)
47 LIBDYNMIN=$(LIBDYNMAJ).$(LIBMINOR)
51 LIBSTATIC = lib$(LIBNAME).a
53 # sources and object files
55 LIBSRC = $(addsuffix .c,$(FILES))
56 LIBOBJ = $(addsuffix .o,$(FILES))
60 all: $(LIBSTATIC) $(LIBDYNAMIC)
62 $(LIBDYNAMIC): $(LIBOBJ)
64 ifeq ($(USESONAME),yes)
65 $(LD_L) $(SOSWITCH) $(LIBDYNMAJ) -o $@ $(LIBOBJ)
67 $(LD_L) -o $@ $(LIBOBJ)
69 ifeq ($(NEEDSONAME),yes)
71 ln -s $(LIBDYNAMIC) $(LIBDYNMAJ)
73 ln -s $(LIBDYNAMIC) $(LIBDYNMIN)
77 $(LIBSTATIC): $(LIBOBJ)
82 $(MKDIR) $(FAKEROOT)$(INCLUDED)
83 $(INSTALL) -m 644 ./pam_misc.h $(FAKEROOT)$(INCLUDED)
85 $(INSTALL) -m $(SHLIBMODE) $(LIBDYNAMIC) $(FAKEROOT)$(LIBDIR)/$(LIBDYNMIN)
87 ifneq ($(DYNTYPE),"sl")
88 ( cd $(FAKEROOT)$(LIBDIR) ; ln -sf $(LIBDYNMAJ) $(LIBDYNAMIC) )
91 $(INSTALL) -m 644 $(LIBSTATIC) $(FAKEROOT)$(LIBDIR)
94 rm -f *.so *.a core a.out *~
97 rm -f $(FAKEROOT)$(INCLUDED)/pam_misc.h
98 rm -f $(FAKEROOT)$(LIBDIR)/$(LIBDYNAMIC).*
99 rm -f $(FAKEROOT)$(LIBDIR)/$(LIBDYNAMIC)
101 rm -f $(FAKEROOT)$(LIBDIR)/$(LIBSTATIC)
102 rm -f $(FAKEROOT)$(INCLUDED)/chk_malloc.h
105 $(CC) -c $(DEFS) $(CFLAGS) $<