-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathMake.defs
43 lines (36 loc) · 1 KB
/
Make.defs
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
CC = gcc
INSTALL = install -p
MKDIR = mkdir
# Flag to enable -Werror on build.
WERROR =
# Option to omit the PAM module during build and installation.
# May be needed when bootstrapping new architectures.
OMIT_PAM_MODULE =
# Option to configure the suffix appended to pam_tcb.so.
# May be needed when compiling to use with OpenPAM.
PAM_SO_SUFFIX =
# Flags for hardening.
HARDENING_CFLAGS = -fstack-protector-strong -D_FORTIFY_SOURCE=2
HARDENING_LDFLAGS = -Wl,-z,defs -Wl,-z,relro -Wl,-z,now
DBGFLAG = #-ggdb
ifndef CFLAGS
CFLAGS = -O2
endif
CFLAGS += $(DBGFLAG) -I../include
CFLAGS += -Wall -Wextra
ifneq ($(WERROR),)
CFLAGS += -Werror
endif
#CFLAGS += -DFAIL_RECORD
CFLAGS := $(HARDENING_CFLAGS) $(CFLAGS)
LDFLAGS := $(HARDENING_LDFLAGS) $(LDFLAGS) $(DBGFLAG) -L../libs
PREFIX = /usr
SBINDIR = /sbin
SLIBDIR = /lib
INCLUDEDIR = $(PREFIX)/include
LIBDIR = $(PREFIX)/lib
LIBEXECDIR = $(PREFIX)/libexec
MANDIR = $(PREFIX)/share/man
PKGCONFIGDIR = $(LIBDIR)/pkgconfig
SYSUSERSDIR = $(PREFIX)/lib/sysusers.d
SHLIBMODE = 755