diff options
Diffstat (limited to 'Semestr 4/sieci/pracownia2/router/makefile')
-rw-r--r-- | Semestr 4/sieci/pracownia2/router/makefile | 9 |
1 files changed, 9 insertions, 0 deletions
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 |