Fix test build on Mac

This commit is contained in:
Omar Rizwan
2024-06-18 22:18:49 -04:00
parent fd247e625a
commit 7790f7a444
3 changed files with 4 additions and 1 deletions
+2
View File
@@ -70,6 +70,8 @@ $(BUILD_DIR)/test/%.o: test/%.c
$(TEST_FILE): $(LIB_FILE) $(TEST_OBJS)
ifeq ($(OS),Windows_NT)
$(CC) -o $@ $(TEST_OBJS) $(LIB_FILE) -lglew32 -lopengl32 -lSDL2 -lSDL2main -lm
else ifeq ($(shell uname -s),Darwin)
$(CC) -o $@ $(TEST_OBJS) $(LIB_FILE) -framework OpenGL -lGLEW -lSDL2 -lSDL2main -lm -lpthread
else
$(CC) -o $@ $(TEST_OBJS) $(LIB_FILE) -lGLEW -lGL -lSDL2 -lSDL2main -lm -lpthread
endif
+1 -1
View File
@@ -19,7 +19,7 @@ project under the `test` directory as well, demonstrating usage of the library.
- [Godot add-on](https://github.com/Brawmario/libsm64-godot)
- [Game Maker 8 extension](https://github.com/headshot2017/libsm64-gm8)
## Building on Linux
## Building on Mac and Linux
- Ensure python3 is installed.
- Ensure the SDL2 and GLEW libraries are installed if you're building the test program (on Ubuntu: libsdl2-dev, libglew-dev).
+1
View File
@@ -1,5 +1,6 @@
#include "gl20_renderer.h"
#include <OpenGL/gl.h>
#include <stdio.h>
#include "../../src/libsm64.h"