File: Makefile

package info (click to toggle)
pwauth 2.3.11-6
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 284 kB
  • sloc: ansic: 1,116; makefile: 85; perl: 22
file content (66 lines) | stat: -rw-r--r-- 2,177 bytes parent folder | download | duplicates (5)
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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
# The following three lines should be modified to appropriate values for your
# system.  Most of the configurable stuff is in config.h
#
#   CC=       an ansi-C compiler.  If "cc" doesn't work, try "gcc".
#   LIB=      libraries to link in.  -lcrypt, -lshadow, -lpam sometimes needed.
#   LOCALFLAGS=   compiler flags.  Usually -g, -O, and stuff like that.

# Settings for author's system (Redhat 6.1)
CC=gcc
LIB= -lpam
LOCALFLAGS:= -g $(CFLAGS) $(CPPFLAGS)

prefix=/usr
sbindir=$(prefix)/sbin

# -------------------- No User Servicable Parts Below -----------------------

TAR= README INSTALL CHANGES FORM_AUTH Makefile main.c checkfaillog.c \
	fail_check.c fail_log.c lastlog.c nologin.c snooze.c auth_aix.c \
	auth_bsd.c auth_hpux.c auth_mdw.c auth_openbsd.c auth_pam.c \
	auth_sun.c config.h fail_log.h pwauth.h unixgroup

.PHONY: clean distclean

programs = pwauth checkfaillog unixgroup
all: $(programs)

CFLAGS= $(LOCALFLAGS)

pwauth: main.o auth_aix.o auth_bsd.o auth_hpux.o auth_mdw.o auth_openbsd.o \
	auth_pam.o auth_sun.o fail_log.o lastlog.o nologin.o snooze.o
	$(CC) -o pwauth $(CFLAGS) $(LDFLAGS) main.o auth_aix.o auth_bsd.o auth_hpux.o \
		auth_mdw.o auth_openbsd.o auth_pam.o auth_sun.o fail_log.o \
		lastlog.o nologin.o snooze.o $(LIB)

checkfaillog: checkfaillog.o fail_check.o
	$(CC) -o checkfaillog $(CFLAGS) $(LDFLAGS) checkfaillog.o fail_check.o $(LIB)

main.o: main.c config.h pwauth.h fail_log.h
auth_aix.o: auth_aix.c config.h pwauth.h
auth_bsd.o: auth_bsd.c config.h pwauth.h
auth_hpux.o: auth_hpux.c config.h pwauth.h
auth_mdw.o: auth_mdw.c config.h pwauth.h
auth_openbsd.o: auth_openbsd.c config.h
auth_pam.o: auth_pam.c config.h pwauth.h
auth_sun.o: auth_sun.c config.h pwauth.h
checkfaillog.o: checkfaillog.c config.h fail_log.h
fail_check.o: fail_check.c config.h fail_log.h
fail_log.o: fail_log.c config.h pwauth.h fail_log.h
lastlog.o: lastlog.c config.h pwauth.h
nologin.o: nologin.c config.h pwauth.h
snooze.o: snooze.c config.h pwauth.h


clean:
	$(MAKE) distclean

distclean:
	rm -f *.o pwauth checkfaillog

pwauth.tar: $(TAR)
	tar cvf pwauth.tar $(TAR)

install:
	mkdir -p $(DESTDIR)$(sbindir)
	install $(programs) $(DESTDIR)$(sbindir)