Created
April 28, 2015 21:13
-
-
Save lytedev/d4a80d01510a12ac3e9c to your computer and use it in GitHub Desktop.
Super basic makefile for a C project
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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