diff options
author | Andrew G. Morgan <morgan@kernel.org> | 2000-11-19 23:54:01 +0000 |
---|---|---|
committer | Andrew G. Morgan <morgan@kernel.org> | 2000-11-19 23:54:01 +0000 |
commit | 73346dba777b023e46830a973148eb0ddbf8f8b4 (patch) | |
tree | 3ac12799a597cb2004f8ebf5b18a4469ccee9a44 /libpam/Makefile | |
parent | 47575925596c2af2a78c009fcdd14de72fc82d3e (diff) | |
download | pam-73346dba777b023e46830a973148eb0ddbf8f8b4.tar.gz pam-73346dba777b023e46830a973148eb0ddbf8f8b4.tar.bz2 pam-73346dba777b023e46830a973148eb0ddbf8f8b4.zip |
Relevant BUGIDs: task 15788, bugs 108297, 117476, 117474
Purpose of commit: autoconf support for Linux-PAM
Commit summary:
---------------
This is a merge of the autoconf support that was developed against
a 0-72 branch.
[Note, because CVS has some issues, this is actually only 95% of
the actual commit. The other files were actually committed when
the preparation branch Linux-PAM-0-73pre-autoconf was updated.
Hopefully, this will complete the merge.]
Diffstat (limited to 'libpam/Makefile')
-rw-r--r-- | libpam/Makefile | 79 |
1 files changed, 32 insertions, 47 deletions
diff --git a/libpam/Makefile b/libpam/Makefile index 66b2a705..b734dfa4 100644 --- a/libpam/Makefile +++ b/libpam/Makefile @@ -3,28 +3,12 @@ # # +include ../Make.Rules + # need to tell libpam about the default directory for PAMs MOREFLAGS=-D"DEFAULT_MODULE_PATH=\"$(SECUREDIR)/\"" -# you may uncomment the following to build libpam in modified ways - -# lots of debugging information goes to /tmp/pam-debug.log -#MOREFLAGS += -D"DEBUG" - -# pay attention to locked /etc/pam.conf or /etc/pam.d/* files -#MOREFLAGS += -D"PAM_LOCKING" - -# read both the /etc/pam.d/ and pam.conf files specific to the deisred service -#MOREFLAGS += -D"PAM_READ_BOTH_CONFS" - -# make a kludge attempt to be compatible with the old pam_strerror -# calling convention -#MOREFLAGS += -D"UGLY_HACK_FOR_PRIOR_BEHAVIOR_SUPPORT" - -# libpam.so needs -ldl, too. -LINKLIBS += $(LIBDL) - -ifeq ($(DEBUG_REL),yes) +ifeq ($(WITH_LIBDEBUG),yes) LIBNAME=libpamd else LIBNAME=libpam @@ -34,8 +18,7 @@ MODIFICATION=.$(MINOR_REL) # --------------------------------------------- -dummy: - @echo "*** This is not a top-level Makefile!" +dummy: ../Make.Rules all # --------------------------------------------- @@ -52,6 +35,7 @@ LIBPAMFULL = $(LIBPAMNAME)$(MODIFICATION) LIBPAMSTATIC = $(LIBNAME).a ifdef STATIC +@echo Did you mean to set STATIC\? MODULES = $(shell cat ../modules/_static_module_objects) STATICOBJ = pam_static.o endif @@ -65,15 +49,16 @@ LIBOBJECTS = pam_item.o pam_strerror.o pam_end.o pam_start.o pam_data.o \ pam_account.o pam_auth.o pam_session.o pam_password.o \ pam_env.o pam_log.o $(EXTRAS) -ifdef DYNAMIC_LIBPAM +ifeq ($(DYNAMIC_LIBPAM),yes) +# libpam.so needs -ldl, too. DLIBOBJECTS = $(addprefix dynamic/,$(LIBOBJECTS) $(STATICOBJ)) -ifdef STATICOBJ +ifeq ($(STATICOBJ),yes) dynamic/pam_static.o: pam_static.c ../modules/_static_module_objects $(CC) $(CFLAGS) -c pam_static.c -o $@ endif endif -ifdef STATIC_LIBPAM +ifeq ($(STATIC_LIBPAM),yes) SLIBOBJECTS = $(addprefix static/,$(LIBOBJECTS) $(STATICOBJ)) ifdef STATICOBJ static/pam_static.o: pam_static.c ../modules/_static_module_objects @@ -84,28 +69,29 @@ endif # --------------------------------------------- ## rules -all: dirs $(LIBPAM) $(LIBPAMSTATIC) +all: dirs $(LIBPAM) $(LIBPAMSTATIC) ../Make.Rules dirs: -ifdef DYNAMIC_LIBPAM - mkdir -p dynamic +ifeq ($(DYNAMIC_LIBPAM),yes) + $(MKDIR) dynamic endif -ifdef STATIC_LIBPAM - mkdir -p static +ifeq ($(STATIC_LIBPAM),yes) + $(MKDIR) static endif dynamic/%.o : %.c - $(CC) $(CFLAGS) $(DYNAMIC) $(CPPFLAGS) $(TARGET_ARCH) -c $< -o $@ + $(CC) $(CFLAGS) $(CPPFLAGS) $(TARGET_ARCH) -c $< -o $@ static/%.o : %.c - $(CC) $(CFLAGS) $(STATIC) $(CPPFLAGS) $(TARGET_ARCH) -c $< -o $@ + $(CC) $(CFLAGS) $(CPPFLAGS) $(TARGET_ARCH) -c $< -o $@ $(LIBPAM): $(DLIBOBJECTS) -ifdef DYNAMIC_LIBPAM +ifeq ($(DYNAMIC_LIBPAM),yes) ifeq ($(USESONAME),yes) - $(LD_L) $(SOSWITCH) $(LIBPAMNAME) -o $@ $(DLIBOBJECTS) $(MODULES) $(LINKLIBS) + $(LD_L) $(SOSWITCH) $(LIBPAMNAME) -o $@ $(DLIBOBJECTS) \ + $(MODULES) $(LINKLIBS) else - $(LD_L) -o $@ $(DLIBOBJECTS) $(MODULES) + $(LD_L) -o $@ $(DLIBOBJECTS) $(MODULES) $(LINKLIBS) endif ifeq ($(NEEDSONAME),yes) rm -f $(LIBPAMFULL) @@ -116,13 +102,13 @@ ifdef DYNAMIC_LIBPAM endif $(LIBPAMSTATIC): $(SLIBOBJECTS) -ifdef STATIC_LIBPAM +ifeq ($(STATIC_LIBPAM),yes) $(AR) $@ $(SLIBOBJECTS) $(MODULES) $(RANLIB) $@ endif install: all - $(MKDIR) $(FAKEROOT)$(INCLUDED) $(FAKEROOT)$(LIBDIR) + $(MKDIR) $(FAKEROOT)$(INCLUDED) $(FAKEROOT)$(libdir) $(INSTALL) -m 644 include/security/pam_appl.h $(FAKEROOT)$(INCLUDED) $(INSTALL) -m 644 include/security/pam_modules.h $(FAKEROOT)$(INCLUDED) $(INSTALL) -m 644 include/security/_pam_macros.h $(FAKEROOT)$(INCLUDED) @@ -131,15 +117,16 @@ install: all ifdef MEMORY_DEBUG $(INSTALL) -m 644 include/security/pam_malloc.h $(FAKEROOT)$(INCLUDED) endif -ifdef DYNAMIC_LIBPAM - $(INSTALL) -m $(SHLIBMODE) $(LIBPAM) $(FAKEROOT)$(LIBDIR)/$(LIBPAMFULL) +ifeq ($(DYNAMIC_LIBPAM),yes) + $(INSTALL) -m $(SHLIBMODE) $(LIBPAM) $(FAKEROOT)$(libdir)/$(LIBPAMFULL) $(LDCONFIG) ifneq ($(DYNTYPE),"sl") - ( cd $(FAKEROOT)$(LIBDIR) ; rm -f $(LIBPAM) ; ln -s $(LIBPAMNAME) $(LIBPAM) ) + ( cd $(FAKEROOT)$(libdir) ; rm -f $(LIBPAM) ; \ + ln -s $(LIBPAMNAME) $(LIBPAM) ) endif endif -ifdef STATIC_LIBPAM - $(INSTALL) -m 644 $(LIBPAMSTATIC) $(FAKEROOT)$(LIBDIR) +ifeq ($(STATIC_LIBPAM),yes) + $(INSTALL) -m 644 $(LIBPAMSTATIC) $(FAKEROOT)$(libdir) endif remove: @@ -148,15 +135,13 @@ remove: rm -f $(FAKEROOT)$(INCLUDED)/pam_appl.h rm -f $(FAKEROOT)$(INCLUDED)/pam_modules.h rm -f $(FAKEROOT)$(INCLUDED)/pam_malloc.h - rm -f $(FAKEROOT)$(LIBDIR)/$(LIBPAM).* - rm -f $(FAKEROOT)$(LIBDIR)/$(LIBPAM) + rm -f $(FAKEROOT)$(libdir)/$(LIBPAM).* + rm -f $(FAKEROOT)$(libdir)/$(LIBPAM) $(LDCONFIG) - rm -f $(FAKEROOT)$(LIBDIR)/$(LIBPAMSTATIC) + rm -f $(FAKEROOT)$(libdir)/$(LIBPAMSTATIC) clean: rm -f a.out core *~ static/*.o dynamic/*.o - -extraclean: clean - rm -f *.a *.out *.o *.so ./include/security/*~ + rm -f *.a *.o *.so ./include/security/*~ if [ -d dynamic ]; then rmdir dynamic ; fi if [ -d static ]; then rmdir static ; fi |