Page MenuHomePhabricator (Chris)

No OneTemporary

Authored By
Unknown
Size
23 KB
Referenced Files
None
Subscribers
None
diff --git a/README.md b/README.md
index b4cfe9e..1293389 100644
--- a/README.md
+++ b/README.md
@@ -1,8 +1,73 @@
# Star Ruler 2
Star Ruler 2 is a massive scale 4X/RTS set in space. Explore dozens, hundreds,
or even thousands of systems in a galaxy of your choosing, expand across its
planets, exploit the resources you find, and ultimately exterminate any who
stand in your way. The fate of your empire depends on your ability to master
the economy, field a military, influence galactic politics, and learn what you
can about the universe.
+## What is this?
+This repository contains the full source code needed to build Star Ruler 2, and
+all secondary scripts, data files and assets required to run it.
+
+Blind Mind Studios has been inactive for a few years now, so we decided to
+open-source the game as a whole and allow anyone interested in how its engine works
+to tinker with it.
+
+## Building the Game
+The Star Ruler 2.exe contained in the main folder is just a launcher. To run
+the game you will need to build the binary for your platform from source.
+
+### Building on Windows
+You will need Visual Studio 2017 to build Star Ruler 2 on windows. Simply open the
+visual studio solution in source/msvc/Star Ruler 2/, and build the "Star Ruler 2" project
+in either Debug or Non-Steam Release configuration.
+
+Please note that while the built exe ends up in the bin/win64/ directory, it expects to be
+started with its working directory set to the main direcotry (where the
+launcher exe is). So when debugging from visual studio, make sure the 'Working
+Directory' configuration property is set to ../.../..
+
+### Building on Linux
+The equivalent launcher on linux is StarRuler2.sh. To build the binary files on linux,
+make sure your working directory is set to the main directory (the one with StarRuler2.sh in it),
+then run `make -f source/linux/Makefile compile` to compile the binary.
+
+Afterward, run the `StarRuler2.sh` shell script to start the game.
+
+Several dependencies are required to build on linux, including libpng, zlib,
+GLEW, GLU, freetype2, libvorbisfile, libvorbis, libogg, libopenal, libbz2,
+libXRandR, and libcurl.
+
+
+## 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.
+* All code for accessing the SteamWorks API has been removed. The game platform abstraction layer game\_platform.h has
+ been kept intact, so other mod-sharing platforms could potentially be integrated into the game.
+* Code for the automatic game patcher that is part of the GOG.com release is part of the repository, but the functionality
+ is disabled, since it relies on delta updates and will not work with modified open source versions.
+* While the actual source code is probably still compatible with 32-bit platforms, project files and external dependencies for
+ 32-bit builds are not included in this repository.
+
+## FAQ
+### Can I Play Multiplayer with Steam/GOG versions?
+Yes. The base open source version is multiplayer-compatible with the commercial versions. If you make multiplayer-incompatible
+changes to the open source version, please remember to change the MP\_VERSION identifier in scripts/definitions/version.as,
+so things do not break from people with incompatible versions trying to join each other.
+
+### Does this have the Wake of the Heralds DLC Expansion?
+Yes. The code has been modified to bypass all DLC checks and unlock it by default. The Wake of the Heralds content
+is always available in the open-source version.
+
+### Is there a Community?
+Most Star Ruler 2 community activity is centered around the [Steam Forums](https://steamcommunity.com/app/282590/discussions/)
+(it is possible to post without owning the game on steam), and the [Discord Server for Rising Stars](https://discord.gg/9YyXgbh),
+one of the largest SR2 mod projects.
+
+## Licensing
+Star Ruler 2 source code is licensed as MIT, art assets are licensed as CC-BY-NC 2.0.
+
+Some third party code is contained in this repository as dependencies. Licenses for those projects are contained in the appropriate source folders.
+
+See the COPYING file for more information.
diff --git a/StarRuler2.sh b/StarRuler2.sh
index e119206..a94968b 100644
--- a/StarRuler2.sh
+++ b/StarRuler2.sh
@@ -1,21 +1,21 @@
-#!/bin/bash
-#Figure out where the script is located
-if [[ -L "$0" ]]; then
- script_loc="$(readlink "$0")"
-else
- script_loc="$0"
-fi
-cd "$(dirname "$script_loc")"
-
-#Execute the right binary for this architecture
-if [ `uname` == "Darwin" ]; then
- chmod +x ./bin/osx64/StarRuler2.bin
- DYLD_LIBRARY_PATH="./bin/osx64/:$DYLD_LIBRARY_PATH" exec ./bin/osx64/StarRuler2.bin $@
-elif [ `uname -m` = "x86_64" ]; then
- chmod +x ./bin/lin64/StarRuler2.bin
- LD_LIBRARY_PATH="./bin/lin64/:$LD_LIBRARY_PATH" exec ./bin/lin64/StarRuler2.bin $@
-else
- chmod +x ./bin/lin32/StarRuler2.bin
- LD_LIBRARY_PATH="./bin/lin32/:$LD_LIBRARY_PATH" exec ./bin/lin32/StarRuler2.bin $@
-fi;
-# vim: set ff=unix:
+#!/bin/bash
+#Figure out where the script is located
+if [[ -L "$0" ]]; then
+ script_loc="$(readlink "$0")"
+else
+ script_loc="$0"
+fi
+cd "$(dirname "$script_loc")"
+
+#Execute the right binary for this architecture
+if [ `uname` == "Darwin" ]; then
+ chmod +x ./bin/osx64/StarRuler2.bin
+ DYLD_LIBRARY_PATH="./bin/osx64/:$DYLD_LIBRARY_PATH" exec ./bin/osx64/StarRuler2.bin $@
+elif [ `uname -m` = "x86_64" ]; then
+ chmod +x ./bin/lin64/StarRuler2.bin
+ LD_LIBRARY_PATH="./bin/lin64/:$LD_LIBRARY_PATH" exec ./bin/lin64/StarRuler2.bin $@
+else
+ chmod +x ./bin/lin32/StarRuler2.bin
+ LD_LIBRARY_PATH="./bin/lin32/:$LD_LIBRARY_PATH" exec ./bin/lin32/StarRuler2.bin $@
+fi;
+# vim: set ff=unix:
diff --git a/source/game/os/driver.h b/source/game/os/driver.h
index 8172167..7b36ffe 100644
--- a/source/game/os/driver.h
+++ b/source/game/os/driver.h
@@ -1,218 +1,219 @@
#pragma once
#include "os/key_consts.h"
#include <functional>
#include <string>
#include <list>
#include <vector>
namespace os {
enum WindowMode {
WM_Fullscreen,
WM_Window,
};
enum KeyAction {
KA_Pressed = 1,
KA_Released = 2,
KA_Repeated = 1+4,
};
struct WindowData {
int width, height;
int redbits, greenbits, bluebits, alphabits;
int depthbits, stencilbits;
int aa_samples;
int refreshRate;
bool resizable;
int verticalSync;
WindowMode mode;
std::string targetMonitor;
bool overrideMonitor;
WindowData()
: width(1024), height(768),
redbits(8), greenbits(8), bluebits(8),
alphabits(8), depthbits(8), stencilbits(8),
aa_samples(4), refreshRate(0), resizable(false),
verticalSync(1), mode(WM_Window), overrideMonitor(false) {}
};
enum OSCallback {
OSC_WindowResize,
OSC_WindowClose,
OSC_Key,
OSC_CharKey,
OSC_MouseMove,
OSC_MouseButton,
OSC_MouseWheel,
OSC_COUNT
};
template<class Arg0,class Arg1>
struct DriverCallbacks_2 {
typedef std::function<bool(Arg0,Arg1)> cb;
std::list<cb> callbacks;
//Adds the callback to the list, earlier if priority
void add(cb func, bool priority = false) {
if(priority)
callbacks.push_front(func);
else
callbacks.push_back(func);
}
//Removes a callback previously added to the list
- void remove(cb func) {
+ /*void remove(cb func) {
callbacks.remove_if([func](cb f) {
return func.template target<bool(Arg0,Arg1)>() == f.template target<bool(Arg0,Arg1)>();
});
- }
+ }*/
+
//Calls each callback in order, stopping if true is returned
void operator()(Arg0 arg0, Arg1 arg1) {
for(auto i = callbacks.begin(), end = callbacks.end(); i != end; ++i)
if((*i)(arg0,arg1))
break;
}
};
template<class Arg0>
struct DriverCallbacks_1 {
typedef std::function<bool(Arg0)> cb;
std::list<cb> callbacks;
//Adds the callback to the list, earlier if priority
void add(cb func, bool priority = false) {
if(priority)
callbacks.push_front(func);
else
callbacks.push_back(func);
}
//Removes a callback previously added to the list
- void remove(cb func) {
+ /*void remove(cb func) {
callbacks.remove_if([func](cb f) {
return func.template target<bool(Arg0)>() == f.template target<bool(Arg0)>();
});
- }
+ }*/
//Calls each callback in order, stopping if true is returned
void operator()(Arg0 arg0) {
for(auto i = callbacks.begin(), end = callbacks.end(); i != end; ++i)
if((*i)(arg0))
break;
}
};
struct DriverCallbacks {
typedef std::function<bool()> cb;
std::list<cb> callbacks;
//Adds the callback to the list, earlier if priority
void add(cb func, bool priority = false) {
if(priority)
callbacks.push_front(func);
else
callbacks.push_back(func);
}
//Removes a callback previously added to the list
- void remove(cb func) {
+ /*void remove(cb func) {
callbacks.remove_if([func](cb f) {
return func.template target<bool()>() == f.template target<bool()>();
});
- }
+ }*/
//Calls each callback in order, stopping if true is returned
void operator()() {
for(auto i = callbacks.begin(), end = callbacks.end(); i != end; ++i)
if((*i)())
break;
}
};
class OSDriver {
public:
struct VideoMode {
unsigned width;
unsigned height;
unsigned refresh;
};
DriverCallbacks onWindowClose;
DriverCallbacks_1<unsigned> onCharTyped;
DriverCallbacks_2<double,double> onScroll;
DriverCallbacks_2<int,int> onResize, onMouseButton, onMouseMoved, onKeyEvent;
bool shiftKey, altKey, ctrlKey;
int win_width, win_height;
int mouse_x, mouse_y;
int leftButton, rightButton, middleButton;
virtual bool systemRandom(unsigned char* buffer, unsigned bytes) = 0;
virtual void setVerticalSync(int waitFrames) = 0;
virtual void swapBuffers(double minWait_s = 0) = 0;
//NOTE: If you need to keep the program awake but can't render, use this instead of swapBuffers
// Skips the elapsed time with minimal impact on timers
virtual void handleEvents(unsigned minWait_ms = 100) = 0;
virtual void createWindow(WindowData& data) = 0;
virtual void setWindowTitle(const char* str) = 0;
virtual void setWindowSize(int width, int height) = 0;
virtual void closeWindow() = 0;
virtual bool isWindowFocused() = 0;
virtual bool isWindowMinimized() = 0;
virtual bool isMouseOver() = 0;
virtual void flashWindow() = 0;
virtual void getVideoModes(std::vector<VideoMode>& output) = 0;
virtual void getMonitorNames(std::vector<std::string>& output) = 0;
virtual void getDesktopSize(unsigned& width, unsigned& height) = 0;
virtual void resetTimer() = 0;
//Returns time since last reset in ms
virtual int getTime() const = 0;
//Returns time since last reset in seconds
virtual double getAccurateTime() const = 0;
//Returns the current system time for the frame
virtual double getFrameTime() const = 0;
//Resets the game timer (implied by resetTimer())
virtual void resetGameTime(double time) = 0;
//Returns the current game time
virtual double getGameTime() const = 0;
//Sets the game speed as a factor of real time
virtual void setGameSpeed(double factor) = 0;
//Returns the current game speed
virtual double getGameSpeed() const = 0;
virtual unsigned getProcessorCount() = 0;
virtual void sleep(int milliseconds) = 0;
virtual unsigned getDoubleClickTime() const = 0;
virtual void getMousePos(int& x, int& y) = 0;
virtual void getLastMousePos(int& x, int& y) = 0;
virtual void setMousePos(int x, int y) = 0;
virtual void setCursorVisible(bool visible) = 0;
virtual void setCursorLocked(bool locked) = 0;
//Sets whether the cursor should currently lock if set to
virtual void setCursorShouldLock(bool locked) = 0;
virtual void setClipboard(const std::string& text) = 0;
virtual std::string getClipboard() = 0;
virtual int getCharForKey(int key) = 0;
virtual int getKeyForChar(unsigned char chr) = 0;
OSDriver() : shiftKey(false), altKey(false), ctrlKey(false),
win_width(0), win_height(0), mouse_x(0), mouse_y(0),
leftButton(false), rightButton(false), middleButton(false) {}
virtual ~OSDriver() {}
};
};
diff --git a/source/linux/Makefile b/source/linux/Makefile
index 3b0d65f..a62b60d 100644
--- a/source/linux/Makefile
+++ b/source/linux/Makefile
@@ -1,447 +1,432 @@
#Find the correct architecture to build for
ifndef ARCH
ARCH = $(shell getconf LONG_BIT)
endif
UNAME = $(shell uname)
#Set correct flags for build type
ifeq ($(UNAME), Darwin)
OSNAME = osx
else
OSNAME = lin
endif
ifdef DEBUG
BINDIR = bin_d/$(OSNAME)$(ARCH)
OBJDIR = obj_d/$(OSNAME)$(ARCH)
LIBDIR = obj_d/$(OSNAME)$(ARCH)
BUILDTYPE = debug
OPTFLAGS = -O0 -g
CXXFLAGS += $(OPTFLAGS)
CXXFLAGS += -D_DEBUG
else
BINDIR = bin/$(OSNAME)$(ARCH)
OBJDIR = obj/$(OSNAME)$(ARCH)
LIBDIR = obj/$(OSNAME)$(ARCH)
BUILDTYPE = release
OPTFLAGS = -Ofast
CXXFLAGS += $(OPTFLAGS)
ifdef ADD_DBG
CXXFLAGS += -g
else
CXXFLAGS += -DNDEBUG
endif
ifndef NLTO
CXXFLAGS += -flto=6
else
CXXFLAGS += -fno-lto
endif
endif
#Set correct flags for architecture
ifeq ($(ARCH), 32)
#Global
ARCHFLAGS = -m32 -march=pentium4 -mtune=generic
CXXFLAGS += $(ARCHFLAGS)
#Arch name
ARCHNAME = x86
else
#Global
ARCHFLAGS = -m64 -march=athlon64 -mtune=generic
CXXFLAGS += $(ARCHFLAGS)
#Angelscript
CXXFLAGS += -DAS_64BIT_PTR
#Arch name
ARCHNAME = x64
endif
#Global flags
BIN = StarRuler2.bin
MS_BIN = MasterServer.bin
SRCDIR = source/game
ifndef CC
CC = g++
endif
CXXFLAGS += -std=c++11
CXXFLAGS += -DLIN_MODE -DGLIBCXX_USE_NANOSLEEP
CXXFLAGS += -Wall -Wno-invalid-offsetof -Wno-switch -Wno-reorder
CXXFLAGS += -Wno-unused-local-typedefs
CXXFLAGS += -Wuninitialized -Wmaybe-uninitialized
CXXFLAGS += -Werror=return-type
CXXFLAGS += -I./source/game -I./source/angelscript/include
CXXFLAGS += -I/usr/include/freetype2 -isystem./source/glfw/include
CXXFLAGS += -I./source/sound/include
CXXFLAGS += -I./source/as_addons/include -I./source/os/include
CXXFLAGS += -I./source/libircclient/include
CXXFLAGS += -I./source/util/include -I./source/network/include
CXXFLAGS += -I./source/rapidjson/include
-ifdef NSTEAM
- CXXFLAGS += -DNSTEAM
-else
- CXXFLAGS += -I./source/steam
-endif
+NSTEAM=1
+CXXFLAGS += -DNSTEAM
ifndef GCC48
CXXFLAGS += -fdiagnostics-color=auto
endif
ifeq ($(UNAME), Darwin)
CXXFLAGS += -I/usr/local/opt/freetype/include
CXXFLAGS += -I/usr/local/opt/freetype/include/freetype2
LDFLAGS += -L/usr/local/opt/freetype/lib
CXXFLAGS += -I/usr/local/Cellar/libpng/1.6.12/include
LDFLAGS += -L/usr/local/Cellar/libpng/1.6.12/lib
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
- STEAMLIBDIR = ./source/osx/lib
-
LDFLAGS += -lcurl
else
ifndef DEBUG
LDFLAGS += -Lsource/lib/lin$(ARCH)
endif
LDFLAGS += -lGL -lGLU -lX11 -lXrandr -lXxf86vm -lXi -lopenal -lcurl
- ifeq ($(ARCH), 32)
- STEAMLIBDIR = ./source/linux/lib32
- else
- STEAMLIBDIR = ./source/linux/lib64
- endif
endif
#Libraries
LDFLAGS += -lstdc++ -lGLEW -lpng -lz -lpthread
LDFLAGS += -lm -lfreetype
LDFLAGS += -lvorbisfile
-ifndef NSTEAM
- LDFLAGS += -L$(STEAMLIBDIR) -lsteam_api
-endif
-
LIB_FILES += $(LIBDIR)/libangelscript.a
LIB_FILES += $(LIBDIR)/libglfw3.a
LIB_FILES += $(LIBDIR)/libsound.a
LIB_FILES += $(LIBDIR)/libas_addons.a
LIB_FILES += $(LIBDIR)/libircclient.a
LIB_FILES += $(LIBDIR)/libos.a
LIB_FILES += $(LIBDIR)/libnetwork.a
LIB_FILES += $(LIBDIR)/libutil.a
-ifndef DEBUG
+NOCOPYLIBS=1
+ifndef NOCOPYLIBS
ifeq ($(UNAME), Darwin)
COPY_LIBS += lib/libGLEW.1.10.0.dylib
COPY_LIBS += opt/libpng/lib/libpng16.16.dylib
COPY_LIBS += opt/freetype/lib/libfreetype.6.dylib
COPY_LIBS += lib/gcc/x86_64-apple-darwin11.4.2/4.8.3/libstdc++.6.dylib
COPY_LIBS += lib/libvorbisfile.3.dylib
COPY_LIBS += lib/libogg.0.dylib
COPY_LIBS += Cellar/gcc/4.8.3_1/lib/gcc/x86_64-apple-darwin11.4.2/4.8.3/libgcc_s.1.dylib
COPY_LIBS += Cellar/libvorbis/1.3.4/lib/libvorbis.0.dylib
else
COPY_LIBS += libstdc++.so
COPY_LIBS += libpng.so
COPY_LIBS += libz.so
COPY_LIBS += libGLEW.so
COPY_LIBS += libGLU.so
COPY_LIBS += libfreetype.so
COPY_LIBS += libvorbisfile.so
COPY_LIBS += libvorbis.so
COPY_LIBS += libogg.so
COPY_LIBS += libopenal.so
COPY_LIBS += libgcc_s.so
COPY_LIBS += libbz2.so
COPY_LIBS += libharfbuzz.so
COPY_LIBS += libgraphite2.so
COPY_LIBS += libglib-2.0.so
COPY_LIBS += libpcre.so
#COPY_LIBS += libcurl.so #customized without ssl/ssh deps
endif
endif
#Source code files
SOURCES = \
as/as_jit.cpp \
\
design/design.cpp \
design/effect.cpp \
design/effector.cpp \
design/effector_functions.cpp \
design/hull.cpp \
design/subsystem.cpp \
design/projectiles.cpp \
\
gui/skin.cpp \
\
main/initialization.cpp \
main/input_handling.cpp \
main/logging.cpp \
main/profiler.cpp \
main/references.cpp \
main/tick.cpp \
main/console.cpp \
main/save_load.cpp \
- main/steam_platform.cpp \
\
mods/mod_manager.cpp \
\
network/network_manager.cpp \
\
obj/blueprint.cpp \
obj/lock.cpp \
obj/object.cpp \
obj/obj_group.cpp \
obj/universe.cpp \
obj/object_saving.cpp \
\
os/glfw_driver.cpp \
\
physics/physics_world.cpp \
\
profile/keybinds.cpp \
profile/settings.cpp \
\
render/camera.cpp \
render/font_fnt.cpp \
render/font_ft2.cpp \
render/gl_driver.cpp \
render/gl_framebuffer.cpp \
render/gl_mesh.cpp \
render/gl_shader.cpp \
render/gl_texture.cpp \
render/gl_vertexBuffer.cpp \
render/lighting.cpp \
render/obj_loader.cpp \
render/ogex_loader.cpp \
render/render_state.cpp \
render/spritesheet.cpp \
render/x_loader.cpp \
render/bmf_loader.cpp \
render/shader_states.cpp \
\
resource/library.cpp \
resource/load_font.cpp \
resource/load_material.cpp \
resource/load_model.cpp \
resource/load_shader.cpp \
resource/load_skin.cpp \
resource/load_sound.cpp \
resource/locale.cpp \
resource/hot_loading.cpp \
\
scene/animation/anim_linear.cpp \
scene/animation/anim_group.cpp \
scene/animation/anim_node_sync.cpp \
scene/animation/anim_projectile.cpp \
\
scene/particle_system.cpp \
scene/billboard_node.cpp \
scene/beam_node.cpp \
scene/line_trail_node.cpp \
scene/frame_line.cpp \
scene/mesh_node.cpp \
scene/plane_node.cpp \
scene/mesh_icon_node.cpp \
scene/icon_node.cpp \
scene/scripted_node.cpp \
scene/culling_node.cpp \
scene/node.cpp \
\
scripts/bind_creation.cpp \
scripts/bind_data.cpp \
scripts/bind_design.cpp \
scripts/bind_empire.cpp \
scripts/bind_general.cpp \
scripts/bind_gui.cpp \
scripts/bind_inspection.cpp \
scripts/bind_joystick.cpp \
scripts/bind_menu.cpp \
scripts/bind_object.cpp \
scripts/bind_profile.cpp \
scripts/bind_render.cpp \
scripts/bind_threading.cpp \
scripts/bind_events.cpp \
scripts/bind_formula.cpp \
scripts/bind_sound.cpp \
scripts/bind_dynamic.cpp \
scripts/bind_network.cpp \
scripts/bind_savefile.cpp \
scripts/bind_datafile.cpp \
scripts/bind_json.cpp \
scripts/bind_web.cpp \
scripts/bind_irc.cpp \
scripts/binds.cpp \
scripts/context_cache.cpp \
scripts/manager.cpp \
scripts/script_bind.cpp \
scripts/generic_call.cpp \
scripts/script_type.cpp \
scripts/script_components.cpp \
scripts/script_hooks.cpp \
\
util/format.cpp \
util/formula.cpp \
util/generic.cpp \
util/mesh_generation.cpp \
util/random.cpp \
util/threaded_loader.cpp \
util/elevation_map.cpp \
util/name_generator.cpp \
util/stat_history.cpp \
util/bbcode.cpp \
util/save_file.cpp \
\
empire.cpp \
empire_stats.cpp \
general_states.cpp \
processing.cpp \
main.cpp
CPP_FILES = $(addprefix $(SRCDIR)/, $(SOURCES))
OBJ_FILES = $(addprefix $(OBJDIR)/, $(SOURCES:.cpp=.o))
DEP_FILES = $(addprefix $(OBJDIR)/, $(SOURCES:.cpp=.d))
-include $(DEP_FILES)
compile: $(DEP_FILES) $(BINDIR)/$(BIN)
master_server: $(BINDIR)/$(MS_BIN)
#Dependency files to take care of header changes
$(OBJDIR)/%.d: $(SRCDIR)/%.cpp
@mkdir -p $(dir $@)
@$(CC) $(CXXFLAGS) -MM -MT "$(@:.d=.o)" $< >> $@
#Object files are compiled separately
$(OBJDIR)/%.o: $(SRCDIR)/%.cpp
@mkdir -p $(dir $@)
@echo $<
@$(CC) $(CXXFLAGS) $< -c -o $@
#Complete binary compile
$(BINDIR)/$(BIN): makelibs $(OBJ_FILES) $(LIB_FILES) $(COPY_LIBS)
@mkdir -p $(BINDIR)
- @cp $(STEAMLIBDIR)/libsteam_api.* $(BINDIR)/
@$(CC) $(CXXFLAGS) $(LDFLAGS) $(OBJ_FILES) $(LIB_FILES) -o $@
makelibs:
@mkdir -p $(BINDIR)
@$(MAKE) -s -f ./source/os/gcc/Makefile compile
@$(MAKE) -s -f ./source/sound/gcc/Makefile compile
@$(MAKE) -s -f ./source/as_addons/gcc/Makefile compile
@$(MAKE) -s -f ./source/libircclient/gcc/Makefile compile
@$(MAKE) -s -f ./source/network/gcc/Makefile compile
@$(MAKE) -s -f ./source/util/gcc/Makefile compile
%.so:
@cp "$$(realpath $$(gcc $(ARCHFLAGS) $(LDFLAGS) --print-file-name=$@))" "$(BINDIR)/$@"
@mv "$(BINDIR)/$@" "$(BINDIR)/$$(objdump -p $(BINDIR)/$@ | grep SONAME | awk '{print $$2}')"
%.dylib:
@cp /usr/local/$@ "$(BINDIR)/$$(basename $@)"
$(BINDIR)/$(MS_BIN): $(OBJDIR)/master_server.o $(LIBDIR)/libnetwork.a $(LIBDIR)/libos.a
@mkdir -p $(BINDIR)
@$(CC) $(CXXFLAGS) -lstdc++ -lpthread -lm $^ -o $@
patcher: $(LIB_FILES)
@$(CC) $(CXXFLAGS) $(LDFLAGS) source/patcher/patcher/patcher.cpp $(LIB_FILES) -o $(BINDIR)/Patcher.bin
version:
- ./source/linux/build.sh version
+ bash /source/linux/build.sh version
#Library builds
$(LIBDIR)/libangelscript.a:
- ./source/linux/build.sh $(ARCH) $(BUILDTYPE) angelscript
+ bash source/linux/build.sh $(ARCH) $(BUILDTYPE) angelscript
$(LIBDIR)/libglfw3.a:
- ./source/linux/build.sh $(ARCH) $(BUILDTYPE) glfw
+ bash source/linux/build.sh $(ARCH) $(BUILDTYPE) glfw
#$(LIBDIR)/libbreakpad_client.a:
#./source/linux/build.sh $(ARCH) $(BUILDTYPE) breakpad
$(LIBDIR)/libsound.a:
$(MAKE) -f ./source/sound/gcc/Makefile compile
$(LIBDIR)/libas_addons.a:
$(MAKE) -f ./source/as_addons/gcc/Makefile compile
$(LIBDIR)/libircclient.a:
$(MAKE) -f ./source/libircclient/gcc/Makefile compile
$(LIBDIR)/libnetwork.a:
$(MAKE) -f ./source/network/gcc/Makefile compile
$(LIBDIR)/libos.a:
$(MAKE) -f ./source/os/gcc/Makefile compile
$(LIBDIR)/libutil.a:
$(MAKE) -f ./source/util/gcc/Makefile compile
#Explicit rebuilds
clean_angelscript:
rm -f $(LIBDIR)/libangelscript.a
angelscript: clean_angelscript
- ./source/linux/build.sh $(ARCH) $(BUILDTYPE) angelscript
+ bash source/linux/build.sh $(ARCH) $(BUILDTYPE) angelscript
clean_glfw:
rm -f $(LIBDIR)/libglfw3.a
glfw:
- ./source/linux/build.sh $(ARCH) $(BUILDTYPE) glfw
+ bash source/linux/build.sh $(ARCH) $(BUILDTYPE) glfw
#clean_breakpad:
#rm -f $(LIBDIR)/libbreakpad_client.a
#breakpad:
#./source/linux/build.sh $(ARCH) $(BUILDTYPE) breakpad
clean_sound:
rm -f $(LIBDIR)/libsound.a
sound:
$(MAKE) -f ./source/sound/gcc/Makefile compile
clean_as_addons:
rm -f $(LIBDIR)/libas_addons.a
as_addons:
$(MAKE) -f ./source/as_addons/gcc/Makefile compile
clean_libircclient:
rm -f $(LIBDIR)/libircclient.a
libircclient:
$(MAKE) -f ./source/libircclient/gcc/Makefile compile
clean_os:
rm -f $(LIBDIR)/libos.a
os:
$(MAKE) -f ./source/os/gcc/Makefile compile
clean_util:
rm -f $(LIBDIR)/libutil.a
util:
$(MAKE) -f ./source/util/gcc/Makefile compile
clean_network:
rm -f $(LIBDIR)/libnetwork.a
network:
$(MAKE) -f ./source/network/gcc/Makefile compile
clean_code:
@find $(OBJDIR) -iname *.o -delete
@find $(OBJDIR) -iname *.d -delete
@rm -f ./.depend
clean:
@rm -rf $(OBJDIR)
@rm -f ./.depend

File Metadata

Mime Type
text/x-diff
Expires
Sat, May 16, 7:10 AM (13 h, 40 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
64058
Default Alt Text
(23 KB)

Event Timeline