-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
executable file
·24 lines (17 loc) · 898 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# Set the paths to the installed SDL2 libraries
SDL2_INCLUDE_PATH = /opt/homebrew/Cellar/sdl2/2.30.2/include
SDL2_LIB_PATH = /opt/homebrew/Cellar/sdl2/2.30.2/lib
SDL2_GFX_INCLUDE_PATH = /opt/homebrew/Cellar/sdl2_gfx/1.0.4/include
SDL2_GFX_LIB_PATH = /opt/homebrew/Cellar/sdl2_gfx/1.0.4/lib
SDL2_IMAGE_INCLUDE_PATH = /opt/homebrew/Cellar/sdl2_image/2.8.2_1/include
SDL2_IMAGE_LIB_PATH = /opt/homebrew/Cellar/sdl2_image/2.8.2_1/lib
# Compiler flags to specify where to find header files
CFLAGS = -std=c++17 -Wall -I$(SDL2_INCLUDE_PATH) -I$(SDL2_GFX_INCLUDE_PATH) -I$(SDL2_IMAGE_INCLUDE_PATH)
# Linker flags to specify where to find the libraries and which libraries to link against
LDFLAGS = -L$(SDL2_LIB_PATH) -L$(SDL2_GFX_LIB_PATH) -L$(SDL2_IMAGE_LIB_PATH) -lSDL2 -lSDL2_gfx -lSDL2_image -lm
build:
g++ $(CFLAGS) ./src/*.cpp ./src/Physics/*.cpp $(LDFLAGS) -o app
run:
./app
clean:
rm app