diff options
author | 2022-06-30 09:00:15 -0400 | |
---|---|---|
committer | 2022-06-30 09:00:15 -0400 | |
commit | 70aaf6fea40ac4f4f28094cad639ec4c00897843 (patch) | |
tree | b3013b4abeaf00cde4ab63f90bdc91ef8e6520a9 /src/common.mk | |
parent | test/fs: enable private-lib in firejail.config (diff) | |
parent | makefiles: add generated files as dependencies (diff) | |
download | firejail-70aaf6fea40ac4f4f28094cad639ec4c00897843.tar.gz firejail-70aaf6fea40ac4f4f28094cad639ec4c00897843.tar.zst firejail-70aaf6fea40ac4f4f28094cad639ec4c00897843.zip |
Merge pull request #5219 from kmk3/build-reduce-config-files
build: reduce autoconf input files from 32 to 2
Diffstat (limited to 'src/common.mk')
-rw-r--r-- | src/common.mk | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/common.mk b/src/common.mk new file mode 100644 index 000000000..07b5e373d --- /dev/null +++ b/src/common.mk | |||
@@ -0,0 +1,16 @@ | |||
1 | # Common definitions for building C programs and non-shared objects. | ||
2 | # | ||
3 | # Note: "ROOT" must be defined before including this file. | ||
4 | |||
5 | -include $(ROOT)/config.mk | ||
6 | |||
7 | H_FILE_LIST = $(sort $(wildcard *.h)) | ||
8 | C_FILE_LIST = $(sort $(wildcard *.c)) | ||
9 | OBJS = $(C_FILE_LIST:.c=.o) | ||
10 | BINOBJS = $(foreach file, $(OBJS), $file) | ||
11 | |||
12 | CFLAGS += -ggdb $(HAVE_FATAL_WARNINGS) -O2 -DVERSION='"$(VERSION)"' $(HAVE_GCOV) | ||
13 | CFLAGS += -DPREFIX='"$(prefix)"' -DSYSCONFDIR='"$(sysconfdir)/firejail"' -DLIBDIR='"$(libdir)"' -DBINDIR='"$(bindir)"' -DVARDIR='"/var/lib/firejail"' | ||
14 | CFLAGS += $(MANFLAGS) | ||
15 | CFLAGS += -fstack-protector-all -D_FORTIFY_SOURCE=2 -fPIE -Wformat -Wformat-security | ||
16 | LDFLAGS += -pie -fPIE -Wl,-z,relro -Wl,-z,now | ||