-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
42 lines (34 loc) · 1.15 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
# makefile for qmail-chkpw (checkpassword tool)
#
TARGET=qmail-chkpw
BINDIR=`head -1 conf-qmail`/bin
MANDIR=`head -1 conf-qmail`/man
SRCS=main.c md5c.c hmac_md5.c
MAKEFILE=Makefile
OBJS=${SRCS:.c=.o}
CC=gcc
#CFLAGS=-c `cat conf-libs` `cat conf-cc` -O3 #-Wall
CFLAGS=-c `cat conf-cc` -O3 #-Wall
LD=gcc
#LDFLAGS=-g `cat conf-libs` -o ${TARGET}
LDFLAGS=`cat conf-libs` -o ${TARGET}
default: clean main man qmail-chkpw
main: configure qmail-chkpw.c conf-qmail
sed s}QMAILHOME}"`head -1 conf-qmail`"}g qmail-chkpw.c > main.c
./configure
man: qmail-chkpw.man conf-qmail
sed s}QMAILHOME}"`head -1 conf-qmail`"}g qmail-chkpw.man > qmail-chkpw.8
qmail-chkpw: main.c ${OBJS}
${LD} ${LDFLAGS} ${OBJS}
clean:
rm -f ${OBJS} ${CODEOBJS} ${GENOBJS} ${TARGET} *~ core main.c \
qmail-chkpw.8 crypto.lib conf-cc conf-libs trylib.o trylib
setup:
install ${TARGET} ${BINDIR}
chown qmaild ${BINDIR}/${TARGET}
mkdir -p ${MANDIR}/man{1,8}
cp cmd5checkpw.8 `head -1 conf-man`/man8
cp qmail-chkpw.8 `head -1 conf-man`/man1
cp -n smtpauth `head -1 conf-qmail`/users/smtpauth
chown qmaild:qmail `head -1 conf-qmail`/users/smtpauth
chmod 600 `head -1 conf-qmail`/users/smtpauth