Skip to content
Snippets Groups Projects
Select Git revision
  • ee935379e577dd2ab09f34713a17628c989f359f
  • master default protected
2 results

Makefile

Blame
  • Makefile 522 B
    CC := clang
    CFLAGS := -g -pedantic -Wall -Wextra -std=c11
    LDFLAGS := -fsanitize=address -fsanitize=leak -fsanitize=undefined -lm -lpthread
    TARGET := synchro
    
    all: $(TARGET)
    
    $(TARGET): synchro.o
    	@printf "=================== Building executable ===================\n"
    	$(CC) $(CFLAGS) $^ -o $@ $(LDFLAGS)
    	@printf "\n"
    
    %.o: %.c
    	@printf "================== Building object files ==================\n"
    	$(CC) $(CFLAGS) -c $<
    	@printf "\n"
    
    
    .PHONY: clean
    
    clean:
    	rm -f *.o $(TARGET)
    
    .PHONY: rebuild
    	
    rebuild: clean all