Skip to content

Instantly share code, notes, and snippets.

@fxfactorial
Created October 16, 2018 21:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fxfactorial/a363c9cecacedf2bf249d8b8d3dd953a to your computer and use it in GitHub Desktop.
Save fxfactorial/a363c9cecacedf2bf249d8b8d3dd953a to your computer and use it in GitHub Desktop.
great makefile
CC := clang
CFLAGS := -Wall -ggdb
src = $(wildcard *.c)
obj = $(src:.c=.o)
LDFLAGS = -fsanitize=address
myprog: $(obj)
$(CC) -o $@ $^ $(LDFLAGS)
.PHONY: clean
clean:
rm -f $(obj) myprog
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment