-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathstd.mk
More file actions
33 lines (23 loc) · 682 Bytes
/
std.mk
File metadata and controls
33 lines (23 loc) · 682 Bytes
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
# std.mk - included by most Makefiles in subdirs
include ../config.mk
OFILES ?= ${TARG}.$O
MANFILE ?= ${TARG}.1
all: ${TARG}
@echo built ${TARG}
install: install-default post-install
install-default: ${TARG}
@mkdir -p ${DESTDIR}${PREFIX}/bin
@cp -f ${TARG} ${DESTDIR}${PREFIX}/bin/
@chmod 755 ${DESTDIR}${PREFIX}/bin/${TARG}
@mkdir -p ${DESTDIR}${MANPREFIX}/man1
@cp -f ${MANFILE} ${DESTDIR}${MANPREFIX}/man1/
@chmod 444 ${DESTDIR}${MANPREFIX}/man1/${MANFILE}
uninstall: pre-uninstall
rm -f ${DESTDIR}${PREFIX}/bin/${TARG}
rm -f ${DESTDIR}${MANPREFIX}/man1/${MANFILE}
%.$O:%.go
$(GC) -o $@ $^
clean:
rm -f ${OFILES} ${TARG}
${TARG}: ${OFILES}
$(LD) -o $@ $^