Skip to content
Snippets Groups Projects
Verified Commit 82e930d4 authored by orestis.malaspin's avatar orestis.malaspin
Browse files

added makefile for avl

parent f5c33605
Branches
No related tags found
No related merge requests found
Pipeline #15998 failed
bin_tree.o
avl.o
main
main.o
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
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment