5 @echo "*** This is not a top-level Makefile!"
7 # ///////////////////////////////////////////////////////////////////
9 # uncomment if you wnat libpam_misc to be made as a dynamic library
10 # AGM has had some segfaulting from libdl when I did this. I have not
11 # investigated the cause...
15 ifeq ($(DEBUG_REL),yes)
23 FILES=misc_conv help_env
26 # Probably no need to alter anything below here.
29 # build dynamic library names
31 LIBDYNAMIC=lib$(LIBNAME).$(DYNTYPE)
32 LIBDYNMAJ=$(LIBDYNAMIC).$(LIBMAJOR)
33 LIBDYNMIN=$(LIBDYNMAJ).$(LIBMINOR)
37 LIBSTATIC = lib$(LIBNAME).a
39 # sources and object files
41 LIBSRC = $(addsuffix .c,$(FILES))
42 LIBOBJ = $(addsuffix .o,$(FILES))
46 all: $(LIBSTATIC) $(LIBDYNAMIC)
48 $(LIBDYNAMIC): $(LIBOBJ)
50 ifeq ($(USESONAME),yes)
51 $(LD_L) $(SOSWITCH) $(LIBDYNMAJ) -o $@ $(LIBOBJ) $(LINKLIBS)
53 $(LD_L) -o $@ $(LIBOBJ)
55 ifeq ($(NEEDSONAME),yes)
57 ln -s $(LIBDYNAMIC) $(LIBDYNMAJ)
59 ln -s $(LIBDYNAMIC) $(LIBDYNMIN)
63 $(LIBSTATIC): $(LIBOBJ)
68 $(MKDIR) $(FAKEROOT)$(INCLUDED)
69 $(INSTALL) -m 644 ./pam_misc.h $(FAKEROOT)$(INCLUDED)
71 $(INSTALL) -m $(SHLIBMODE) $(LIBDYNAMIC) $(FAKEROOT)$(LIBDIR)/$(LIBDYNMIN)
73 ifneq ($(DYNTYPE),"sl")
74 ( cd $(FAKEROOT)$(LIBDIR) ; ln -sf $(LIBDYNMAJ) $(LIBDYNAMIC) )
77 $(INSTALL) -m 644 $(LIBSTATIC) $(FAKEROOT)$(LIBDIR)
80 rm -f *.so *.a core a.out *~
83 rm -f $(FAKEROOT)$(INCLUDED)/pam_misc.h
84 rm -f $(FAKEROOT)$(LIBDIR)/$(LIBDYNAMIC).*
85 rm -f $(FAKEROOT)$(LIBDIR)/$(LIBDYNAMIC)
87 rm -f $(FAKEROOT)$(LIBDIR)/$(LIBSTATIC)
88 rm -f $(FAKEROOT)$(INCLUDED)/chk_malloc.h
91 $(CC) -c $(DEFS) $(CFLAGS) $<