mirror of
https://github.com/linux-pam/linux-pam.git
synced 2024-11-27 19:53:37 +08:00
2acda54287
Purpose of commit: new feature Commit summary: --------------- If you are looking for an object that you can blindly dlopen() and use to bind to pam w/ modules, this commit is for you. Its not fully integrated into the build tree, but I'd like some feedback before wiring it in as a regular feature.
71 lines
1.3 KiB
Makefile
71 lines
1.3 KiB
Makefile
#
|
|
# $Id$
|
|
#
|
|
#
|
|
|
|
include ../Make.Rules
|
|
|
|
ifeq ($(WITH_LIBDEBUG),yes)
|
|
LIBNAME=pamd
|
|
else
|
|
LIBNAME=pam
|
|
endif
|
|
VERSION=.$(MAJOR_REL)
|
|
MODIFICATION=.$(MINOR_REL)
|
|
|
|
# ---------------------------------------------
|
|
|
|
dummy: ../Make.Rules all
|
|
|
|
# ---------------------------------------------
|
|
|
|
# dynamic library names
|
|
|
|
PAMSHOBJ = pam.so
|
|
PAMSHOBJMAJ = $(PAMSHOBJ)$(VERSION)
|
|
|
|
DLIBOBJECTS = pam.o
|
|
|
|
# ---------------------------------------------
|
|
## rules
|
|
|
|
all: dirs $(PAMSHOBJ) ../Make.Rules
|
|
|
|
dirs:
|
|
ifeq ($(DYNAMIC_LIBPAM),yes)
|
|
$(MKDIR) dynamic
|
|
endif
|
|
ifeq ($(STATIC_LIBPAM),yes)
|
|
$(MKDIR) static
|
|
endif
|
|
|
|
dynamic/%.o : %.c
|
|
$(CC) $(CFLAGS) $(CPPFLAGS) $(TARGET_ARCH) -c $< -o $@
|
|
|
|
static/%.o : %.c
|
|
$(CC) $(CFLAGS) $(CPPFLAGS) $(TARGET_ARCH) -c $< -o $@
|
|
|
|
$(PAMSHOBJ): $(DLIBOBJECTS)
|
|
ifeq ($(USESONAME),yes)
|
|
$(LD_L) $(SOSWITCH) $(PAMSHOBJMAJ) -o $@ $+ $(LINKLIBS)
|
|
else
|
|
$(LD_L) -o $@ $(DLIBOBJECTS) $(LINKLIBS)
|
|
endif
|
|
|
|
install: all
|
|
$(MKDIR) $(FAKEROOT)$(libdir)
|
|
ifeq ($(DYNAMIC_LIBPAM),yes)
|
|
$(INSTALL) -m $(SHLIBMODE) $(PAMSHOBJ) $(FAKEROOT)$(libdir)/$(PAMSHOBJ)
|
|
$(LDCONFIG)
|
|
endif
|
|
|
|
remove:
|
|
rm -f $(FAKEROOT)$(libdir)/$(LIBPAM)
|
|
$(LDCONFIG)
|
|
|
|
clean:
|
|
rm -f a.out core *~ static/*.o dynamic/*.o
|
|
rm -f *.a *.o *.so ./include/security/*~
|
|
if [ -d dynamic ]; then rmdir dynamic ; fi
|
|
if [ -d static ]; then rmdir static ; fi
|