From 897ccd9780c3e217ed6ff6473928c8f3a2f1ee46 Mon Sep 17 00:00:00 2001 From: Hamish Coleman Date: Sun, 30 Apr 2023 19:16:59 -0500 Subject: [PATCH] Stop auto creating the OBJ list, allowing a libn2n that does not contain a main() function --- Makefile | 41 +++++++++++++++++++++++++++++++++++++++-- 1 file changed, 39 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 08633dc..615ea97 100644 --- a/Makefile +++ b/Makefile @@ -64,8 +64,44 @@ MAN7DIR=$(MANDIR)/man7 MAN8DIR=$(MANDIR)/man8 N2N_LIB=libn2n.a -N2N_OBJS=$(patsubst src/%.c, src/%.o, $(wildcard src/*.c)) -N2N_DEPS=$(wildcard include/*.h) $(wildcard src/*.c) Makefile +N2N_OBJS=\ + src/aes.o \ + src/auth.o \ + src/cc20.o \ + src/curve25519.o \ + src/edge_management.o \ + src/edge_utils.o \ + src/edge_utils_win32.o \ + src/header_encryption.o \ + src/hexdump.o \ + src/json.o \ + src/management.o \ + src/minilzo.o \ + src/n2n.o \ + src/n2n_port_mapping.o \ + src/n2n_regex.o \ + src/network_traffic_filter.o \ + src/pearson.o \ + src/random_numbers.o \ + src/sn_management.o \ + src/sn_selection.o \ + src/sn_utils.o \ + src/speck.o \ + src/tf.o \ + src/transform_aes.o \ + src/transform_cc20.o \ + src/transform_lzo.o \ + src/transform_null.o \ + src/transform_speck.o \ + src/transform_tf.o \ + src/transform_zstd.o \ + src/tuntap_freebsd.o \ + src/tuntap_linux.o \ + src/tuntap_netbsd.o \ + src/tuntap_osx.o \ + src/wire.o \ + +N2N_DEPS=$(wildcard include/*.h) $(wildcard src/*.c) config.mak # As source files pass the linter, they can be added here (If all the source # is passing the linter tests, this can be refactored) @@ -244,6 +280,7 @@ endif .PHONY: clean clean: + rm -f src/edge.o src/supernode.o src/example_edge_embed.o src/example_edge_embed_quick_edge_init.o src/example_sn_embed.o rm -rf $(N2N_OBJS) $(N2N_LIB) $(APPS) $(DOCS) $(COVERAGEDIR)/ *.dSYM *~ rm -f tests/*.out src/*.gcno src/*.gcda for dir in $(SUBDIRS); do $(MAKE) -C $$dir clean; done