1 # $FreeBSD: src/contrib/libpam/libpam_misc/Makefile,v 1.1.1.1.6.2 2001/06/11 15:28:15 markm Exp $
2 # $DragonFly: src/contrib/libpam/libpam_misc/Attic/Makefile,v 1.2 2003/06/17 04:24:03 dillon Exp $
3 # $Header: /home/morgan/pam/Linux-PAM-0.57/libpam_misc/RCS/Makefile,v 1.10 1997/04/05 07:00:18 morgan Exp $
6 # Revision 1.10 1997/04/05 07:00:18 morgan
9 # Revision 1.9 1997/02/15 15:46:56 morgan
10 # inherit major and minor numbers from top level
12 # Revision 1.8 1997/01/04 20:20:11 morgan
13 # update for .55 and make -> $(MAKE)
15 # Revision 1.7 1996/12/01 03:28:11 morgan
20 @echo "*** This is not a top-level Makefile!"
22 # ///////////////////////////////////////////////////////////////////
24 # uncomment if you wnat libpam_misc to be made as a dynamic library
25 # AGM has had some segfaulting from libdl when I did this. I have not
26 # investigated the cause...
30 ifeq ($(DEBUG_REL),yes)
38 FILES=misc_conv help_env
41 # Probably no need to alter anything below here.
44 # build dynamic library names
46 LIBDYNAMIC=lib$(LIBNAME).$(DYNTYPE)
47 LIBDYNMAJ=$(LIBDYNAMIC).$(LIBMAJOR)
48 LIBDYNMIN=$(LIBDYNMAJ).$(LIBMINOR)
52 LIBSTATIC = lib$(LIBNAME).a
54 # sources and object files
56 LIBSRC = $(addsuffix .c,$(FILES))
57 LIBOBJ = $(addsuffix .o,$(FILES))
61 all: $(LIBSTATIC) $(LIBDYNAMIC)
63 $(LIBDYNAMIC): $(LIBOBJ)
65 ifeq ($(USESONAME),yes)
66 $(LD_L) $(SOSWITCH) $(LIBDYNMAJ) -o $@ $(LIBOBJ)
68 $(LD_L) -o $@ $(LIBOBJ)
70 ifeq ($(NEEDSONAME),yes)
72 ln -s $(LIBDYNAMIC) $(LIBDYNMAJ)
74 ln -s $(LIBDYNAMIC) $(LIBDYNMIN)
78 $(LIBSTATIC): $(LIBOBJ)
83 $(MKDIR) $(FAKEROOT)$(INCLUDED)
84 $(INSTALL) -m 644 ./pam_misc.h $(FAKEROOT)$(INCLUDED)
86 $(INSTALL) -m $(SHLIBMODE) $(LIBDYNAMIC) $(FAKEROOT)$(LIBDIR)/$(LIBDYNMIN)
88 ifneq ($(DYNTYPE),"sl")
89 ( cd $(FAKEROOT)$(LIBDIR) ; ln -sf $(LIBDYNMAJ) $(LIBDYNAMIC) )
92 $(INSTALL) -m 644 $(LIBSTATIC) $(FAKEROOT)$(LIBDIR)
95 rm -f *.so *.a core a.out *~
98 rm -f $(FAKEROOT)$(INCLUDED)/pam_misc.h
99 rm -f $(FAKEROOT)$(LIBDIR)/$(LIBDYNAMIC).*
100 rm -f $(FAKEROOT)$(LIBDIR)/$(LIBDYNAMIC)
102 rm -f $(FAKEROOT)$(LIBDIR)/$(LIBSTATIC)
103 rm -f $(FAKEROOT)$(INCLUDED)/chk_malloc.h
106 $(CC) -c $(DEFS) $(CFLAGS) $<