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