aboutsummaryrefslogtreecommitdiffstats
path: root/src/fsec-optimize
diff options
context:
space:
mode:
authorLibravatar Kelvin M. Klann <kmk3.code@protonmail.com>2022-05-03 11:03:54 -0300
committerLibravatar Kelvin M. Klann <kmk3.code@protonmail.com>2022-11-21 17:22:50 -0300
commit5db2186358c86e6d4e0593228ca389840105ce30 (patch)
treee651e933f18569720c77bb2472ae2ef9f2fc43fe /src/fsec-optimize
parentmakefiles: deduplicate main target name into new PROG var (diff)
downloadfirejail-5db2186358c86e6d4e0593228ca389840105ce30.tar.gz
firejail-5db2186358c86e6d4e0593228ca389840105ce30.tar.zst
firejail-5db2186358c86e6d4e0593228ca389840105ce30.zip
makefiles: deduplicate many makefiles into common.mk
The makefiles that both build C programs and include src/common.mk are nearly identical, save for the main target name and for any extra headers and objects that they might use. So move all of their (duplicated) code into src/common.mk, which (other than the "lib" target on src/lib/Makefile) leaves only variables and the includes of config.mk and src/common.mk in place.
Diffstat (limited to 'src/fsec-optimize')
-rw-r--r--src/fsec-optimize/Makefile15
1 files changed, 0 insertions, 15 deletions
diff --git a/src/fsec-optimize/Makefile b/src/fsec-optimize/Makefile
index 2087c5520..95dd8dc94 100644
--- a/src/fsec-optimize/Makefile
+++ b/src/fsec-optimize/Makefile
@@ -7,19 +7,4 @@ TARGET = $(PROG)
7MOD_HDRS = ../include/common.h ../include/seccomp.h ../include/syscall.h 7MOD_HDRS = ../include/common.h ../include/seccomp.h ../include/syscall.h
8MOD_OBJS = ../lib/common.o ../lib/errno.o 8MOD_OBJS = ../lib/common.o ../lib/errno.o
9 9
10.PHONY: all
11all: $(TARGET)
12
13include $(ROOT)/src/common.mk 10include $(ROOT)/src/common.mk
14
15%.o : %.c $(HDRS) $(ROOT)/config.mk
16 $(CC) $(CFLAGS) $(EXTRA_CFLAGS) $(INCLUDE) -c $< -o $@
17
18$(PROG): $(OBJS) $(ROOT)/config.mk
19 $(CC) $(LDFLAGS) -o $@ $(OBJS) $(LIBS) $(EXTRA_LDFLAGS)
20
21.PHONY: clean
22clean:; rm -fr *.o $(PROG) *.gcov *.gcda *.gcno *.plist
23
24.PHONY: distclean
25distclean: clean