diff --git a/README.md b/README.md index fbf3c35..726c78c 100644 --- a/README.md +++ b/README.md @@ -40,6 +40,9 @@ GLEW, GLU, freetype2, libvorbisfile, libvorbis, libogg, libopenal, libbz2, libXRandR, and libcurl. +sudo apt install libglew-dev libogg-dev libopenal-dev libvorbis-dev zlib1g-dev libfreetype-dev libx11-dev libxrandr-dev libxinerama-dev libxcursor-dev libxi-dev libgl1-mesa-dev libglew-dev + + ## Differences with Commercial Version * The music is not part of the open source release of Star Ruler 2. The data/music/ directory from the commercial release can be copied directly into the data/ directory of an open-source build. The music will be detected and played. diff --git a/StarRuler2.sh b/StarRuler2.sh old mode 100644 new mode 100755 diff --git a/source/glfw/CMakeLists.txt b/source/glfw/CMakeLists.txt index 2bad4f8..c05ccff 100644 --- a/source/glfw/CMakeLists.txt +++ b/source/glfw/CMakeLists.txt @@ -1,6 +1,7 @@ project(GLFW C) -cmake_minimum_required(VERSION 2.8) +cmake_minimum_required(VERSION 4.0.0) +set(CMAKE_CXX_STANDARD 11) set(GLFW_VERSION_MAJOR "3") set(GLFW_VERSION_MINOR "0") diff --git a/source/linux/Makefile b/source/linux/Makefile index 023f0fd..41557f6 100644 --- a/source/linux/Makefile +++ b/source/linux/Makefile @@ -13,6 +13,9 @@ else OSNAME = lin endif +CXXFLAGS += -fPIC +LDFLAGS += -lGLEW -lGL -lX11 -lXrandr -lfreetype -lz -lm + ifdef DEBUG BINDIR = bin_d/$(OSNAME)$(ARCH) OBJDIR = obj_d/$(OSNAME)$(ARCH) @@ -36,12 +39,12 @@ else endif ifndef NLTO ifeq (,$(findstring g++, $(CC))) - CXXFLAGS += -flto=6 + #CXXFLAGS += -flto=6 else - CXXFLAGS += -flto=thin + #CXXFLAGS += -flto=thin endif else - CXXFLAGS += -fno-lto + #CXXFLAGS += -fno-lto endif endif @@ -104,7 +107,7 @@ ifeq ($(UNAME), Darwin) CXXFLAGS += -I/usr/local/Cellar/glew/1.10.0/include LDFLAGS += -L/usr/local/Cellar/glew/1.10.0/lib - + CXXFLAGS += -framework OpenGL -framework Cocoa -framework IOKit CXXFLAGS += -framework OpenAL @@ -323,7 +326,7 @@ $(OBJDIR)/%.o: $(SRCDIR)/%.cpp #Complete binary compile $(BINDIR)/$(BIN): makelibs $(OBJ_FILES) $(LIB_FILES) $(COPY_LIBS) @mkdir -p $(BINDIR) - @$(CC) $(CXXFLAGS) $(LDFLAGS) $(OBJ_FILES) $(LIB_FILES) -o $@ + @$(CC) $(CXXFLAGS) $(OBJ_FILES) $(LIB_FILES) -o $@ $(LDFLAGS) -lGL -lGLU -lX11 -lXrandr -lXxf86vm -lXi -lopenal -lcurl -lpng -lvorbisfile makelibs: @mkdir -p $(BINDIR)