-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathunitybuild_macos.c
82 lines (76 loc) · 2.32 KB
/
unitybuild_macos.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
/*
This file is a 'unity build', a build where all files are unified
into 1 translation unit to make the compiler's job easier and
faster. It has nothing to do with the Unity game engine.
When compiling, use this file as the only input. All other files
are included here, so passing anything else will cause duplicate
symbols.
Example:
MAC_FRAMEWORKS="
-framework AppKit
-framework MetalKit
-framework Metal
-framework AudioToolbox"
gcc -x objective-c -std="c99" -objC -O0 $MAC_FRAMEWORKS unitybuild.c -o build/unitybuild;
*/
#define SHARED_APPLE_PLATFORM
#ifdef NS_BLOCK_ASSERTIONS
#define NDEBUG
#endif
#ifdef NDEBUG
#define INFLATE_SILENCE
#define INFLATE_IGNORE_ASSERTS
#define DECODE_PNG_SILENCE
#define DECODE_PNG_IGNORE_CRC_CHECKS
#define DECODE_PNG_IGNORE_ASSERTS
#define DECODE_BMP_SILENCE
#define DECODE_BMP_IGNORE_ASSERTS
#define COMMON_IGNORE_ASSERTS
#define COMMON_SILENCE
#define LOGGER_SILENCE
#define LOGGER_IGNORE_ASSERTS
#endif
// 1. Files that don't know about the platform layer
#include "inflate.c"
#include "decode_png.c"
#include "decode_bmp.c"
#include "decodedimage.c"
#include "wav.c"
#include "objparser.c"
#include "common.c"
#include "logger.c"
#include "collision.c"
#include "objectid.c"
#include "audio.c"
#include "window_size.c"
#include "triangle.c"
#include "lightsource.c"
#include "cpu_to_gpu_types.c"
// 2. Files that are part of the basic platform layer
#include "apple_audio.m"
#include "common_platform_layer.c"
#include "macos_platform_layer.m"
#include "apple_platform_layer.m"
#include "linux_apple_platform_layer.c"
// 3. Files that are dependent on the platform layer
#include "memorystore.c"
#include "objmodel.c"
#include "userinput.c"
#include "tok_random.c"
// 4. Platform layer part 2: metal
#include "gpu.m"
// 5. Files that are dependent on the GPU platform layer
#include "texture_array.c"
#include "lines.c"
#include "zpolygon.c"
#include "particle.c"
#include "scheduled_animations.c" // requires zpolygon & parti
#include "text.c"
#include "uielement.c"
#include "clientlogic.c" // requires text and uielement
// #include "clientlogic_particledesigner.c" // requires text and uielement
#include "terminal.c" // requires clientlogic
#include "renderer.c" // requires zpoly & part
#include "gameloop.c" // requires renderer
#include "init_application.c" // requires gameloop
#include "macos_main.m"