Skip to content

Instantly share code, notes, and snippets.

@ilkerkesen
Created March 5, 2018 16:56
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ilkerkesen/a13bceb2c71898b0c13f65be1f5295ef to your computer and use it in GitHub Desktop.
Save ilkerkesen/a13bceb2c71898b0c13f65be1f5295ef to your computer and use it in GitHub Desktop.
Example Makefile for Interactive Graphics Course
# 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