Created
September 11, 2011 22:54
-
-
Save rsdy/1210235 to your computer and use it in GitHub Desktop.
grafika makefile
This file contains 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
# usage: | |
# to build hazi1.cpp: make hazi1 | |
# to build and run: make RUN=1 hazi1 | |
# to build and strip //-style comments: make STRIP=1 hazi1 | |
# guess what: make RUN=1 STRIP=1 hazi1 | |
CC = g++ | |
OPTS = -g --pedantic -Wall --ansi -lglut | |
.cpp: | |
$(CC) $(OPTS) $*.cpp -o $* | |
ifdef RUN | |
./$* | |
endif | |
ifdef STRIP | |
echo -e '\n\n------------------------------\n----------- SOURCE -----------\n------------------------------' | |
cat $*.cpp |sed '/^\s*\/\/.*$$/d' |sed 's;//.*$$;;' | |
endif | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment