-
Notifications
You must be signed in to change notification settings - Fork 21
/
Makefile
42 lines (29 loc) · 913 Bytes
/
Makefile
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
CC?=gcc
PKG_CONFIG?=pkg-config
CFLAGS?=-g -O2 -Wall
LDFLAGS?=
PREFIX?=/usr/local
DESTDIR?=
# arch hardening
#CPPFLAGS+=-D_FORTIFY_SOURCE=2
#CFLAGS+=-march=x86-64 -mtune=generic -O2 -pipe -fno-plt
#LDFLAGS+=-Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now
# arch & debian hardening workaround
UNAME_S := $(shell uname -s)
ifeq ($(UNAME_S),Linux)
LDFLAGS+=-Wl,--no-as-needed
endif
CFLAGS+=$(shell $(PKG_CONFIG) x11 --cflags)
LDFLAGS+=$(shell $(PKG_CONFIG) x11 --libs)
CFLAGS+=$(shell $(PKG_CONFIG) imlib2 --cflags)
LDFLAGS+=$(shell $(PKG_CONFIG) imlib2 --libs)
CFLAGS+=$(shell $(PKG_CONFIG) xinerama --cflags)
LDFLAGS+=$(shell $(PKG_CONFIG) xinerama --libs)
all: hsetroot hsr-outputs
hsetroot: hsetroot.o
hsr-outputs: hsr-outputs.o
install: hsetroot hsr-outputs
install -Dst $(DESTDIR)$(PREFIX)/bin/ hsetroot
install -Dst $(DESTDIR)$(PREFIX)/bin/ hsr-outputs
clean:
rm -f *.o hsetroot hsr-outputs