aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
blob: 0dc11a2d0def132989e735fb05d6e15d355a402e (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
38
39
40
.POSIX:

CONFIGFILE = config.mk
include $(CONFIGFILE)

OBJ =\
	calibrator.o\
	drmgamma.o\
	framebuffer.o\
	gamma.o\
	state.o

HDR = common.h

all: crt-calibrator
$(OBJ): $(@:.o=.c) $(HDR)

crt-calibrator: $(OBJ)
	$(CC) -o $@ $(OBJ) $(LDFLAGS)

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

install: crt-calibrator
	mkdir -p -- "$(DESTDIR)$(PREFIX)/bin"
	mkdir -p -- "$(DESTDIR)$(MANPREFIX)/man1"
	cp -- crt-calibrator "$(DESTDIR)$(PREFIX)/bin/"
	cp -- crt-calibrator.1 "$(DESTDIR)$(MANPREFIX)/man1/"

uninstall:
	-rm -- "$(DESTDIR)$(BINDIR)/crt-calibrator"
	-rm -- "$(DESTDIR)$(MAN1DIR)/crt-calibrator.1"

clean:
	-rm -rf -- crt-calibrator *.o

.SUFFIXES:
.SUFFIXES: .o .c

.PHONY: all install uninstall clean