1 # ii - irc it - simple but flexible IRC client
2 # (C)opyright MMV-MMVI Anselm R. Garbe
3 # (C)opyright MMV-MMVII Anselm R. Garbe, Nico Golde
8 .SUFFIXES
: .in
.1 .1 .1.html
.1.txt
10 DOCSRC
= doc
/ # Should end with a slash.
11 CSRCS
= ii.c wrapper.c
12 MANSRCS
= ${DOCSRC}ii.in
.1 ${DOCSRC}wrapper.in
.1
14 all: options
${CSRCS
:.c
=} ${MANSRCS
:.in
.1=.1}
15 @echo Built the sources and formatted the manpages.
19 @echo
"LIBS = ${LIBS}"
20 @echo
"INCLUDES = ${INCLUDES}"
21 @echo
"CFLAGS = ${CFLAGS}"
22 @echo
"LDFLAGS = ${LDFLAGS}"
25 # Building the sources:
28 @
${CC} -c
${CFLAGS} $<
32 @
${CC} -o
$@
$< ${LDFLAGS}
36 # Formatting the manpages:
44 @mandoc
-Thtml
-Wall
-fstrict
$< >$@
48 @mandoc
-Wall
-fstrict
$< | col
-b
>$@
50 format
: ${MANSRCS
:.in
.1=.1.txt
} ${MANSRCS
:.in
.1=.1.html
}
53 @mkdir
-p
${PROJECT}-${VERSION}/${DOCSRC}
54 @cp
-R query.sh Makefile CHANGES README LICENSE config.mk
${CSRCS} \
56 @cp
-R
${DOCSRC}FAQ
${MANSRCS} ${MANSRCS
:.in
.1=.1.txt
} \
57 ${MANSRCS
:.in
.1=.1.html
} ${PROJECT}-${VERSION}/${DOCSRC}
58 @
tar -cf
${PROJECT}-${VERSION}.
tar ${PROJECT}-${VERSION}
59 @gzip
${PROJECT}-${VERSION}.
tar
60 @
rm -rf
${PROJECT}-${VERSION}
61 @echo Created distribution
${PROJECT}-${VERSION}.
tar.gz.
64 @mkdir
-p
${DESTDIR}/${DOCDIR}
65 @mkdir
-p
${DESTDIR}/${BINDIR}
66 @mkdir
-p
${DESTDIR}/${MAN1DIR}
68 @
install -d
${DESTDIR}/${BINDIR} ${DESTDIR}/${MAN1DIR}
69 @
install -m
644 CHANGES README query.sh
${DOCSRC}FAQ LICENSE \
71 @
install -m
775 ${CSRCS
:.c
=} ${DESTDIR}/${BINDIR}
72 @
install -m
444 ${MANSRCS
:.in
.1=.1} ${DESTDIR}/${MAN1DIR}
73 @echo Installed everything.
76 .for mansrc in
${MANSRCS
:.in
.1=.1}
77 @
rm -f
${DESTDIR}/${MAN1DIR}/`basename ${mansrc}`
79 @
rm -rf
${DESTDIR}/${DOCDIR}
80 .for exec in
${CSRCS
:.c
=}
81 @
rm -f
${DESTDIR}/${BINDIR}/${exec}
83 @echo Uninstalled everything.
86 rm -f
${CSRCS
:.c
=} */*~
*.o
*core
*.
tar.gz
${MANSRCS
:.in
.1=.1} \
87 ${MANSRCS
:.in
.1=.1.txt
} ${MANSRCS
:.in
.1=.1.html
}