Created
March 5, 2018 16:56
-
-
Save ilkerkesen/a13bceb2c71898b0c13f65be1f5295ef to your computer and use it in GitHub Desktop.
Example Makefile for Interactive Graphics Course
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
# change "/path/to/lib" strings | |
LDLIBS = -lglut -lGLEW -lGL -lGLU | |
CXXINCS = -I/path/to/lib/include | |
INIT_SHADER = /path/to/lib/common/InitShader.cpp | |
INIT_SHADER_OBJ = /path/to/lib/common/InitShader.o | |
.PHONY: clean cleanall | |
all: program | |
program: $(INIT_SHADER_OBJ) | |
g++ -g -O2 $(CXXINCS) $(INIT_SHADER_OBJ) main.cpp $(LDLIBS) | |
$(INIT_SHADER_OBJ): $(INIT_SHADER) | |
g++ -c -Wall $(INIT_SHADER) -o $(INIT_SHADER_OBJ) | |
clean: | |
rm a.out | |
cleanall: | |
rm $(INIT_SHADER_OBJ) a.out |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment