Skip to content

Instantly share code, notes, and snippets.

@JAChapmanII
Created October 13, 2011 19:13
Show Gist options
  • Select an option

  • Save JAChapmanII/1285204 to your computer and use it in GitHub Desktop.

Select an option

Save JAChapmanII/1285204 to your computer and use it in GitHub Desktop.
example makefile
EXEC=clock
CXXFLAGS=
LDFLAGS=-lsfml-graphics -lsfml-window -lsfml-system
#LFLAGS+=-lGL
ifdef profile
CXXFLAGS+=-pg
endif
ifndef nowall
CXXFLAGS+=-Wextra -pedantic -Wmain -Weffc++ -Wswitch-default -Wswitch-enum
CXXFLAGS+=-Wmissing-include-dirs -Wmissing-declarations -Wunreachable-code
CXXFLAGS+=-Winline -Wfloat-equal -Wundef -Wcast-align -Wredundant-decls
CXXFLAGS+=-Winit-self -Wshadow
endif
ifdef release
CXXFLAGS+=-O3 -s
else
CXXFLAGS+=-g
endif
all: $(EXEC)
$(EXEC): $(EXEC).o
$(CXX) -o $(EXEC) $(EXEC).o $(LDFLAGS) $?
clean:
rm -f $(EXEC) *.o
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment