Created
June 13, 2015 10:10
-
-
Save theidexisted/09dc1710ff3b049c793f to your computer and use it in GitHub Desktop.
This file contains hidden or 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 = g++ | |
BINDIR = ./bin | |
CFLAGS = -c -g -O0 -std=c++11 -I../include | |
LDFLAGS = | |
SOURCES = $(wildcard *.cc) | |
OBJECTS = $(SOURCES:.cc=.o) | |
FAKEOBJECTS = $(OBJECTS) | |
EXECUTABLE = $(addprefix $(BINDIR)/, $(basename $(SOURCES:.cpp=))) | |
.PHONY: all | |
all : $(BINDIR) $(OBJECTS) $(EXECUTABLE) | |
%.o : %.cc | |
$(CC) $(CFLAGS) $< -o $@ | |
$(EXECUTABLE) : | |
$(CC) $(LDFLAGS) $(basename $(notdir $@)).o -o $@ | |
$(BINDIR) : | |
mkdir -p $(BINDIR) | |
clean : | |
rm -f *.o $(BINDIR)/* 2> /dev/null |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment