From bf9914308497839c1d05905f6f156ee4165fdae1 Mon Sep 17 00:00:00 2001 From: Franciszek Malinka Date: Mon, 19 Apr 2021 10:18:30 +0200 Subject: Linked list finally working --- Semestr 4/sieci/pracownia2/router/makefile | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'Semestr 4/sieci/pracownia2/router/makefile') diff --git a/Semestr 4/sieci/pracownia2/router/makefile b/Semestr 4/sieci/pracownia2/router/makefile index 7d8aaef..87bc15a 100644 --- a/Semestr 4/sieci/pracownia2/router/makefile +++ b/Semestr 4/sieci/pracownia2/router/makefile @@ -1,13 +1,19 @@ CC := gcc CFLAGS := -Og -std=gnu17 -Wall -Wall -fsanitize=address -fsanitize=undefined 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 $@ $< @@ -15,6 +21,9 @@ $(ODIR)/%.o: %.c $(DEPS) $(TARGET): $(OBJ) $(CC) -o $@ $^ $(CFLAGS) +$(TEST): $(TEST_OBJ) + $(CC) -o $@ $^ $(CFLAGS) + clean: rm -rf $(TARGET) rm -rf test -- cgit v1.2.3