Skip to content

Instantly share code, notes, and snippets.

@lytedev
Created April 28, 2015 21:13
Show Gist options
  • Save lytedev/d4a80d01510a12ac3e9c to your computer and use it in GitHub Desktop.
Save lytedev/d4a80d01510a12ac3e9c to your computer and use it in GitHub Desktop.
Super basic makefile for a C project
CC=cc
LDFLAGS=
APPSLUG=app
SRCDIR=src/
BUILDDIR=build/
SOURCES=$(SRCDIR)main.c
OUTPUT=$(BUILDDIR)$(APPSLUG)
all: $(SOURCES) $(OUTPUT)
$(OUTPUT): $(SOURCES)
$(CC) $(LDFLAGS) $(SOURCES) -o $(OUTPUT)
clean:
rm -rf $(BUILDDIR)*
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment