File: common.mk

package info (click to toggle)
sanlock 3.8.2-2
  • links: PTS
  • area: main
  • in suites: bullseye
  • size: 2,024 kB
  • sloc: ansic: 25,909; sh: 1,251; python: 1,099; makefile: 362
file content (31 lines) | stat: -rw-r--r-- 683 bytes parent folder | download | duplicates (3)
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
export CC ?= cc

check = $(shell echo "int main() { return 0; }" \
		| $(CC) $(1) -xc - >&/dev/null && echo $(1) ||:)

export CFLAGS += -D_GNU_SOURCE -O2 -ggdb \
	-Wall \
	-Wformat \
	-Wformat-security \
	-Wmissing-prototypes \
	-Wnested-externs \
	-Wpointer-arith \
	-Wextra \
	-Wshadow \
	-Wcast-align \
	-Wwrite-strings \
	-Waggregate-return \
	-Wstrict-prototypes \
	-Winline \
	-Wredundant-decls \
	-Wno-sign-compare \
	-Wno-unused-parameter \
	-Wp,-D_FORTIFY_SOURCE=2 \
	-Wno-strict-overflow \
	-fexceptions \
	-fasynchronous-unwind-tables \
	-fdiagnostics-show-option \
	-Wp,-D_GLIBCXX_ASSERTIONS \
	-fstack-protector-strong \
	$(check -fstack-clash-protection) \
	-Wl,-z,now