diff options
author | Kelvin M. Klann <kmk3.code@protonmail.com> | 2022-05-03 11:03:54 -0300 |
---|---|---|
committer | Kelvin M. Klann <kmk3.code@protonmail.com> | 2022-11-21 17:22:50 -0300 |
commit | 5db2186358c86e6d4e0593228ca389840105ce30 (patch) | |
tree | e651e933f18569720c77bb2472ae2ef9f2fc43fe /src/firecfg | |
parent | makefiles: deduplicate main target name into new PROG var (diff) | |
download | firejail-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/firecfg')
-rw-r--r-- | src/firecfg/Makefile | 15 |
1 files changed, 0 insertions, 15 deletions
diff --git a/src/firecfg/Makefile b/src/firecfg/Makefile index 31e84d864..3d271d875 100644 --- a/src/firecfg/Makefile +++ b/src/firecfg/Makefile | |||
@@ -13,19 +13,4 @@ MOD_HDRS = \ | |||
13 | 13 | ||
14 | MOD_OBJS = ../lib/common.o ../lib/firejail_user.o | 14 | MOD_OBJS = ../lib/common.o ../lib/firejail_user.o |
15 | 15 | ||
16 | .PHONY: all | ||
17 | all: $(TARGET) | ||
18 | |||
19 | include $(ROOT)/src/common.mk | 16 | include $(ROOT)/src/common.mk |
20 | |||
21 | %.o : %.c $(HDRS) $(ROOT)/config.mk | ||
22 | $(CC) $(CFLAGS) $(EXTRA_CFLAGS) $(INCLUDE) -c $< -o $@ | ||
23 | |||
24 | $(PROG): $(OBJS) $(ROOT)/config.mk | ||
25 | $(CC) $(LDFLAGS) -o $@ $(OBJS) $(LIBS) $(EXTRA_LDFLAGS) | ||
26 | |||
27 | .PHONY: clean | ||
28 | clean:; rm -fr *.o $(PROG) *.gcov *.gcda *.gcno *.plist | ||
29 | |||
30 | .PHONY: distclean | ||
31 | distclean: clean | ||