head	1.5;
access;
symbols;
locks; strict;
comment	@# @;


1.5
date	97.01.04.20.39.08;	author morgan;	state Exp;
branches;
next	1.4;

1.4
date	96.12.01.03.02.03;	author morgan;	state Exp;
branches;
next	1.3;

1.3
date	96.11.10.20.14.42;	author morgan;	state Exp;
branches;
next	1.2;

1.2
date	96.09.05.06.36.49;	author morgan;	state Exp;
branches;
next	1.1;

1.1
date	96.08.29.13.23.29;	author morgan;	state Exp;
branches;
next	;


desc
@@


1.5
log
@conditional on having libpwdb
@
text
@# $Id: Makefile,v 1.4 1996/12/01 03:02:03 morgan Exp morgan $
#
# This Makefile controls a build process of the pam_unix module
# for Linux-PAM. You should not modify this Makefile.
#
# rewritten to compile new module Andrew Morgan
# <morgan@@parc.power.net> 1996/11/6
#

ifeq ($(HAVE_PWDBLIB),yes)

TITLE=pam_pwdb
# compilation flags
EXTRAS=
# extra object files
PLUS=
# extra files that may be needed to be created
CREATE=

# NOTE: this module links dynamically to the libpwdb library.
EXTRALS += -lpwdb

########################### don't edit below ##########################

LIBSRC = $(TITLE).c
LIBOBJ = $(TITLE).o
LIBOBJD = $(addprefix dynamic/,$(LIBOBJ))
LIBOBJS = $(addprefix static/,$(LIBOBJ))
LIBDEPS = pam_unix_acct.-c pam_unix_auth.-c pam_unix_passwd.-c \
	pam_unix_sess.-c pam_unix_pwupd.-c support.-c
PLUS += md5.o md5_crypt.o
CFLAGS += $(EXTRAS)

dummy:
	@@echo "**** This is not a top-level Makefile "
	exit

dynamic/$(LIBOBJ) : $(LIBSRC) $(LIBDEPS)
	$(CC) $(CFLAGS) $(DYNAMIC) $(CPPFLAGS) $(TARGET_ARCH) -c $< -o $@@

static/$(LIBOBJ) : $(LIBSRC) $(LIBDEPS)
	$(CC) $(CFLAGS) $(STATIC) $(CPPFLAGS) $(TARGET_ARCH) -c $< -o $@@

ifdef DYNAMIC
LIBSHARED = $(TITLE).so
endif
ifdef STATIC
LIBSTATIC = lib$(TITLE).o
endif

all: info dirs $(PLUS) $(LIBSHARED) $(LIBSTATIC) register

info:
	@@echo
	@@echo "*** Building PAM_pwdb module..."
	@@echo

dirs:
ifdef DYNAMIC
	@@$(MKDIR) ./dynamic
endif
ifdef STATIC
	@@$(MKDIR) ./static
endif

register:
ifdef STATIC
	( cd .. ; ./register_static $(TITLE) $(TITLE)/$(LIBSTATIC) )
endif

ifdef DYNAMIC
$(LIBOBJD): $(LIBSRC)

$(LIBSHARED):	$(LIBOBJD)
	$(LD_D) -o $@@ $(LIBOBJD) $(PLUS) $(EXTRALS)
endif

ifdef STATIC
$(LIBOBJS): $(LIBSRC)

$(LIBSTATIC): $(LIBOBJS)
	$(LD) -r -o $@@ $(LIBOBJS) $(PLUS) $(EXTRALS)
endif

install: all
	$(MKDIR) $(SECUREDIR)
ifdef DYNAMIC
	$(INSTALL) -m 644 $(LIBSHARED) $(SECUREDIR)
endif

remove:
	rm -f $(SECUREDIR)/$(TITLE).so

clean:
	rm -f $(LIBOBJD) $(LIBOBJS) $(MOREDELS) core *~ *.o *.so

extraclean: clean
	rm -f *.a *.o *.so *.bak

else

