feature/imgui-sdl
points-test
|
Last change
on this file since 9d4456b was 17f28a1, checked in by Dmitry Portnoy <dmitry.portnoy@…>, 6 years ago |
|
Improve the formatting for the crash log on OSX
|
-
Property mode
set to
100644
|
|
File size:
1.4 KB
|
| Line | |
|---|
| 1 | OS = $(shell uname)
|
|---|
| 2 | CC = g++
|
|---|
| 3 | CFLAGS = -std=c++0x -Wall -pedantic -rdynamic
|
|---|
| 4 | # -rdynamic is to generate debug info for dynamic symbols on debian-based
|
|---|
| 5 | # systems (tested on Linux Mint)
|
|---|
| 6 | # for OSX, using -g generates a newgame.dSYS directory which has debug symbols.
|
|---|
| 7 | # However, this has no effect on the stack trace, so there must be a way to specify a *.dSYS directory when running ./newgame
|
|---|
| 8 | # or to instead put thos symbols directly into the executable, like -rdynamic does for Linux
|
|---|
| 9 | #-Wextra -fno-inline
|
|---|
| 10 |
|
|---|
| 11 | ifeq ($(OS),Darwin)
|
|---|
| 12 | DEP = -framework Cocoa -framework OpenGL -framework IOKit -framework CoreVideo -lglfw -lglew
|
|---|
| 13 | endif
|
|---|
| 14 | ifeq ($(OS),Linux)
|
|---|
| 15 | DEP = -lglfw3 -lGLEW -lGL -ldl -lX11 -lXrandr -lXxf86vm -lXinerama -lXcursor -pthread
|
|---|
| 16 | endif
|
|---|
| 17 |
|
|---|
| 18 | IMGUI_FILES = IMGUI/imgui_demo.cpp IMGUI/imgui_draw.cpp IMGUI/imgui.cpp
|
|---|
| 19 |
|
|---|
| 20 | # If I were generating .o files as well, I should use $? instead of $^
|
|---|
| 21 | # as this well prevent regenerating .o files for unchanged .cpp files
|
|---|
| 22 |
|
|---|
| 23 | newgame: new-game.cpp logger.cpp utils.cpp CrashLogger.cpp stb_image.cpp imgui_impl_glfw_gl3.cpp $(IMGUI_FILES)
|
|---|
| 24 | $(CC) $^ $(DEP) $(CFLAGS) -o $@
|
|---|
| 25 |
|
|---|
| 26 | pong: pong.cpp logger.cpp
|
|---|
| 27 | $(CC) $^ $(DEP) $(CFLAGS) -o $@
|
|---|
| 28 |
|
|---|
| 29 | mygame: mygame.cpp common/shader.cpp common/texture.cpp common/controls-new.cpp
|
|---|
| 30 | $(CC) $^ $(DEP) $(CFLAGS) -o $@
|
|---|
| 31 |
|
|---|
| 32 | demo: game06.cpp common/shader.cpp common/texture.cpp common/controls.cpp
|
|---|
| 33 | $(CC) $^ $(DEP) $(CFLAGS) -o $@
|
|---|
| 34 |
|
|---|
| 35 | clean:
|
|---|
| 36 | rm -f newgame
|
|---|
| 37 | rm -f pong
|
|---|
| 38 | rm -f mygame
|
|---|
| 39 | rm -f demo
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.