From 5db2186358c86e6d4e0593228ca389840105ce30 Mon Sep 17 00:00:00 2001 From: "Kelvin M. Klann" Date: Tue, 3 May 2022 11:03:54 -0300 Subject: 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. --- src/fseccomp/Makefile | 15 --------------- 1 file changed, 15 deletions(-) (limited to 'src/fseccomp') diff --git a/src/fseccomp/Makefile b/src/fseccomp/Makefile index b4e59be8d..048097621 100644 --- a/src/fseccomp/Makefile +++ b/src/fseccomp/Makefile @@ -7,19 +7,4 @@ TARGET = $(PROG) MOD_HDRS = ../include/common.h ../include/syscall.h MOD_OBJS = ../lib/common.o ../lib/errno.o ../lib/syscall.o -.PHONY: all -all: $(TARGET) - include $(ROOT)/src/common.mk - -%.o : %.c $(HDRS) $(ROOT)/config.mk - $(CC) $(CFLAGS) $(EXTRA_CFLAGS) $(INCLUDE) -c $< -o $@ - -$(PROG): $(OBJS) $(ROOT)/config.mk - $(CC) $(LDFLAGS) -o $@ $(OBJS) $(LIBS) $(EXTRA_LDFLAGS) - -.PHONY: clean -clean:; rm -fr *.o $(PROG) *.gcov *.gcda *.gcno *.plist - -.PHONY: distclean -distclean: clean -- cgit v1.2.3-54-g00ecf