shadow/old/Makefile.linux

752 lines
23 KiB
Makefile

#
# Copyright 1988 - 1994, Julianne Frances Haugh
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
# 3. Neither the name of Julianne F. Haugh nor the names of its contributors
# may be used to endorse or promote products derived from this software
# without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY JULIE HAUGH AND CONTRIBUTORS ``AS IS'' AND
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
# ARE DISCLAIMED. IN NO EVENT SHALL JULIE HAUGH OR CONTRIBUTORS BE LIABLE
# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
# SUCH DAMAGE.
#
# %W% %U% - Shadow password system (Linux)
#
# $Id: Makefile.linux,v 1.2 1997/05/01 23:11:54 marekm Exp $
#
SHELL = /bin/sh
#
# Set this flag to decide what level of code "get" returns.
# The base USENET release was release 1. It is no longer supported.
# The version with the utilities added was release 2. It is now unsupported.
# The version with database-like file access is release 3.
RELEASE = 3
VERSION = ver3.3.2
GFLAGS = -n $(VERSION)
GET = get_file
# Define the directory login is copied to. Linux uses /bin.
LOGINDIR = /bin
# Define any special libraries required to access the directory routines.
# Linux does not use any special libraries.
NDIR =
# Define some stuff for Cracklib. This assumes that libcracklib.a is
# in a system directory.
# Add -DPWC_HIST to check password history using TS&SzS cracklib
# CRACKDEF='-DUSE_CRACKLIB'
# CRACKLIB=-lcrack
# Pick your favorite C compiler and tags command
CC = gcc
TAGS = ctags
# OS. This is Linux.
OS = -DUSG -DLINUX
# Do you have to do ranlib (probably SUN, BSD and XENIX)?
RANLIB = ranlib
# RANLIB = echo
# Configuration Flags
#
# DEST_INCLUDE_DIR - local include files
# LIBS - system libraries
# -lsocket - needed for TCP/IP and possibly SYSLOG
# -ldbm or -lndbm - needed for DBM support
# -lcrypt - needed for SCO crypt() functions
# CFLAGS - C compiler flags
# -DLAI_TCP - needed for SCO Xenix Lachman TCP/IP
prefix=/
exec_prefix=$(prefix)
bindir=$(exec_prefix)/bin
sbindir=$(exec_prefix)/sbin
usrbindir=$(exec_prefix)/usr/bin
usrsbindir=$(exec_prefix)/usr/sbin
includedir=$(prefix)/usr/include
libdir=$(prefix)/usr/lib
mandir=$(prefix)/usr/man
man1dir=$(mandir)/man1
man3dir=$(mandir)/man3
man4dir=$(mandir)/man4
man5dir=$(mandir)/man5
man8dir=$(mandir)/man8
login_perms=-m755
# If you need "exec login", comment out the above line and uncomment below
#login_perms=-m4755
#DEST_INCLUDE_DIR = /usr/local/include
DEST_INCLUDE_DIR = $(includedir)
# Dirty hack to avoid name collisions (programs linked with libshadow
# could have their own xmalloc/xstrdup, these names are quite common).
# Don't look. --marekm
#HACK = -Dxmalloc=libshadow_xmalloc -Dxstrdup=libshadow_xstrdup
# Flags for Linux
CFLAGS = -O2 -fomit-frame-pointer -Wall $(CRACKDEF) $(OS) $(HACK)
LIBS = #-ldbm #-lskey
#LIBSHADOW = libshadow.a
LIBSHADOW = shlib/libshadow.so
STATIC = -static
LDFLAGS = -s
LTFLAGS =
# Where the login.defs file will be copied. Must agree with config.h
DEST_LOGIN_DEFS = /etc/login.defs
# Rules for .L (lint) files.
.SUFFIXES: .L
LINT = lint
LINTFLAGS = $(OS) -Dlint
.c.L:
$(LINT) -pxu $(LINTFLAGS) $*.c > $*.L
LOBJS = lmain.o login.o env.o valid.o setup.o shell.o age.o \
utmp.o sub.o mail.o motd.o log.o ttytype.o failure.o \
tz.o console.o hushed.o login_access.o setugid.o \
chowntty.o ulimit.o
LSRCS = lmain.c login.c env.c valid.c setup.c shell.c age.c \
utmp.c sub.c mail.c motd.c log.c ttytype.c failure.c \
tz.c console.c hushed.c login_access.c setugid.c \
chowntty.c ulimit.c
SOBJS = smain.o env.o entry.o setup.o shell.o \
sub.o mail.o motd.o sulog.o age.o tz.o hushed.o setugid.o \
suauth.o console.o ulimit.o
SSRCS = smain.c env.c entry.c setup.c shell.c \
pwent.c sub.c mail.c motd.c sulog.c shadow.c age.c pwpack.c rad64.c \
tz.c hushed.c setugid.c suauth.c console.c ulimit.c
POBJS = passwd.o obscure.o ulimit.o
PSRCS = passwd.c obscure.c ulimit.c
GPSRCS = gpmain.c
GPOBJS = gpmain.o
PWOBJS = pwconv.o
PWSRCS = pwconv.c pwent.c shadow.c pwpack.c rad64.c
PWUNOBJS = pwunconv.o
PWUNSRCS = pwunconv.c pwent.c shadow.c pwpack.c rad64.c
SULOGOBJS = sulogin.o entry.o env.o age.o setup.o \
valid.o shell.o tz.o setugid.o ulimit.o
SULOGSRCS = sulogin.c entry.c env.c age.c pwent.c setup.c \
shadow.c shell.c valid.c pwpack.c tz.c setugid.c ulimit.c
MKPWDOBJS = mkpasswd.o
MKPWDSRCS = mkpasswd.c
NGSRCS = newgrp.c env.c shell.c
NGOBJS = newgrp.o env.o shell.o
CHFNSRCS = chfn.c fields.c ulimit.c
CHFNOBJS = chfn.o fields.o ulimit.o
CHSHSRCS = chsh.c fields.c ulimit.c
CHSHOBJS = chsh.o fields.o ulimit.o
CHAGEOBJS = chage.o fields.o
CHAGESRCS = chage.c fields.c
CHPASSOBJS = chpasswd.o
CHPASSSRCS = chpasswd.c
DPSRCS = dpmain.c
DPOBJS = dpmain.o
ALLSRCS = age.c dialchk.c dialup.c entry.c env.c lmain.c log.c login.c mail.c \
motd.c obscure.c passwd.c pwconv.c pwent.c pwunconv.c getpass.c \
setup.c shadow.c shell.c smain.c sub.c sulog.c sulogin.c ttytype.c \
utmp.c valid.c port.c newgrp.c gpmain.c grent.c mkpasswd.c pwpack.c \
chfn.c chsh.c chage.c rad64.c encrypt.c chpasswd.c shadowio.c pwio.c \
newusers.c groupio.c fields.c pwdbm.c grpack.c grdbm.c sppack.c \
spdbm.c dpmain.c gshadow.c gsdbm.c gspack.c sgroupio.c useradd.c \
userdel.c patchlevel.h usermod.c copydir.c mkrmdir.c groupadd.c \
groupdel.c groupmod.c tz.c console.c hushed.c getdef.c scologin.c \
logoutd.c groups.c pwauth.c lockpw.c chowndir.c rename.c
FILES1 = LICENSE README patchlevel.h newgrp.c Makefile config.h pwunconv.c obscure.c \
age.c id.c
FILES2 = passwd.c port.c lmain.c sulogin.c pwpack.c dialup.c expiry.c \
gshadow.h
FILES3 = chfn.c chsh.c smain.c faillog.c pwconv.c shadow.c pwck.c utent.c
FILES4 = gpmain.c chage.c pwent.c valid.c setup.c entry.c ttytype.c port.h
FILES5 = pwio.c encrypt.c chpasswd.c newusers.c rad64.c dialchk.c faillog.h \
pwdbm.c grdbm.c gshadow.c sppack.c grpck.c
FILES6 = gspack.c spdbm.c lastlog.h shell.c login.c sub.c dpmain.c mail.c \
env.c pwd.h.m4 grpack.c shadow.h log.c grent.c motd.c dialup.h \
fields.c gsdbm.c utmp.c failure.c
FILES7 = groupio.c shadowio.c sgroupio.c groups.c copydir.c mkrmdir.c \
mkpasswd.c pwauth.c pwauth.h lastlog.c
FILES8 = useradd.c usermod.c login.defs rename.c
FILES9 = groupadd.c groupdel.c groupmod.c tz.c console.c hushed.c getdef.c \
scologin.c logoutd.c sulog.c getpass.c userdel.c lockpw.c chowndir.c
FILES_SUN4 = Makefile.sun4 README.sun4 config.h.sun4
FILES_SVR4 = Makefile.svr4 config.h.svr4
FILES_LINUX = Makefile.linux config.h.linux
MAN_1 = chage.1 chfn.1 chsh.1 id.1 login.1 newgrp.1 passwd.1 su.1 \
useradd.1 userdel.1 usermod.1 groupadd.1 groupdel.1 groupmod.1 \
groups.1 pwck.1 grpck.1
MAN_3 = shadow.3 pwauth.3
MAN_4 = # faillog.4 passwd.4 porttime.4 shadow.4
MAN_5 = login.5 faillog.5 passwd.5 porttime.5 shadow.5
MAN_8 = chpasswd.8 dpasswd.8 faillog.8 newusers.8 pwconv.8 pwunconv.8 \
sulogin.8 mkpasswd.8 logoutd.8 pwauth.8 lastlog.8
DOCS1 = $(MAN_1) $(MAN_3) $(MAN_4)
DOCS2 = $(MAN_5) $(MAN_8)
DOCS = $(DOCS1) $(DOCS2)
BINS = su login login-static pwconv pwunconv passwd sulogin faillog newgrp \
sg gpasswd mkpasswd chfn chsh chage chpasswd newusers dpasswd id \
useradd userdel usermod groupadd groupdel groupmod $(SCOLOGIN) \
logoutd groups pwck grpck lastlog expiry
all: Linux $(BINS) $(DOCS)
#
# Linux has its own /usr/include/shadow.h. Use it instead.
#
SHADOW = /usr/include/shadow.h
PWD = /usr/include/pwd.h
Linux:
-mv shadow.h oldshadow.h
touch Linux
$(BINS): Linux
.PRECIOUS: libshadow.a
LIBOBJS = dialchk.o dialup.o encrypt.o salt.o md5crypt.o md5.o getdef.o \
getpass.o commonio.o grdbm.o grent.o groupio.o grpack.o gshadow.o \
gsdbm.o gspack.o sgroupio.o port.o pwdbm.o pwent.o pwio.o pwpack.o \
pwauth.o rad64.o spdbm.o shadow.o shadowio.o sppack.o lockpw.o \
rename.o utent.o list.o strtoday.o basename.o isexpired.o xmalloc.o
libshadow.a: $(LIBOBJS)
$(AR) rc libshadow.a $^
$(RANLIB) libshadow.a
shlib/libshadow.so: $(LIBOBJS)
cd shlib && \
$(MAKE) CC=$(CC) CFLAGS="$(CFLAGS)" LIBOBJS="$(LIBOBJS)" libshadow.so
old-libshadow.a: \
libshadow.a(dialchk.o) \
libshadow.a(dialup.o) \
libshadow.a(encrypt.o) \
libshadow.a(salt.o) \
libshadow.a(md5crypt.o) \
libshadow.a(md5.o) \
libshadow.a(getdef.o) \
libshadow.a(getpass.o) \
libshadow.a(commonio.o) \
libshadow.a(grdbm.o) \
libshadow.a(grent.o) \
libshadow.a(groupio.o) \
libshadow.a(grpack.o) \
libshadow.a(gshadow.o) \
libshadow.a(gsdbm.o) \
libshadow.a(gspack.o) \
libshadow.a(sgroupio.o) \
libshadow.a(port.o) \
libshadow.a(pwdbm.o) \
libshadow.a(pwent.o) \
libshadow.a(pwio.o) \
libshadow.a(pwpack.o) \
libshadow.a(pwauth.o) \
libshadow.a(rad64.o) \
libshadow.a(spdbm.o) \
libshadow.a(shadow.o) \
libshadow.a(shadowio.o) \
libshadow.a(sppack.o) \
libshadow.a(lockpw.o) \
libshadow.a(rename.o) \
libshadow.a(utent.o) \
libshadow.a(list.o) \
libshadow.a(strtoday.o) \
libshadow.a(basename.o) \
libshadow.a(isexpired.o) \
libshadow.a(xmalloc.o)
$(RANLIB) libshadow.a
# these two (from the original Makefile) don't work on Linux, see below
#
#save:
# [ ! -d save ] && mkdir save
# -cp $(LOGINDIR)/login save
# -cp /etc/mkpasswd /etc/pwconv /etc/pwunconv /etc/sulogin /etc/chpasswd \
# /etc/newusers /etc/useradd /etc/userdel /etc/usermod \
# /etc/groupadd /etc/groupdel /etc/groupmod /etc/logoutd \
# /etc/login.defs /etc/pwck /etc/grpck /bin/expiry save
# -cp /bin/su /bin/passwd /bin/gpasswd /bin/dpasswd /bin/faillog \
# /bin/newgrp /bin/chfn /bin/chsh /bin/chage /bin/id \
# /bin/scologin save
# -cp $(DEST_INCLUDE_DIR)/dialup.h $(DEST_INCLUDE_DIR)/gshadow.h save
#
#restore:
# [ -d save ]
# -(cd save ; cp login $(LOGINDIR) )
# -(cd save ; -cp mkpasswd pwconv pwunconv sulogin chpasswd \
# newusers useradd userdel usermod groupadd groupdel groupmod \
# logoutd login.defs pwck grpck /etc)
# -(cd save ; cp su passwd gpasswd dpasswd faillog newgrp chfn chsh \
# chage id scologin expiry /bin)
# -(cd save ; cp gshadow.h dialup.h $(DEST_INCLUDE_DIR) )
# automatic pathnames detection, thanks to Rafal Maszkowski
# (not tested by me; it is best to have a good backup anyway... --marekm)
save:
-( [ ! -d save ] && mkdir save )
-( whereis -b id groups chfn chsh chage login login-static sulogin \
newusers useradd userdel usermod groupadd groupdel \
groupmod pwck grpck lastlog faillog dpasswd chpasswd \
logoutd mkpasswd pwconv pwunconv su passwd gpasswd \
newgrp expiry | awk '{if ($$2!="") print $$2}' > save/list )
-( cat save/list | awk '{print "cp -p", $$1, "save"}' | sh )
-cp -p /etc/login.defs save
-cp -p $(includedir)/dialup.h $(includedir)/gshadow.h save
-cp -p $(libdir)/libshadow.a save
restore:
[ -d save ]
-( cd save ; cp -p login.defs /etc ; \
cp -p dialup.h gshadow.h $(includedir) ; \
cp -p libshadow.a $(libdir) )
-( cat save/list | awk '{ last=split($$1,comp,"/"); print "cp -p", comp[last], $$1}' | sh)
install: all
test -f /etc/login.defs || cp login.defs.linux $(DEST_LOGIN_DEFS)
install -d $(man1dir)
install -d $(man3dir)
# install -d $(man4dir)
install -d $(man5dir)
install -d $(man8dir)
install -d $(usrbindir)
install -d $(usrsbindir)
install -d $(LOGINDIR)
install -d $(bindir)
install -d $(includedir)
install -d $(libdir)
install -m 644 $(MAN_1) $(man1dir)/
install -m 644 $(MAN_3) $(man3dir)/
# install -m 644 $(MAN_4) $(man4dir)/
install -m 644 $(MAN_5) $(man5dir)/
install -m 644 $(MAN_8) $(man8dir)/
# install -m 755 id groups $(usrbindir)/
install -m 4755 chfn chsh chage $(usrbindir)/
install $(login_perms) login $(LOGINDIR)/login
# install $(login_perms) login-static $(LOGINDIR)/login-static
install -m 755 sulogin $(sbindir)/sulogin
install -m 755 newusers \
useradd userdel usermod groupadd groupdel groupmod \
pwck grpck lastlog faillog dpasswd \
chpasswd logoutd mkpasswd pwconv pwunconv $(usrsbindir)/
install -m 4755 su $(bindir)/
install -m 4755 passwd gpasswd newgrp expiry $(usrbindir)/
ln -sf $(usrbindir)/newgrp $(bindir)/sg
install -m 644 gshadow.h dialup.h $(includedir)/
install -m 644 libshadow.a $(libdir)/
$(RANLIB) $(libdir)/libshadow.a
lint: su.lint login.lint pwconv.lint pwunconv.lint passwd.lint sulogin.lint \
faillog.lint newgrp.lint gpasswd.lint mkpasswd.lint chfn.lint \
chsh.lint chage.lint dpasswd.lint id.lint useradd.lint userdel.lint \
usermod.lint groupadd.lint groupdel.lint groupmod.lint logoutd.lint \
pwck.lint grpck.lint expiry.lint \
$(ALLSRCS:.c=.L)
tags: $(ALLSRCS)
$(TAGS) $(ALLSRCS)
README:
[ -f s.README ] && $(GET) $(GFLAGS) s.README
$(DOCS):
[ -f s.$@ ] && $(GET) $(GFLAGS) s.$@
login.defs:
[ -f s.login.defs ] && $(GET) $(GFLAGS) s.login.defs
Makefile.sun4:
[ -f s.Makefile.sun4 ] && $(GET) $(GFLAGS) s.Makefile.sun4
Makefile.svr4:
[ -f s.Makefile.svr4 ] && $(GET) $(GFLAGS) s.Makefile.svr4
README.sun4:
[ -f s.README.sun4 ] && $(GET) $(GFLAGS) s.README.sun4
config.h.sun4:
[ -f s.config.h.sun4 ] && $(GET) $(GFLAGS) s.config.h.sun4
config.h.svr4:
[ -f s.config.h.svr4 ] && $(GET) $(GFLAGS) s.config.h.svr4
login: $(LOBJS) $(LIBSHADOW)
$(CC) -o login $(LDFLAGS) $(LOBJS) $(LIBSHADOW) $(LIBS)
login-static: $(LOBJS) libshadow.a
$(CC) -o login-static $(STATIC) $(LDFLAGS) $(LOBJS) $(LIBSHADOW) $(LIBS)
login.lint: $(LSRCS)
$(LINT) $(LINTFLAGS) $(LSRCS) > login.lint
su: $(SOBJS) $(LIBSHADOW)
$(CC) -o su $(LDFLAGS) $(SOBJS) $(LIBSHADOW) $(LIBS)
su.lint: $(SSRCS)
$(LINT) $(LINTFLAGS) -DSU $(SSRCS) > su.lint
passwd: $(POBJS) $(LIBSHADOW)
$(CC) -o passwd $(LDFLAGS) $(POBJS) $(LIBSHADOW) $(LIBS) $(CRACKLIB)
passwd.lint: $(PSRCS)
$(LINT) $(LINTFLAGS) -DPASSWD $(PSRCS) > passwd.lint
gpasswd: $(GPOBJS) $(LIBSHADOW)
$(CC) -o gpasswd $(LDFLAGS) $(GPOBJS) $(LIBSHADOW) $(LIBS)
gpasswd.lint: $(GPSRCS)
$(LINT) $(LINTFLAGS) $(GPSRCS) > gpasswd.lint
dpasswd: $(DPOBJS) $(LIBSHADOW)
$(CC) -o dpasswd $(LDFLAGS) $(DPOBJS) $(LIBSHADOW) $(LIBS)
dpasswd.lint: $(DPSRCS)
$(LINT) $(LINTFLAGS) $(DPSRCS) > dpasswd.lint
pwconv: $(PWOBJS) $(LIBSHADOW) config.h
$(CC) -o pwconv $(LDFLAGS) $(PWOBJS) $(LIBSHADOW) $(LIBS)
pwconv.lint: $(PWSRCS) config.h
$(LINT) $(LINTFLAGS) -DPASSWD $(PWSRCS) > pwconv.lint
pwunconv: $(PWUNOBJS) $(LIBSHADOW) config.h
$(CC) -o pwunconv $(LDFLAGS) $(PWUNOBJS) $(LIBSHADOW) $(LIBS)
pwunconv.lint: $(PWUNSRCS)
$(LINT) $(LINTFLAGS) -DPASSWD $(PWUNSRCS) > pwunconv.lint
sulogin: $(SULOGOBJS) $(LIBSHADOW)
$(CC) -o sulogin $(LDFLAGS) $(SULOGOBJS) $(LIBSHADOW) $(LIBS)
sulogin.lint: $(SULOGSRCS)
$(LINT) $(LINTFLAGS) $(SULOGSRCS) > sulogin.lint
faillog: faillog.o
$(CC) -o faillog $(LDFLAGS) faillog.o $(LIBS)
faillog.lint: faillog.c faillog.h config.h
$(LINT) $(LINTFLAGS) faillog.c > faillog.lint
lastlog: lastlog.o
$(CC) -o lastlog $(LDFLAGS) lastlog.o $(LIBS)
lastlog.lint: lastlog.c config.h lastlog.h
$(LINT) $(LINTFLAGS) $(MKPWDSRCS) > lastlog.lint
mkpasswd: $(MKPWDOBJS) $(LIBSHADOW)
$(CC) -o mkpasswd $(LDFLAGS) $(MKPWDOBJS) $(LIBSHADOW) $(LIBS)
mkpasswd.lint: $(MKPWDSRCS)
$(LINT) $(LINTFLAGS) $(MKPWDSRCS) > mkpasswd.lint
newgrp: $(NGOBJS) $(LIBSHADOW)
$(CC) -o newgrp $(LDFLAGS) $(NGOBJS) $(LIBSHADOW) $(LIBS)
newgrp.lint: $(NGSRCS)
$(LINT) $(LINTFLAGS) $(NGSRCS) > newgrp.lint
sg: newgrp
rm -f sg
ln newgrp sg
sg.lint: newgrp.lint
ln newgrp.lint sg.lint
chfn: $(CHFNOBJS) $(LIBSHADOW)
$(CC) -o chfn $(LDFLAGS) $(CHFNOBJS) $(LIBSHADOW) $(LIBS)
chfn.lint: $(CHFNSRCS)
$(LINT) $(LINTFLAGS) $(CHFNSRCS) > chfn.lint
chsh: $(CHSHOBJS) $(LIBSHADOW)
$(CC) -o chsh $(LDFLAGS) $(CHSHOBJS) $(LIBSHADOW) $(LIBS)
chsh.lint: $(CHSHSRCS)
$(LINT) $(LINTFLAGS) $(CHSHSRCS) > chsh.lint
chage: $(CHAGEOBJS) $(LIBSHADOW)
$(CC) -o chage $(LDFLAGS) $(CHAGEOBJS) $(LIBSHADOW) $(LIBS)
chage.lint: $(CHAGESRCS)
$(LINT) $(LINTFLAGS) -DPASSWD $(CHAGESRCS) > chage.lint
chpasswd: $(CHPASSOBJS) $(LIBSHADOW)
$(CC) -o chpasswd $(LDFLAGS) $(CHPASSOBJS) $(LIBSHADOW) $(LIBS)
chpasswd.lint: $(CHPASSSRCS)
$(LINT) $(LINTFLAGS) $(CHPASSSRCS) > chpasswd.lint
newusers: newusers.o $(LIBSHADOW)
$(CC) -o newusers $(LDFLAGS) newusers.o $(LIBSHADOW) $(LIBS)
newusers.lint: newusers.c
$(LINT) $(LINTFLAGS) newusers.c > newusers.lint
id: id.o $(LIBSHADOW)
$(CC) -o id $(LDFLAGS) id.o $(LIBSHADOW) $(LIBS)
id.lint: id.c
$(LINT) $(LINTFLAGS) id.c > id.lint
groups: groups.o $(LIBSHADOW)
$(CC) -o groups $(LDFLAGS) groups.o $(LIBSHADOW) $(LIBS)
groups.lint: groups.c
$(LINT) $(LINTFLAGS) groups.c > groups.lint
useradd: useradd.o copydir.o mkrmdir.o $(LIBSHADOW)
$(CC) -o useradd $(LDFLAGS) useradd.o copydir.o mkrmdir.o \
$(LIBSHADOW) $(LIBS) $(NDIR)
useradd.lint: useradd.c copydir.c mkrmdir.c
$(LINT) $(LINTFLAGS) useradd.c copydir.c mkrmdir.c > useradd.lint
userdel: userdel.o copydir.o mkrmdir.o $(LIBSHADOW)
$(CC) -o userdel $(LDFLAGS) userdel.o copydir.o mkrmdir.o \
$(LIBSHADOW) $(LIBS) $(NDIR)
userdel.lint: userdel.c copydir.c mkrmdir.c
$(LINT) $(LINTFLAGS) userdel.c copydir.c mkrmdir.c > userdel.lint
usermod: usermod.o copydir.o mkrmdir.o chowndir.o $(LIBSHADOW)
$(CC) -o usermod $(LDFLAGS) usermod.o copydir.o mkrmdir.o \
chowndir.o $(LIBSHADOW) $(LIBS) $(NDIR)
usermod.lint: usermod.c copydir.c mkrmdir.c chowndir.c
$(LINT) $(LINTFLAGS) usermod.c copydir.c mkrmdir.c \
chowndir.c > usermod.lint
groupadd: groupadd.o chkgname.o $(LIBSHADOW)
$(CC) -o groupadd $(LDFLAGS) groupadd.o chkgname.o $(LIBSHADOW) $(LIBS)
groupadd.lint: groupadd.c
$(LINT) $(LINTFLAGS) groupadd.c > groupadd.lint
groupdel: groupdel.o $(LIBSHADOW)
$(CC) -o groupdel $(LDFLAGS) groupdel.o $(LIBSHADOW) $(LIBS)
groupdel.lint: groupdel.c
$(LINT) $(LINTFLAGS) groupdel.c > groupdel.lint
groupmod: groupmod.o chkgname.o $(LIBSHADOW)
$(CC) -o groupmod $(LDFLAGS) groupmod.o chkgname.o $(LIBSHADOW) $(LIBS)
groupmod.lint: groupmod.c
$(LINT) $(LINTFLAGS) groupmod.c > groupmod.lint
logoutd: logoutd.o $(LIBSHADOW)
$(CC) -o logoutd $(LDFLAGS) logoutd.o $(LIBSHADOW)
logoutd.lint: logoutd.c
$(LINT) $(LINTFLAGS) logoutd.c > logoutd.lint
pwck: pwck.o $(LIBSHADOW)
$(CC) -o pwck $(LDFLAGS) pwck.o $(LIBSHADOW) $(LIBS)
pwck.lint: pwck.c
$(LINT) $(LINTFLAGS) pwck.c > pwck.lint
grpck: grpck.o $(LIBSHADOW)
$(CC) -o grpck $(LDFLAGS) grpck.o $(LIBSHADOW) $(LIBS)
grpck.lint: grpck.c
$(LINT) $(LINTFLAGS) grpck.c > grpck.lint
expiry: expiry.o age.o setugid.o $(LIBSHADOW)
$(CC) -o expiry $(LDFLAGS) expiry.o age.o setugid.o $(LIBSHADOW) $(LIBS)
expiry.lint: expiry.c
$(LINT) $(LINTFLAGS) expiry.c > expiry.lint
sulog.o: config.h
scologin: scologin.o
$(CC) -o scologin $(LDFLAGS) scologin.o -lsocket
passwd.o: config.h $(SHADOW) $(PWD) pwauth.h
lmain.o: config.h lastlog.h faillog.h $(PWD) pwauth.h
smain.o: config.h lastlog.h $(PWD) $(SHADOW) pwauth.h
sub.o: $(PWD)
setup.o: config.h $(PWD)
mkrmdir.o: config.h
utmp.o: config.h
mail.o: config.h
motd.o: config.h
age.o: config.h gshadow.h $(PWD)
log.o: config.h lastlog.h $(PWD)
lastlog.o: lastlog.h
shell.o: config.h
entry.o: config.h $(SHADOW) $(PWD)
hushed.o: config.h $(PWD)
valid.o: config.h $(PWD)
failure.o: faillog.h config.h
faillog.o: faillog.h config.h $(PWD)
newgrp.o: config.h gshadow.h $(SHADOW) $(PWD)
mkpasswd.o: config.h gshadow.h $(SHADOW) $(PWD)
gpmain.o: config.h gshadow.h $(PWD)
chfn.o: config.h $(PWD)
chsh.o: config.h $(PWD)
chage.o: config.h $(SHADOW) $(PWD)
pwconv.o: config.h $(SHADOW)
pwunconv.o: config.h $(SHADOW) $(PWD)
chpasswd.o: config.h $(SHADOW) $(PWD)
id.o: $(PWD)
newusers.o: config.h $(SHADOW) $(PWD)
dpmain.o: config.h dialup.h
useradd.o: config.h gshadow.h $(SHADOW) $(PWD) pwauth.h
userdel.o: config.h gshadow.h $(SHADOW) $(PWD) pwauth.h
usermod.o: config.h gshadow.h $(SHADOW) $(PWD) pwauth.h
groupadd.o: config.h gshadow.h
groupdel.o: config.h gshadow.h
groupmod.o: config.h gshadow.h
logoutd.o: config.h
sulogin.o: config.h pwauth.h
copydir.o: config.h
chowndir.o: config.h
pwck.o: config.h $(SHADOW) $(PWD)
grpck.o: config.h gshadow.h $(PWD)
$(LIBSHADOW)(shadow.o): $(SHADOW) config.h
$(LIBSHADOW)(shadowio.o): $(SHADOW) config.h
$(LIBSHADOW)(grent.o): config.h gshadow.h
$(LIBSHADOW)(groupio.o): config.h
$(LIBSHADOW)(sgroupio.o): config.h gshadow.h
$(LIBSHADOW)(dialup.o): dialup.h
$(LIBSHADOW)(dialchk.o): dialup.h config.h
$(LIBSHADOW)(getdef.o): config.h
$(LIBSHADOW)(pwdbm.o): config.h $(PWD)
$(LIBSHADOW)(spdbm.o): config.h $(SHADOW)
$(LIBSHADOW)(grdbm.o): config.h
$(LIBSHADOW)(gshadow.o): config.h
$(LIBSHADOW)(gsdbm.o): config.h gshadow.h
$(LIBSHADOW)(pwauth.o): config.h pwauth.h
$(LIBSHADOW)(pwpack.o): config.h $(PWD)
$(LIBSHADOW)(pwent.o): config.h $(PWD)
$(LIBSHADOW)(pwio.o): $(PWD) config.h
$(LIBSHADOW)(getpass.o): config.h
$(LIBSHADOW)(encrypt.o): config.h
$(LIBSHADOW)(salt.o): config.h
$(LIBSHADOW)(md5crypt.o): config.h
$(LIBSHADOW)(md5.o): config.h
$(LIBSHADOW)(port.o): port.h
$(LIBSHADOW)(rad64.o): config.h
$(LIBSHADOW)(lockpw.o):
$(LIBSHADOW)(rename.o): config.h
$(LIBSHADOW)(gspack.o): config.h gshadow.h
$(LIBSHADOW)(list.o):
$(LIBSHADOW)(strtoday.o): config.h
$(LIBSHADOW)(xmalloc.o):
$(LIBSHADOW)(basename.o):
$(LIBSHADOW)(isexpired.o): config.h $(SHADOW)
$(LIBSHADOW)(commonio.o):
shadow.h:
-rm -f Linux
-mv oldshadow.h shadow.h
clean: shadow.h
-rm -f *.o a.out core npasswd nshadow *.pag *.dir
clobber: clean
-rm -f $(BINS) *.lint *.L libshadow.a
nuke: clobber
-for file in * ; do \
if [ -f s.$$file -a ! -f p.$$file ] ; then \
rm -f $$file ;\
fi ;\
done
# File lists for this are out of sync with reality... --marekm
#
#shar: login.sh.01 login.sh.02 login.sh.03 login.sh.04 login.sh.05 \
# login.sh.06 login.sh.07 login.sh.08 login.sh.09 login.sh.10 \
# login.sh.11 login.sh.12
#
#login.sh.01: $(FILES1) Makefile
# shar -Dc $(FILES1) > login.sh.01
#
#login.sh.02: $(FILES2) Makefile
# shar -Dc $(FILES2) > login.sh.02
#
#login.sh.03: $(FILES3) Makefile
# shar -Dc $(FILES3) > login.sh.03
#
#login.sh.04: $(FILES4) Makefile
# shar -Dc $(FILES4) > login.sh.04
#
#login.sh.05: $(FILES5) Makefile
# shar -Dc $(FILES5) > login.sh.05
#
#login.sh.06: $(FILES6) Makefile
# shar -Dc $(FILES6) > login.sh.06
#
#login.sh.07: $(FILES7) Makefile
# shar -Dc $(FILES7) > login.sh.07
#
#login.sh.08: $(FILES8) Makefile
# shar -Dc $(FILES8) > login.sh.08
#
#login.sh.09: $(FILES9) Makefile
# shar -Dc $(FILES9) > login.sh.09
#
#login.sh.10: $(DOCS1) Makefile
# shar -Dc $(DOCS1) > login.sh.10
#
#login.sh.11: $(DOCS2) Makefile
# shar -Dc $(DOCS2) > login.sh.11
#
#login.sh.12: $(FILES_SUN4) $(FILES_SVR4) $(FILES_LINUX) Makefile
# shar -Dc $(FILES_SUN4) $(FILES_SVR4) $(FILES_LINUX) > login.sh.12