c-data-structures/Makefile
2023-01-17 12:34:26 +01:00

23 lines
475 B
Makefile

CFLAGS := -std=c11 -g3 -Wall -Wextra -pedantic -fsanitize=undefined,address
BINARIES := src/main.c src/test.c
SOURCES := $(filter-out $(BINARIES), $(wildcard src/*.c))
.PHONY: clean docs
all: test main
clean:
@-rm -r bin
main: $(SOURCES)
@mkdir -p bin
$(CC) $(CFLAGS) $(SOURCES) src/main.c -o bin/main
test: $(SOURCES)
@mkdir -p bin
$(CC) $(CFLAGS) $(SOURCES) src/test.c -o bin/test
@bin/test
docs:
@doxygen
xdg-open docs/html/index.html