Skip to content

Instantly share code, notes, and snippets.

@hallfox
Last active August 29, 2015 14:16
Show Gist options
  • Save hallfox/38fc11858ff99cdc7450 to your computer and use it in GitHub Desktop.
Save hallfox/38fc11858ff99cdc7450 to your computer and use it in GitHub Desktop.
CC=#complier
CFLAGS=-c -Wall -g
LDFLAGS=
SOURCES=#source files
OBJECTS=$(SOURCES:.cpp=.o)
TARGET=#build target
all: $(SOURCES) $(TARGET)
$(TARGET): $(OBJECTS)
$(CC) $(LDFLAGS) $(OBJECTS) -o $@
.cpp.o:
$(CC) $(CFLAGS) $< -o $@
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment