aboutsummaryrefslogtreecommitdiffstats
path: root/src/fnettrace-dns
diff options
context:
space:
mode:
authorLibravatar Kelvin M. Klann <kmk3.code@protonmail.com>2022-05-07 02:38:08 -0300
committerLibravatar Kelvin M. Klann <kmk3.code@protonmail.com>2022-11-21 17:19:00 -0300
commit48c151aa1683de94e42f4410fb9312936e030adf (patch)
tree508b7b9cecb88856a8bcc5117248e923eedc031f /src/fnettrace-dns
parentmakefiles: line-wrap MOD_HDRS and MOD_OBJS (diff)
downloadfirejail-48c151aa1683de94e42f4410fb9312936e030adf.tar.gz
firejail-48c151aa1683de94e42f4410fb9312936e030adf.tar.zst
firejail-48c151aa1683de94e42f4410fb9312936e030adf.zip
makefiles: deduplicate main target name into new PROG var
Put the main target name into a new PROG variable, put PROG into a new TARGET variable, make "all" depend on `$(TARGET)` and replace every other occurrence of the main target name with `$(PROG)`. On the makefiles that build non-shared objects, to make them more similar. With this commit, all of their targets are identical (except for the extra "lib" target on src/lib/Makefile).
Diffstat (limited to 'src/fnettrace-dns')
-rw-r--r--src/fnettrace-dns/Makefile9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/fnettrace-dns/Makefile b/src/fnettrace-dns/Makefile
index 38bb0eb79..0598bb2fe 100644
--- a/src/fnettrace-dns/Makefile
+++ b/src/fnettrace-dns/Makefile
@@ -1,19 +1,22 @@
1ROOT = ../.. 1ROOT = ../..
2-include $(ROOT)/config.mk 2-include $(ROOT)/config.mk
3 3
4PROG = fnettrace-dns
5TARGET = $(PROG)
6
4.PHONY: all 7.PHONY: all
5all: fnettrace-dns 8all: $(TARGET)
6 9
7include $(ROOT)/src/common.mk 10include $(ROOT)/src/common.mk
8 11
9%.o : %.c $(HDRS) $(ROOT)/config.mk 12%.o : %.c $(HDRS) $(ROOT)/config.mk
10 $(CC) $(CFLAGS) $(EXTRA_CFLAGS) $(INCLUDE) -c $< -o $@ 13 $(CC) $(CFLAGS) $(EXTRA_CFLAGS) $(INCLUDE) -c $< -o $@
11 14
12fnettrace-dns: $(OBJS) $(ROOT)/config.mk 15$(PROG): $(OBJS) $(ROOT)/config.mk
13 $(CC) $(LDFLAGS) -o $@ $(OBJS) $(LIBS) $(EXTRA_LDFLAGS) 16 $(CC) $(LDFLAGS) -o $@ $(OBJS) $(LIBS) $(EXTRA_LDFLAGS)
14 17
15.PHONY: clean 18.PHONY: clean
16clean:; rm -fr *.o fnettrace-dns *.gcov *.gcda *.gcno *.plist 19clean:; rm -fr *.o $(PROG) *.gcov *.gcda *.gcno *.plist
17 20
18.PHONY: distclean 21.PHONY: distclean
19distclean: clean 22distclean: clean