aboutsummaryrefslogtreecommitdiff
path: root/Makefile
blob: b4ba764a944c74d1326dbfc5344a45076599d0a8 (plain) (blame)
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
.POSIX:

target  = mstatus

CC	= cc
CFLAGS	= -O3 -std=c11 -pedantic -Wall -Wextra -Wmissing-prototypes -Wstrict-prototypes
LDFLAGS	= -lX11

PREFIX	= /usr/local

all: ${target}
${target}: mstatus.c
	${CC} ${CFLAGS} ${LDFLAGS} -o $@ $<

.PHONY: clean install uninstall
clean:
	rm -f ${target} ${objects}

install:
	mkdir -p ${DESTDIR}${PREFIX}/bin ${DESTDIR}${PREFIX}/share/man/man1
	cp -f ${target} ${DESTDIR}${PREFIX}/bin
	cp -f ${target}.1 ${DESTDIR}${PREFIX}/share/man/man1

uninstall:
	rm -f ${DESTDIR}${PREFIX}/bin/${target} ${DESTDIR}${PREFIX}/share/man/man1/${target}.1