diff --git a/source_codes/arbres_AVL/.gitignore b/source_codes/arbres_AVL/.gitignore new file mode 100644 index 0000000000000000000000000000000000000000..f8a1ca8adedba78aa24db2659b28c80e68e737f0 --- /dev/null +++ b/source_codes/arbres_AVL/.gitignore @@ -0,0 +1,4 @@ +bin_tree.o +avl.o +main +main.o diff --git a/source_codes/arbres_AVL/Makefile b/source_codes/arbres_AVL/Makefile new file mode 100644 index 0000000000000000000000000000000000000000..88318d040b26be3d320f34562fdb9066f4b418ea --- /dev/null +++ b/source_codes/arbres_AVL/Makefile @@ -0,0 +1,25 @@ +CC:=gcc +# SAN:=-fsanitize=address +CFLAGS:=-Wall -Wextra -pedantic -g $(SAN) +LDFLAGS:=-lm $(SAN) +SOURCES := $(wildcard *.c) +OBJECTS := $(patsubst %.c, %.o, $(SOURCES)) + +all: main $(OBJECTS) + +main: main.c bin_tree.o avl.o + $(CC) $(CFLAGS) -o $@ $^ $(LDFLAGS) + @echo $@ >> .gitignore + +%.o: %.c + $(CC) $(CFLAGS) -c $< -o $@ + @echo $@ >> .gitignore + +bin_tree.o: bin_tree.h +avl.o: avl.h + +.PHONY: clean all + +clean: + rm -f *.o main .gitignore +