Skip to content

Instantly share code, notes, and snippets.

@yoavlt
Created July 3, 2013 05:10
Show Gist options
  • Save yoavlt/5915585 to your computer and use it in GitHub Desktop.
Save yoavlt/5915585 to your computer and use it in GitHub Desktop.
Makefile-template
CC=clang
LDFLAGS=-lstdc++
LIBDIR=
INCDIR=
CFLAGS=-Wall -g -O3 -std=c++11
TARGETS=
SRCS=
OBJS=$(SRCS:.cpp=.o)
all: $(TARGETS) $(OBJS)
$(TARGETS): $(OBJS)
$(CC) $(LDFLAGS) -o $@ $(OBJS) $(INCDIR) $(LIBDIR) $(LIB)
.cpp.o:
$(CC) $(CFLAGS) -c $< $(INCDIR) $(LIBDIR) $(LIB)
.PHONY: clean
clean:
$(RM) $(TARGETS) *.o
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment