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

CONFIGFILE = config.mk
include $(CONFIGFILE)


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\
	solar.o\
	systemtime.o

HDR =\
	common.h\
	solar.h

PACKAGE_STRING = redshift-ng 1.13


all: redshift
$(OBJ): $(HDR)

.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