aboutsummaryrefslogtreecommitdiffstats
path: root/src/Makefile
blob: 9ab321c75a3fd52cec1655e6c482f7339e8ec0af (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
.POSIX:

CONFIGFILE = config.mk
include $(CONFIGFILE)


PACKAGE_STRING = redshift-ng 1.13


OBJ =\
	colorramp.o\
	config-ini.o\
	gamma-coopgamma.o\
	gamma-drm.o\
	gamma-dummy.o\
	gamma-randr.o\
	gamma-vidmode.o\
	hooks.o\
	location-geoclue2.o\
	location-manual.o\
	options.o\
	pipeutils.o\
	redshift.o\
	signals.o\
	systemtime.o


all: redshift
$(OBJ): common.h

.c.o:
	$(CC) -c -o $@ $< $(CFLAGS) $(CPPFLAGS) -D'PACKAGE_STRING="$(PACKAGE_STRING)"'

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