mirror of
https://github.com/Relintai/sfw.git
synced 2025-01-17 14:47:18 +01:00
OSX amalgamated build fix.
This commit is contained in:
parent
8d4acb7293
commit
c998970d73
@ -6,29 +6,42 @@
|
|||||||
|
|
||||||
// On OSX you need to compile this file separately with an objective c compiler
|
// On OSX you need to compile this file separately with an objective c compiler
|
||||||
|
|
||||||
|
#ifndef ONLY_GLAD
|
||||||
|
|
||||||
#ifdef __APPLE__
|
#ifdef __APPLE__
|
||||||
|
|
||||||
|
#ifndef _APPLE_NO_IMPL_
|
||||||
|
|
||||||
#ifndef SFW_3RD_IMPL
|
#ifndef SFW_3RD_IMPL
|
||||||
#define SFW_3RD_IMPL
|
#define SFW_3RD_IMPL
|
||||||
#endif
|
#endif //SFW_3RD_IMPL
|
||||||
|
|
||||||
|
#endif //_APPLE_NO_IMPL_
|
||||||
|
|
||||||
#endif //__APPLE__
|
#endif //__APPLE__
|
||||||
|
|
||||||
#ifdef SFW_3RD_IMPL
|
#ifdef SFW_3RD_IMPL
|
||||||
#define GLAD_GL_IMPLEMENTATION // glad
|
#define GLAD_GL_IMPLEMENTATION // glad
|
||||||
#endif
|
#endif //SFW_3RD_IMPL
|
||||||
|
|
||||||
|
#endif //ONLY_GLAD
|
||||||
|
|
||||||
{{FILE:sfw/render_core/3rd_glad.h}}
|
{{FILE:sfw/render_core/3rd_glad.h}}
|
||||||
|
|
||||||
|
#ifndef ONLY_GLAD
|
||||||
|
|
||||||
#ifdef SFW_3RD_IMPL
|
#ifdef SFW_3RD_IMPL
|
||||||
#define STB_TRUETYPE_IMPLEMENTATION
|
#define STB_TRUETYPE_IMPLEMENTATION
|
||||||
|
#endif //SFW_3RD_IMPL
|
||||||
|
|
||||||
{{FILE:sfw/render_core/3rd_stb_truetype.h}}
|
{{FILE:sfw/render_core/3rd_stb_truetype.h}}
|
||||||
|
|
||||||
|
#ifdef SFW_3RD_IMPL
|
||||||
#define STB_IMAGE_IMPLEMENTATION // stbi
|
#define STB_IMAGE_IMPLEMENTATION // stbi
|
||||||
#define STB_IMAGE_WRITE_IMPLEMENTATION // stbi_write
|
#define STB_IMAGE_WRITE_IMPLEMENTATION // stbi_write
|
||||||
#define STB_SPRINTF_IMPLEMENTATION // stb_sprintf
|
#define STB_SPRINTF_IMPLEMENTATION // stb_sprintf
|
||||||
#define STB_SPRINTF_NOUNALIGNED // stb_sprintf
|
#define STB_SPRINTF_NOUNALIGNED // stb_sprintf
|
||||||
|
#endif //SFW_3RD_IMPL
|
||||||
|
|
||||||
{{FILE:sfw/render_core/3rd_stb_image.h}}
|
{{FILE:sfw/render_core/3rd_stb_image.h}}
|
||||||
|
|
||||||
@ -37,6 +50,8 @@
|
|||||||
//---
|
//---
|
||||||
#undef freelist
|
#undef freelist
|
||||||
|
|
||||||
|
#ifdef SFW_3RD_IMPL
|
||||||
|
|
||||||
#define _GLFW_IMPLEMENTATION // glfw337
|
#define _GLFW_IMPLEMENTATION // glfw337
|
||||||
#define GLFW_INCLUDE_NONE // glfw337
|
#define GLFW_INCLUDE_NONE // glfw337
|
||||||
#ifdef __APPLE__
|
#ifdef __APPLE__
|
||||||
@ -49,9 +64,12 @@
|
|||||||
|
|
||||||
#undef _GNU_SOURCE
|
#undef _GNU_SOURCE
|
||||||
|
|
||||||
|
#endif //SFW_3RD_IMPL
|
||||||
|
|
||||||
{{FILE:sfw/render_core/3rd_glfw3.h}}
|
{{FILE:sfw/render_core/3rd_glfw3.h}}
|
||||||
|
|
||||||
#undef timeGetTime
|
#undef timeGetTime
|
||||||
#undef Time
|
#undef Time
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -17,7 +17,19 @@
|
|||||||
#include <memory.h>
|
#include <memory.h>
|
||||||
|
|
||||||
#ifndef SFW_H
|
#ifndef SFW_H
|
||||||
|
|
||||||
|
#ifdef __APPLE__
|
||||||
|
#ifndef _APPLE_NO_IMPL_
|
||||||
|
#define _APPLE_NO_IMPL_
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "sfw.h"
|
#include "sfw.h"
|
||||||
|
|
||||||
|
#undef ONLY_GLAD
|
||||||
|
|
||||||
|
#include "sfw_3rd.m"
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// On OSX sfw_3rd.m has to be compiled manually on Objective C Mode.
|
// On OSX sfw_3rd.m has to be compiled manually on Objective C Mode.
|
||||||
|
@ -818,6 +818,15 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef GLAD_GL_H_
|
#ifndef GLAD_GL_H_
|
||||||
|
|
||||||
|
#ifdef __APPLE__
|
||||||
|
#ifndef _APPLE_NO_IMPL_
|
||||||
|
#define _APPLE_NO_IMPL_
|
||||||
|
#endif //_APPLE_NO_IMPL_
|
||||||
|
#endif //__APPLE__
|
||||||
|
|
||||||
|
#define ONLY_GLAD
|
||||||
|
|
||||||
#include "sfw_3rd.m"
|
#include "sfw_3rd.m"
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
@ -1,12 +1,17 @@
|
|||||||
cp -u ../out/full/sfw.h sfw.h
|
rm sfw.h
|
||||||
cp -u ../out/full/sfw.cpp sfw.cpp
|
rm sfw.cpp
|
||||||
cp -u ../out/full/sfw_3rd.m sfw_3rd.m
|
rm sfw_3rd.m
|
||||||
|
|
||||||
|
cp ../out/full/sfw.h sfw.h
|
||||||
|
cp ../out/full/sfw.cpp sfw.cpp
|
||||||
|
cp ../out/full/sfw_3rd.m sfw_3rd.m
|
||||||
|
|
||||||
export SDKROOT=$(xcrun --show-sdk-path)
|
export SDKROOT=$(xcrun --show-sdk-path)
|
||||||
|
|
||||||
export args="-std=c++14 -w -framework cocoa -framework iokit -framework CoreFoundation -framework CoreAudio -framework AudioToolbox "
|
export args="-std=c++14 -w -framework cocoa -framework iokit -framework CoreFoundation -framework CoreAudio -framework AudioToolbox "
|
||||||
|
|
||||||
clang++ $args -g -c sfw.cpp -o sfw.o
|
clang++ $args -g -c sfw.cpp -o sfw.o
|
||||||
|
|
||||||
clang++ -w -framework cocoa -framework iokit -framework CoreFoundation -framework CoreAudio -framework AudioToolbox -g -c sfw_3rd.m -o sfw_3rd.o
|
clang++ -w -framework cocoa -framework iokit -framework CoreFoundation -framework CoreAudio -framework AudioToolbox -g -c sfw_3rd.m -o sfw_3rd.o
|
||||||
|
|
||||||
clang++ $args -g -c game_scene.cpp -o game_scene.o
|
clang++ $args -g -c game_scene.cpp -o game_scene.o
|
||||||
|
Loading…
Reference in New Issue
Block a user