include ../dont_makefile

endif

#####################################################################
# $Log: Makefile,v $
# Revision 1.4  1996/12/01 03:02:03  morgan
# changed banner, removed linking libraries
#
# Revision 1.3  1996/11/10 20:14:42  morgan
# cross platform support
#
# Revision 1.2  1996/09/05 06:36:49  morgan
# options added and use of LD altered
#
# Revision 1.1  1996/08/29 13:23:29  morgan
# Initial revision
#
#
@


1.4
log
@changed banner, removed linking libraries
@
text
@d1 1
a1 1
# $Id: Makefile,v 1.3 1996/11/10 20:14:42 morgan Exp morgan $
d10 2
d100 6
d108 3
@


1.3
log
@cross platform support
@
text
@d1 1
a1 1
# $Id: Makefile,v 1.2 1996/09/05 06:36:49 morgan Exp morgan $
d18 3
a31 3
# NOTE: this module links dynamically to the libpwdb library.
LOADLIBES += -lpwdb

d53 1
a53 1
	@@echo "*** Building pam-unix module of the framework..."
d58 1
a58 1
	$(MKDIR) ./dynamic
d61 1
a61 1
	$(MKDIR) ./static
d73 1
a73 1
	$(LD_D) -o $@@ $(LIBOBJD) $(PLUS) $(LOADLIBES)
d80 1
a80 1
	$(LD) -r -o $@@ $(LIBOBJS) $(PLUS)
d100 3
@


1.2
log
@options added and use of LD altered
@
text
@d1 1
a1 1
# $Id: Makefile,v 1.1 1996/08/29 13:23:29 morgan Exp morgan $
d7 1
a7 1
# <morgan@@physics.ucla.edu> 1996/8/19
d10 2
a11 1
TITLE=pam_unix
d13 4
a16 24

#
# Here are a few things you might like to customize
#

# if your libc supports shadow passwords then uncomment the following line
## EXTRAS += -D"HAVE_SHADOW_H"

# if you have the lckpwdf libc call you should uncomment the following line
## EXTRAS += -D"HAVE_LCKPWDF"

# if you would like the password files to be locked while they are being 
# updated uncomment the following line
EXTRAS += -D"WANT_LCKPWDF"

#######################################################################
# Here is an option you are strongly cautioned against using on a live
# system.
#
# *CAUTION* VERY ALPHA.. uncomment line below to build shadow file
# from existing /etc/passwd file the first time a user requests to
# change their password. The 'shadow' argument must also be present in
# the /etc/pam.conf file, and you must HAVE_SHADOW_H above too.
## EXTRAS += -D"BUILD_SHADOW_ON_FLY"
d25 2
a26 2
	pam_unix_sess.-c support.-c
PLUS = md5.o md5_crypt.o lckpwdf.o
d29 3
d53 1
a53 1
	@@echo "*** Building pam-unix(alpha) module of the framework..."
d58 1
a58 1
	mkdir -p ./dynamic
d61 1
a61 1
	mkdir -p ./static
d73 1
a73 1
	$(LD_D) -o $@@ $(LIBOBJD) $(PLUS)
d84 1
a84 1
	mkdir -p $(SECUREDIR)
d86 1
a86 1
	install -m644 $(LIBSHARED) $(SECUREDIR)
d93 1
a93 1
	rm -f $(LIBOBJD) $(LIBOBJS) core *~
d100 3
@


1.1
log
@Initial revision
@
text
@d1 1
a1 1
# $Id$
d3 1
a3 1
# This Makefile controls a build process of the pam_unix modules
d11 1
d14 24
d45 2
a46 2

########################### don't edit below #######################
d65 1
a65 1
all: info dirs $(LIBSHARED) $(LIBSTATIC) register
d89 1
a89 1
		$(LD) -x --shared -o $@@ $(LIBOBJD)
d96 1
a96 1
	$(LD) -r -o $@@ $(LIBOBJS)
d115 4
a118 1
# $Log$
@
