Modified Makefile for Linux and updated Visual Studio project files for Linux support, Added infromation to README

This commit is contained in:
2025-03-23 20:59:25 +01:00
parent 5029165272
commit b993547e4e
6 changed files with 39 additions and 20 deletions

View File

@ -1,20 +1,15 @@
{
"configurations": [
{
"name": "Win32",
"name": "Linux",
"includePath": [
"${workspaceFolder}/**",
"${workspaceFolder}\\..\\include"
"${workspaceFolder}/include"
],
"defines": [
"_DEBUG",
"UNICODE",
"_UNICODE"
],
"compilerPath": "${workspaceFolder}\\..\\mingw64\\bin\\g++.exe",
"cStandard": "c11",
"cppStandard": "c++17",
"intelliSenseMode": "gcc-x64"
"defines": [],
"compilerPath": "/usr/bin/gcc",
"cStandard": "c17",
"cppStandard": "c++14",
"intelliSenseMode": "linux-clang-x64"
}
],
"version": 4

View File

@ -5,7 +5,7 @@
"name": "(gdb) Launch",
"type": "cppdbg",
"request": "launch",
"program": "boat_sim",
"program": "${workspaceFolder}/./boat_sim",
"args": [],
"stopAtEntry": true,
"cwd": "${workspaceFolder}",

View File

@ -29,7 +29,7 @@
{
"label": "Run",
"type": "shell",
"command": "boat_sim",
"command": "make run",
"options": {
"cwd": "${workspaceFolder}"
},

View File

@ -4,9 +4,10 @@
CXX = g++
CXXFLAGS = -Wall -g -mavx -msse4 # -Wall for more warnings, -g for debugging symbols
INC_DIR = include
LIBS = -lfreeglut -lglew32 -lSOIL -lopengl32 -lglu32
LIB_DIR = ..\libs
LDFLAGS = -L$(LIB_DIR)
LIBS = -lglut -lSOIL -lGL -lGLEW -lGLU
LIB_DIRS = /usr/lib /usr/lib/x86_64-linux-gnu
LDFLAGS = $(addprefix -L, $(LIB_DIRS))
# Directories
SRC_DIR = src
@ -45,7 +46,7 @@ $(BUILD_DIR)/%.o: $(SRC_DIR)/%.s
# Clean target
clean:
rm -rf $(BUILD_DIR)
rm $(BUILD_DIR)/*
# Debug build target
debug: CXXFLAGS += -DDEBUG -g
@ -58,4 +59,4 @@ run: all
rundebug: debug
gdb ./$(EXECUTABLE_PATH)
.PHONY: all clean debug run rundebug
.PHONY: all clean debug run rundebug