Skip to content
Snippets Groups Projects
Select Git revision
  • 377278e859785d56a8b21e5c200175390f6a645e
  • main default protected
2 results

Makefile

Blame
  • Makefile 313 B
    CC:=gcc
    # SAN:=-fsanitize=address
    CFLAGS:=-Wall -Wextra -pedantic -g $(SAN)
    LDFLAGS:=-lm $(SAN)
    
    EXECS := $(shell find . -type f -iname '*.c' | sed 's/\.c//g')
    
    all: $(EXECS)
    
    $(EXECS): %: %.c
    	$(CC) $(CFLAGS) -o $@ $< $(LDFLAGS)
    	@echo $@ >> .gitignore
    
    .PHONY: clean all
    
    clean:
    	rm -f *.o $(EXECS) .gitignore