aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/Makefile
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/lib/Makefile
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/lib/Makefile')
-rw-r--r--src/lib/Makefile12
1 files changed, 0 insertions, 12 deletions
diff --git a/src/lib/Makefile b/src/lib/Makefile
index 121aae4bd..4e44eae62 100644
--- a/src/lib/Makefile
+++ b/src/lib/Makefile
@@ -3,19 +3,7 @@ ROOT = ../..
3 3
4TARGET = lib 4TARGET = lib
5 5
6.PHONY: all
7all: $(TARGET)
8
9include $(ROOT)/src/common.mk 6include $(ROOT)/src/common.mk
10 7
11.PHONY: lib 8.PHONY: lib
12lib: $(OBJS) 9lib: $(OBJS)
13
14%.o : %.c $(HDRS) $(ROOT)/config.mk
15 $(CC) $(CFLAGS) $(EXTRA_CFLAGS) $(INCLUDE) -c $< -o $@
16
17.PHONY: clean
18clean:; rm -fr $(OBJS) *.gcov *.gcda *.gcno *.plist
19
20.PHONY: distclean
21distclean: clean