1# 2# Copyright (c) 2000,2001 by Solar Designer. See LICENSE. 3# 4 5CC = gcc 6LD = ld 7RM = rm -f 8MKDIR = mkdir -p 9INSTALL = install 10CFLAGS = -c -Wall -fPIC -DHAVE_SHADOW -O2 11LDFLAGS = -s -lpam -lcrypt --shared 12LDFLAGS_SUN = -s -lpam -lcrypt -G 13 14TITLE = pam_passwdqc 15LIBSHARED = $(TITLE).so 16SHLIBMODE = 755 17SECUREDIR = /lib/security 18FAKEROOT = 19 20PROJ = $(LIBSHARED) 21OBJS = pam_passwdqc.o passwdqc_check.o passwdqc_random.o wordset_4k.o 22 23all: 24 if [ "`uname -s`" = "SunOS" ]; then \ 25 make LDFLAGS="$(LDFLAGS_SUN)" $(PROJ); \ 26 else \ 27 make $(PROJ); \ 28 fi 29 30$(LIBSHARED): $(OBJS) 31 $(LD) $(LDFLAGS) $(OBJS) -o $(LIBSHARED) 32 33.c.o: 34 $(CC) $(CFLAGS) $*.c 35 36pam_passwdqc.o: passwdqc.h pam_macros.h 37passwdqc_check.o: passwdqc.h 38passwdqc_random.o: passwdqc.h 39 40install: 41 $(MKDIR) $(FAKEROOT)$(SECUREDIR) 42 $(INSTALL) -m $(SHLIBMODE) $(LIBSHARED) $(FAKEROOT)$(SECUREDIR) 43 44remove: 45 $(RM) $(FAKEROOT)$(SECUREDIR)/$(TITLE).so 46 47clean: 48 $(RM) $(PROJ) *.o 49