Introduction
Introduction Statistics Contact Development Disclaimer Help
Makefile - gopher-validator - Gopher validator and happy helper
git clone git://git.codemadness.org/gopher-validator
Log
Files
Refs
README
LICENSE
---
Makefile (1338B)
---
1 .POSIX:
2
3 # paths
4 PREFIX = /usr/local
5 MANPREFIX = ${PREFIX}/man
6
7 # compiler and linker
8 CC = cc
9
10 NAME = gopher-validator
11 VERSION = 0.1
12 BIN = ${NAME}
13 SRC = ${BIN:=.c}
14 OBJ = ${BIN:=.o}
15 MAN1 = ${BIN:=.1}
16 DOC = LICENSE README
17
18 # build static: useful in a chroot.
19 #LDFLAGS += -static
20 # Linux
21 #CPPFLAGS += -D_DEFAULT_SOURCE
22
23 all: ${BIN}
24
25 ${BIN}: ${OBJ}
26 ${CC} -o $@ ${OBJ} ${LDFLAGS}
27
28 ${OBJ}: Makefile
29
30 clean:
31 rm -f ${BIN} ${OBJ}
32
33 install:
34 # installing executable files and scripts.
35 mkdir -p "${DESTDIR}${PREFIX}/bin"
36 cp -f ${BIN} "${DESTDIR}${PREFIX}/bin"
37 for f in ${BIN}; do chmod 755 "${DESTDIR}${PREFIX}/bin/$$f"; done
38 # installing manual pages for general commands: section 1.
39 mkdir -p "${DESTDIR}${MANPREFIX}/man1"
40 cp -f ${MAN1} "${DESTDIR}${MANPREFIX}/man1"
41 for m in ${MAN1}; do chmod 644 "${DESTDIR}${MANPREFIX}/man1/$$m"…
42
43 uninstall:
44 # removing executable files and scripts.
45 for f in ${BIN}; do rm -f "${DESTDIR}${PREFIX}/bin/$$f"; done
46 # removing manual pages.
47 for m in ${MAN1}; do rm -f "${DESTDIR}${MANPREFIX}/man1/$$m"; do…
48
49 dist:
50 rm -rf "${NAME}-${VERSION}"
51 mkdir -p "${NAME}-${VERSION}"
52 cp -f ${DOC} ${MAN1} ${SRC} Makefile "${NAME}-${VERSION}"
53 # make tarball
54 tar -cf - "${NAME}-${VERSION}" | \
55 gzip -c > "${NAME}-${VERSION}.tar.gz"
56 rm -rf "${NAME}-${VERSION}"
57
58
59 .PHONY: all clean dist install uninstall
You are viewing proxied material from codemadness.org. The copyright of proxied material belongs to its original authors. Any comments or complaints in relation to proxied material should be directed to the original authors of the content concerned. Please see the disclaimer for more details.