source:
opengl-game/makefile@
4762301
Last change on this file since 4762301 was 4762301, checked in by , 6 years ago | |
---|---|
|
|
File size: 1.0 KB |
Rev | Line | |
---|---|---|
[5a643d3] | 1 | OS = $(shell uname) |
[15c7ed9] | 2 | CC = g++ |
[4762301] | 3 | CFLAGS = -std=c++0x -Wall -pedantic -rdynamic |
4 | #-Wextra -fno-inline | |
[5a643d3] | 5 | |
6 | ifeq ($(OS),Darwin) | |
[e6bc0f4] | 7 | DEP = -framework Cocoa -framework OpenGL -framework IOKit -framework CoreVideo -lglfw -lglew |
[5a643d3] | 8 | endif |
[15c7ed9] | 9 | ifeq ($(OS),Linux) |
10 | DEP = -lglfw3 -lGLEW -lGL -ldl -lX11 -lXrandr -lXxf86vm -lXinerama -lXcursor -pthread | |
[5a643d3] | 11 | endif |
12 | ||
[1a616e6] | 13 | IMGUI_FILES = IMGUI/imgui_demo.cpp IMGUI/imgui_draw.cpp IMGUI/imgui.cpp |
14 | ||
[fc424f6] | 15 | # If I were generating .o files as well, I should use $? instead of $^ |
[8e232ce] | 16 | # as this well prevent regenerating .o files for unchanged .cpp files |
17 | ||
[a23fc08] | 18 | newgame: new-game.cpp logger.cpp utils.cpp CrashLogger.cpp stb_image.cpp imgui_impl_glfw_gl3.cpp $(IMGUI_FILES) |
[8e232ce] | 19 | $(CC) $^ $(DEP) $(CFLAGS) -o $@ |
[5272b6b] | 20 | |
[9e81839] | 21 | pong: pong.cpp logger.cpp |
[8e232ce] | 22 | $(CC) $^ $(DEP) $(CFLAGS) -o $@ |
[9e81839] | 23 | |
[49756cb] | 24 | mygame: mygame.cpp common/shader.cpp common/texture.cpp common/controls-new.cpp |
[8e232ce] | 25 | $(CC) $^ $(DEP) $(CFLAGS) -o $@ |
[8a6d19d] | 26 | |
27 | demo: game06.cpp common/shader.cpp common/texture.cpp common/controls.cpp | |
[8e232ce] | 28 | $(CC) $^ $(DEP) $(CFLAGS) -o $@ |
[cfda3b2] | 29 | |
30 | clean: | |
[5272b6b] | 31 | rm -f newgame |
[9e81839] | 32 | rm -f pong |
[49756cb] | 33 | rm -f mygame |
[8a6d19d] | 34 | rm -f demo |
Note:
See TracBrowser
for help on using the repository browser.