sfwl build script cleanup.

This commit is contained in:
Relintai 2024-01-20 10:54:39 +01:00
parent 16169acee1
commit 268c88d89b
3 changed files with 56 additions and 85 deletions

View File

@ -2,78 +2,60 @@
# You might need to add -std=c++14 depending on your compiler version
ccache g++ -Wall -D_REENTRANT -g -Isfw -c sfw/core/aabb.cpp -o sfw/core/aabb.o
ccache g++ -Wall -D_REENTRANT -g -Isfw -c sfw/core/basis.cpp -o sfw/core/basis.o
ccache g++ -Wall -D_REENTRANT -g -Isfw -c sfw/core/color.cpp -o sfw/core/color.o
ccache g++ -Wall -D_REENTRANT -g -Isfw -c sfw/core/face3.cpp -o sfw/core/face3.o
ccache g++ -Wall -D_REENTRANT -g -Isfw -c sfw/core/logger.cpp -o sfw/core/logger.o
ccache g++ -Wall -D_REENTRANT -g -Isfw -c sfw/core/math_funcs.cpp -o sfw/core/math_funcs.o
ccache g++ -Wall -D_REENTRANT -g -Isfw -c sfw/core/memory.cpp -o sfw/core/memory.o
ccache g++ -Wall -D_REENTRANT -g -Isfw -c sfw/core/pcg.cpp -o sfw/core/pcg.o
ccache g++ -Wall -D_REENTRANT -g -Isfw -c sfw/core/plane.cpp -o sfw/core/plane.o
ccache g++ -Wall -D_REENTRANT -g -Isfw -c sfw/core/projection.cpp -o sfw/core/projection.o
ccache g++ -Wall -D_REENTRANT -g -Isfw -c sfw/core/quaternion.cpp -o sfw/core/quaternion.o
ccache g++ -Wall -D_REENTRANT -g -Isfw -c sfw/core/random_pcg.cpp -o sfw/core/random_pcg.o
ccache g++ -Wall -D_REENTRANT -g -Isfw -c sfw/core/rect2.cpp -o sfw/core/rect2.o
ccache g++ -Wall -D_REENTRANT -g -Isfw -c sfw/core/rect2i.cpp -o sfw/core/rect2i.o
ccache g++ -Wall -D_REENTRANT -g -Isfw -c sfw/core/safe_refcount.cpp -o sfw/core/safe_refcount.o
ccache g++ -Wall -D_REENTRANT -g -Isfw -c sfw/core/transform_2d.cpp -o sfw/core/transform_2d.o
ccache g++ -Wall -D_REENTRANT -g -Isfw -c sfw/core/transform.cpp -o sfw/core/transform.o
ccache g++ -Wall -D_REENTRANT -g -Isfw -c sfw/core/ustring.cpp -o sfw/core/ustring.o
ccache g++ -Wall -D_REENTRANT -g -Isfw -c sfw/core/string_name.cpp -o sfw/core/string_name.o
ccache g++ -Wall -D_REENTRANT -g -Isfw -c sfw/core/vector2.cpp -o sfw/core/vector2.o
ccache g++ -Wall -D_REENTRANT -g -Isfw -c sfw/core/vector2i.cpp -o sfw/core/vector2i.o
ccache g++ -Wall -D_REENTRANT -g -Isfw -c sfw/core/vector3.cpp -o sfw/core/vector3.o
ccache g++ -Wall -D_REENTRANT -g -Isfw -c sfw/core/vector3i.cpp -o sfw/core/vector3i.o
ccache g++ -Wall -D_REENTRANT -g -Isfw -c sfw/core/vector4.cpp -o sfw/core/vector4.o
ccache g++ -Wall -D_REENTRANT -g -Isfw -c sfw/core/vector4i.cpp -o sfw/core/vector4i.o
ccache g++ -Wall -D_REENTRANT -g -Isfwl -c sfwl/core/color.cpp -o sfwl/core/color.o
ccache g++ -Wall -D_REENTRANT -g -Isfwl -c sfwl/core/logger.cpp -o sfwl/core/logger.o
ccache g++ -Wall -D_REENTRANT -g -Isfwl -c sfwl/core/math_funcs.cpp -o sfwl/core/math_funcs.o
ccache g++ -Wall -D_REENTRANT -g -Isfwl -c sfwl/core/memory.cpp -o sfwl/core/memory.o
ccache g++ -Wall -D_REENTRANT -g -Isfwl -c sfwl/core/pcg.cpp -o sfwl/core/pcg.o
ccache g++ -Wall -D_REENTRANT -g -Isfwl -c sfwl/core/random_pcg.cpp -o sfwl/core/random_pcg.o
ccache g++ -Wall -D_REENTRANT -g -Isfwl -c sfwl/core/safe_refcount.cpp -o sfwl/core/safe_refcount.o
ccache g++ -Wall -D_REENTRANT -g -Isfwl -c sfwl/core/ustring.cpp -o sfwl/core/ustring.o
ccache g++ -Wall -D_REENTRANT -g -Isfwl -c sfwl/core/string_name.cpp -o sfwl/core/string_name.o
ccache g++ -Wall -D_REENTRANT -g -Isfw -c sfw/core/file_access.cpp -o sfw/core/file_access.o
ccache g++ -Wall -D_REENTRANT -g -Isfw -c sfw/core/dir_access.cpp -o sfw/core/dir_access.o
ccache g++ -Wall -D_REENTRANT -g -Isfwl -c sfwl/core/file_access.cpp -o sfwl/core/file_access.o
ccache g++ -Wall -D_REENTRANT -g -Isfwl -c sfwl/core/dir_access.cpp -o sfwl/core/dir_access.o
ccache g++ -Wall -D_REENTRANT -g -Isfw -c sfw/core/pool_vector.cpp -o sfw/core/pool_vector.o
ccache g++ -Wall -D_REENTRANT -g -Isfw -c sfw/core/pool_allocator.cpp -o sfw/core/pool_allocator.o
ccache g++ -Wall -D_REENTRANT -g -Isfw -c sfw/core/mutex.cpp -o sfw/core/mutex.o
ccache g++ -Wall -D_REENTRANT -g -Isfw -c sfw/core/sfw_time.cpp -o sfw/core/sfw_time.o
ccache g++ -Wall -D_REENTRANT -g -Isfwl -c sfwl/core/pool_vector.cpp -o sfwl/core/pool_vector.o
ccache g++ -Wall -D_REENTRANT -g -Isfwl -c sfwl/core/pool_allocator.cpp -o sfwl/core/pool_allocator.o
ccache g++ -Wall -D_REENTRANT -g -Isfwl -c sfwl/core/mutex.cpp -o sfwl/core/mutex.o
ccache g++ -Wall -D_REENTRANT -g -Isfwl -c sfwl/core/sfw_time.cpp -o sfwl/core/sfw_time.o
ccache g++ -Wall -D_REENTRANT -g -Isfw -c sfw/core/thread.cpp -o sfw/core/thread.o
ccache g++ -Wall -D_REENTRANT -g -Isfw -c sfw/core/socket.cpp -o sfw/core/socket.o
ccache g++ -Wall -D_REENTRANT -g -Isfw -c sfw/core/inet_address.cpp -o sfw/core/inet_address.o
ccache g++ -Wall -D_REENTRANT -g -Isfwl -c sfwl/core/thread.cpp -o sfwl/core/thread.o
ccache g++ -Wall -D_REENTRANT -g -Isfwl -c sfwl/core/socket.cpp -o sfwl/core/socket.o
ccache g++ -Wall -D_REENTRANT -g -Isfwl -c sfwl/core/inet_address.cpp -o sfwl/core/inet_address.o
ccache g++ -Wall -D_REENTRANT -g -Isfw -c sfw/core/sub_process.cpp -o sfw/core/sub_process.o
ccache g++ -Wall -D_REENTRANT -g -Isfwl -c sfwl/core/sub_process.cpp -o sfwl/core/sub_process.o
ccache g++ -Wall -D_REENTRANT -g -Isfw -c sfw/core/sfw_core.cpp -o sfw/core/sfw_core.o
ccache g++ -Wall -D_REENTRANT -g -Isfwl -c sfwl/core/sfw_core.cpp -o sfwl/core/sfw_core.o
ccache g++ -Wall -D_REENTRANT -g -Isfw -c sfw/object/object.cpp -o sfw/object/object.o
ccache g++ -Wall -D_REENTRANT -g -Isfw -c sfw/object/reference.cpp -o sfw/object/reference.o
ccache g++ -Wall -D_REENTRANT -g -Isfw -c sfw/object/core_string_names.cpp -o sfw/object/core_string_names.o
ccache g++ -Wall -D_REENTRANT -g -Isfw -c sfw/object/variant.cpp -o sfw/object/variant.o
ccache g++ -Wall -D_REENTRANT -g -Isfw -c sfw/object/variant_op.cpp -o sfw/object/variant_op.o
ccache g++ -Wall -D_REENTRANT -g -Isfw -c sfw/object/psignal.cpp -o sfw/object/psignal.o
ccache g++ -Wall -D_REENTRANT -g -Isfw -c sfw/object/array.cpp -o sfw/object/array.o
ccache g++ -Wall -D_REENTRANT -g -Isfw -c sfw/object/dictionary.cpp -o sfw/object/dictionary.o
ccache g++ -Wall -D_REENTRANT -g -Isfw -c sfw/object/ref_ptr.cpp -o sfw/object/ref_ptr.o
ccache g++ -Wall -D_REENTRANT -g -Isfw -c sfw/object/resource.cpp -o sfw/object/resource.o
ccache g++ -Wall -D_REENTRANT -g -Isfwl -c sfwl/object/object.cpp -o sfwl/object/object.o
ccache g++ -Wall -D_REENTRANT -g -Isfwl -c sfwl/object/reference.cpp -o sfwl/object/reference.o
ccache g++ -Wall -D_REENTRANT -g -Isfwl -c sfwl/object/core_string_names.cpp -o sfwl/object/core_string_names.o
ccache g++ -Wall -D_REENTRANT -g -Isfwl -c sfwl/object/variant.cpp -o sfwl/object/variant.o
ccache g++ -Wall -D_REENTRANT -g -Isfwl -c sfwl/object/variant_op.cpp -o sfwl/object/variant_op.o
ccache g++ -Wall -D_REENTRANT -g -Isfwl -c sfwl/object/psignal.cpp -o sfwl/object/psignal.o
ccache g++ -Wall -D_REENTRANT -g -Isfwl -c sfwl/object/array.cpp -o sfwl/object/array.o
ccache g++ -Wall -D_REENTRANT -g -Isfwl -c sfwl/object/dictionary.cpp -o sfwl/object/dictionary.o
ccache g++ -Wall -D_REENTRANT -g -Isfwl -c sfwl/object/ref_ptr.cpp -o sfwl/object/ref_ptr.o
ccache g++ -Wall -D_REENTRANT -g -Isfwl -c sfwl/object/resource.cpp -o sfwl/object/resource.o
ccache g++ -Wall -D_REENTRANT -g -Isfw -c sfw/main.cpp -o sfw/main.o
ccache g++ -Wall -D_REENTRANT -g -Isfwl -c sfwl/main.cpp -o sfwl/main.o
# You might need to add -lpthread and/or -latomic depending on your compiler version (add it near -lX11)
ccache g++ -Wall -D_REENTRANT -g sfw/core/aabb.o sfw/core/basis.o sfw/core/color.o \
sfw/core/face3.o sfw/core/logger.o sfw/core/math_funcs.o \
sfw/core/memory.o sfw/core/pcg.o sfw/core/plane.o sfw/core/projection.o sfw/core/quaternion.o sfw/core/random_pcg.o \
sfw/core/rect2.o sfw/core/rect2i.o sfw/core/safe_refcount.o sfw/core/transform_2d.o sfw/core/transform.o \
sfw/core/ustring.o sfw/core/string_name.o \
sfw/core/vector2.o sfw/core/vector2i.o sfw/core/vector3.o \
sfw/core/vector3i.o sfw/core/vector4.o sfw/core/vector4i.o \
sfw/core/pool_vector.o sfw/core/pool_allocator.o sfw/core/mutex.o sfw/core/sfw_time.o \
sfw/core/dir_access.o sfw/core/file_access.o sfw/core/thread.o \
sfw/core/socket.o sfw/core/inet_address.o \
sfw/core/sub_process.o \
sfw/core/sfw_core.o \
sfw/object/object.o sfw/object/reference.o sfw/object/core_string_names.o \
sfw/object/variant.o sfw/object/variant_op.o sfw/object/psignal.o \
sfw/object/array.o sfw/object/dictionary.o sfw/object/ref_ptr.o \
sfw/object/resource.o \
sfw/main.o \
ccache g++ -Wall -D_REENTRANT -g sfwl/core/color.o \
sfwl/core/logger.o sfwl/core/math_funcs.o \
sfwl/core/memory.o sfwl/core/pcg.o sfwl/core/random_pcg.o \
sfwl/core/safe_refcount.o \
sfwl/core/ustring.o sfwl/core/string_name.o \
sfwl/core/pool_vector.o sfwl/core/pool_allocator.o sfwl/core/mutex.o sfwl/core/sfw_time.o \
sfwl/core/dir_access.o sfwl/core/file_access.o sfwl/core/thread.o \
sfwl/core/socket.o sfwl/core/inet_address.o \
sfwl/core/sub_process.o \
sfwl/core/sfw_core.o \
sfwl/object/object.o sfwl/object/reference.o sfwl/object/core_string_names.o \
sfwl/object/variant.o sfwl/object/variant_op.o sfwl/object/psignal.o \
sfwl/object/array.o sfwl/object/dictionary.o sfwl/object/ref_ptr.o \
sfwl/object/resource.o \
sfwl/main.o \
-o sfwl_app

View File

@ -1,21 +0,0 @@
#ifdef __EMSCRIPTEN__
#include <emscripten.h>
#endif // __EMSCRIPTEN__
#include "game_application.h"
int main(int argc, char **argv) {
Application *application = memnew(GameApplication());
#ifdef __EMSCRIPTEN__
emscripten_set_main_loop(&Application::main_loop_static, 0, 1);
#else
while (application->running) {
application->main_loop();
}
#endif // __EMSCRIPTEN__
memdelete(application);
return 0;
}

10
sfwl/main.cpp Normal file
View File

@ -0,0 +1,10 @@
#include "core/ustring.h"
#include "core/error_macros.h"
int main(int argc, char **argv) {
ERR_PRINT(itos(23));
ERR_PRINT("TEST");
return 0;
}