Skip to content

Instantly share code, notes, and snippets.

@lucansky
Created August 5, 2014 22:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lucansky/d8fe86f36caf1f74e011 to your computer and use it in GitHub Desktop.
Save lucansky/d8fe86f36caf1f74e011 to your computer and use it in GitHub Desktop.
Generic Makefile
CC=gcc
CXX=clang++
RM=rm -f
CPPFLAGS=-ffast-math -Ofast -std=c++11 -pedantic -Wall
#LDFLAGS=-Bstatic
#LDLIBS=-Lboost_random -lpthread
BIN=binarka
SRCS=zdrojak1.cc zdrojak2.cc system.cc binarka.cc
OBJS=$(subst .cc,.o,$(SRCS))
all: $(BIN)
$(BIN): $(OBJS)
g++ $(LDFLAGS) -o $(BIN) $(OBJS) $(LDLIBS)
depend: .depend
.depend: $(SRCS)
rm -f ./.depend
$(CXX) $(CPPFLAGS) -MM $^>>./.depend;
clean:
$(RM) $(OBJS)
dist-clean: clean
$(RM) *~ .dependtool
include .depend
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment