aboutsummaryrefslogtreecommitdiffstats
path: root/redshift/Makefile
blob: 417d0017889aacfbfe9566969e81f96e7f059d5b (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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
.POSIX:

CONFIGFILE = config.mk
include $(CONFIGFILE)


VERSION_STRING = redshift-ng 1.13


OBJ =\
	backend-direct.o\
	colour.o\
	config.o\
	config-ini.o\
	gamma.o\
	gamma-coopgamma.o\
	gamma-drm.o\
	gamma-dummy.o\
	gamma-quartz.o\
	gamma-randr.o\
	gamma-vidmode.o\
	gamma-wingdi.o\
	hooks.o\
	location.o\
	location-geoclue2.o\
	location-manual.o\
	location-geofile.o\
	location-timezone.o\
	redshift.o\
	signals.o\
	util.o


CPPFLAGS_STRINGS =\
	-D'PACKAGE="$(PACKAGE)"'\
	-D'VERSION_STRING="$(VERSION_STRING)"'\
	-D'LOCALEDIR="$(LOCALEDIR)"'


all: redshift
$(OBJ): common.h arg.h

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

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

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

uninstall:
	-rm -f -- "$(DESTDIR)$(PREFIX)/bin/redshift"
	-rm -f -- "$(DESTDIR)$(MANPREFIX)/man1/redshift.1"

clean:
	-rm -f -- *.o *.a *.lo *.su
	-rm -f -- redshift

.SUFFIXES:
.SUFFIXES: .o .c

.PHONY: all install uninstall clean