aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
blob: e0dcf97cc148d3e4fbfddb51bf25ce9933d9a01e (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
26
27
28
29
30
31
32
33
34
35
36
37
.POSIX:

CONFIGFILE = config.mk
include $(CONFIGFILE)

OBJ = xcman.o
HDR =

all: xcman
$(OBJ): $(HDR)

xcman: $(OBJ)
	$(CC) -o $@ $(OBJ) $(LDFLAGS)

.c.o:
	$(CC) -c -o $@ $< $(CFLAGS) $(CPPFLAGS)

install: xcman
	mkdir -p -- "$(DESTDIR)$(PREFIX)/bin"
	mkdir -p -- "$(DESTDIR)$(MANPREFIX)/man1"
	mkdir -p -- "$(DESTDIR)$(PREFIX)/share/licenses/xcman"
	cp -- xcman "$(DESTDIR)$(PREFIX)/bin"
	cp -- xcman.1 "$(DESTDIR)$(MANPREFIX)/man1"
	cp -- LICENSE "$(DESTDIR)$(PREFIX)/share/licenses/xcman"

uninstall:
	-rm -f -- "$(DESTDIR)$(PREFIX)/bin/xcman"
	-rm -f -- "$(DESTDIR)$(MANPREFIX)/man1/xcman.1"
	-rm -rf -- "$(DESTDIR)$(PREFIX)/share/licenses/xcman"

clean:
	-rm -f -- xcman

.SUFFIXES:
.SUFFIXES: .c .o

.PHONY: all install uninstall clean