forked from jdberry/tag
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
45 lines (30 loc) · 846 Bytes
/
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
43
44
45
prefix = /usr/local
DSTMODE = 0755
MANMODE = 0644
INSTALL = /usr/bin/install
bindir = ${prefix}/bin
man1dir = ${prefix}/share/man/man1
SRCS = Tag/main.m Tag/Tag.m Tag/TagName.m
LIBS = -framework Foundation \
-framework CoreServices
PROGRAM = bin/tag
MANPAGE = Tag/tag.1
all: tag
tag: ${PROGRAM}
${PROGRAM}: bin ${SRCS} Makefile
${CC} ${CFLAGS} ${SRCS} ${LIBS} -o ${PROGRAM}
bin:
mkdir -p bin
clean:
rm -Rf bin
distclean: clean
install: tag installdirs
${INSTALL} -m ${DSTMODE} ${PROGRAM} ${DESTDIR}${bindir}
${INSTALL} -m ${MANMODE} ${MANPAGE} ${DESTDIR}${man1dir}
installdirs:
mkdir -p ${DESTDIR}${bindir}
mkdir -p ${DESTDIR}${man1dir}
uninstall:
rm -f ${DESTDIR}${bindir}/$(notdir ${PROGRAM})
rm -f ${DESTDIR}${man1dir}/$(notdir ${MANPAGE})
.PHONY: all tag clean distclean install installdirs uninstall