From c5fcf7179a83ef65c86c6a4a390029149e518649 Mon Sep 17 00:00:00 2001 From: Franciszek Malinka Date: Tue, 5 Oct 2021 21:49:54 +0200 Subject: Duzy commit ze smieciami --- semestr-4/sieci/pracownia2/router/makefile | 34 ++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 semestr-4/sieci/pracownia2/router/makefile (limited to 'semestr-4/sieci/pracownia2/router/makefile') diff --git a/semestr-4/sieci/pracownia2/router/makefile b/semestr-4/sieci/pracownia2/router/makefile new file mode 100644 index 0000000..bf6a327 --- /dev/null +++ b/semestr-4/sieci/pracownia2/router/makefile @@ -0,0 +1,34 @@ +CC := gcc +CFLAGS := -O2 -std=gnu17 -Wall -Wall -Wno-unused-result +TARGET := router +TEST := test +DEPS := config.h + +ODIR := obj +_OBJ := router.o utils.o linked_list.o network_addr.o dist_vector.o +OBJ := $(patsubst %,$(ODIR)/%,$(_OBJ)) + +_TEST_OBJ := test.o linked_list.o +TEST_OBJ := $(patsubst %,$(ODIR)/%,$(_TEST_OBJ)) + + +all: $(TARGET) +test: $(TEST) + +$(ODIR)/%.o: %.c $(DEPS) + $(CC) $(CFLAGS) -c -o $@ $< + +$(TARGET): $(OBJ) + $(CC) -o $@ $^ $(CFLAGS) + +$(TEST): $(TEST_OBJ) + $(CC) -o $@ $^ $(CFLAGS) + +clean: + rm -rf $(TARGET) + rm -rf test + +distclean: + rm -rf $(TARGET) + rm -rf test + rm -rf $(ODIR)/*.o -- cgit v1.2.3