diff options
author | 2022-06-30 09:00:15 -0400 | |
---|---|---|
committer | 2022-06-30 09:00:15 -0400 | |
commit | 70aaf6fea40ac4f4f28094cad639ec4c00897843 (patch) | |
tree | b3013b4abeaf00cde4ab63f90bdc91ef8e6520a9 /src/libtracelog/Makefile | |
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/libtracelog/Makefile')
-rw-r--r-- | src/libtracelog/Makefile | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/src/libtracelog/Makefile b/src/libtracelog/Makefile new file mode 100644 index 000000000..c5d9c131d --- /dev/null +++ b/src/libtracelog/Makefile | |||
@@ -0,0 +1,24 @@ | |||
1 | ROOT = ../.. | ||
2 | -include $(ROOT)/config.mk | ||
3 | |||
4 | H_FILE_LIST = $(sort $(wildcard *.h)) | ||
5 | C_FILE_LIST = $(sort $(wildcard *.c)) | ||
6 | OBJS = $(C_FILE_LIST:.c=.o) | ||
7 | BINOBJS = $(foreach file, $(OBJS), $file) | ||
8 | CFLAGS += -ggdb $(HAVE_FATAL_WARNINGS) -O2 -DVERSION='"$(VERSION)"' -fstack-protector-all -D_FORTIFY_SOURCE=2 -fPIC -Wformat -Wformat-security | ||
9 | LDFLAGS += -pie -fPIE -Wl,-z,relro -Wl,-z,now | ||
10 | |||
11 | .PHONY: all | ||
12 | all: libtracelog.so | ||
13 | |||
14 | %.o : %.c $(H_FILE_LIST) ../include/rundefs.h $(ROOT)/config.mk | ||
15 | $(CC) $(CFLAGS) $(INCLUDE) -c $< -o $@ | ||
16 | |||
17 | libtracelog.so: $(OBJS) $(ROOT)/config.mk | ||
18 | $(CC) $(LDFLAGS) -shared -fPIC -z relro -o $@ $(OBJS) -ldl | ||
19 | |||
20 | .PHONY: clean | ||
21 | clean:; rm -fr $(OBJS) libtracelog.so *.plist | ||
22 | |||
23 | .PHONY: distclean | ||
24 | distclean: clean | ||