Skip to content

Commit

Permalink
Add platform macros
Browse files Browse the repository at this point in the history
  • Loading branch information
adamscott committed Jul 23, 2023
1 parent 1009da4 commit f6098c1
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 0 deletions.
2 changes: 2 additions & 0 deletions tools/android.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,3 +100,5 @@ def generate(env):
)
env.Append(CCFLAGS=arch_info["ccflags"])
env.Append(LINKFLAGS=["--target=" + arch_info["target"] + env["android_api_level"], "-march=" + arch_info["march"]])

env.Append(CPPDEFINES=["ANDROID_ENABLED", "UNIX_ENABLED"])
2 changes: 2 additions & 0 deletions tools/ios.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,3 +79,5 @@ def generate(env):

env.Append(CCFLAGS=["-isysroot", env["IOS_SDK_PATH"]])
env.Append(LINKFLAGS=["-isysroot", env["IOS_SDK_PATH"], "-F" + env["IOS_SDK_PATH"]])

env.Append(CPPDEFINES=["IOS_ENABLED", "UNIX_ENABLED", "COREAUDIO_ENABLED"])
2 changes: 2 additions & 0 deletions tools/javascript.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,3 +43,5 @@ def generate(env):
env.Append(CCFLAGS=["-O0", "-g"])
elif env["target"] == "release":
env.Append(CCFLAGS=["-O3"])

env.Append(CPPDEFINES=["WEB_ENABLED", "UNIX_ENABLED"])
2 changes: 2 additions & 0 deletions tools/linux.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,5 @@ def generate(env):
elif env["arch"] == "rv64":
env.Append(CCFLAGS=["-march=rv64gc"])
env.Append(LINKFLAGS=["-march=rv64gc"])

env.Append(CPPDEFINES=["LINUX_ENABLED", "UNIX_ENABLED"])
2 changes: 2 additions & 0 deletions tools/macos.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,3 +48,5 @@ def generate(env):
"-Wl,-undefined,dynamic_lookup",
]
)

env.Append(CPPDEFINES=["MACOS_ENABLED", "UNIX_ENABLED", "COREAUDIO_ENABLED", "COREMIDI_ENABLED"])
2 changes: 2 additions & 0 deletions tools/windows.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,3 +70,5 @@ def generate(env):
"-static-libstdc++",
]
)

env.Append(CPPDEFINES=["WINDOWS_ENABLED", "WASAPI_ENABLED", "WINMIDI_ENABLED"])

0 comments on commit f6098c1

Please sign in to comment.