-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
47 lines (34 loc) · 1.23 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
PAM_LIB_DIR = /lib/security
CC = gcc
LD = ld
INSTALL = /usr/bin/install
CFLAGS = -fPIC -O2 -c -g -Wall -Wformat-security
LDFLAGS = -x --shared
PAMLIB = -lpam
CRYPTLIB = -lcrypt
CPPFLAGS =
all: pam_passwdfile.so
pam_passwdfile.so: pam_passwdfile.o bigcrypt.o md5_good.o md5_crypt_good.o md5_broken.o md5_crypt_broken.o
$(LD) $(LDFLAGS) -o pam_passwdfile.so pam_passwdfile.o md5_good.o md5_crypt_good.o md5_broken.o md5_crypt_broken.o bigcrypt.o $(PAMLIB) $(CRYPTLIB)
pam_passwdfile.o: pam_passwdfile.c
$(CC) $(CFLAGS) pam_passwdfile.c
bigcrypt.o: bigcrypt.c
$(CC) $(CFLAGS) bigcrypt.c
md5_good.o: md5.c
$(CC) $(CFLAGS) $(CPPFLAGS) -DHIGHFIRST -D'MD5Name(x)=Good##x' -c $< -o $@
md5_broken.o: md5.c
$(CC) $(CFLAGS) $(CPPFLAGS) -D'MD5Name(x)=Broken##x' \
-c $< -o $@
md5_crypt_good.o: md5_crypt.c
$(CC) $(CFLAGS) $(CPPFLAGS) -D'MD5Name(x)=Good##x' \
-c $< -o $@
md5_crypt_broken.o: md5_crypt.c
$(CC) $(CFLAGS) $(CPPFLAGS) -D'MD5Name(x)=Broken##x' \
-c $< -o $@
install: pam_passwdfile.so
$(INSTALL) -m 0755 -d $(PAM_LIB_DIR)
$(INSTALL) -m 0755 pam_passwdfile.so $(PAM_LIB_DIR)
clean:
rm -f pam_passwdfile.o pam_passwdfile.so *.o
spotless:
rm -f pam_passwdfile.so pam_passwdfile.o *~ core