Skip to content

Commit

Permalink
scripts: waifulib: library_naming: make file true_postfix.txt during …
Browse files Browse the repository at this point in the history
…configure with real platform info
  • Loading branch information
a1batross committed Nov 18, 2024
1 parent 82f85a4 commit fab8cfe
Showing 1 changed file with 15 additions and 6 deletions.
21 changes: 15 additions & 6 deletions scripts/waifulib/library_naming.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,12 @@ def configure(conf):
# engine/common/build.c
if conf.env.XASH_ANDROID:
buildos = "android"
elif conf.env.XASH_WIN32 or conf.env.XASH_LINUX or conf.env.XASH_APPLE:
buildos = "" # no prefix for default OS
elif conf.env.XASH_WIN32:
buildos = "win32"
elif conf.env.XASH_LINUX:
buildos = "linux"
elif conf.env.XASH_APPLE:
buildos = "apple"
elif conf.env.XASH_FREEBSD:
buildos = "freebsd"
elif conf.env.XASH_NETBSD:
Expand Down Expand Up @@ -110,10 +114,7 @@ def configure(conf):
if conf.env.XASH_AMD64:
buildarch = "amd64"
elif conf.env.XASH_X86:
if conf.env.XASH_WIN32 or conf.env.XASH_LINUX or conf.env.XASH_APPLE:
buildarch = ""
else:
buildarch = "i386"
buildarch = "i386"
elif conf.env.XASH_ARM and conf.env.XASH_64BIT:
buildarch = "arm64"
elif conf.env.XASH_ARM:
Expand Down Expand Up @@ -166,6 +167,14 @@ def configure(conf):
raise conf.fatal("Place your architecture name in build.h and library_naming.py!\n"
"If this is a mistake, try to fix conditions above and report a bug")

node = conf.bldnode.make_node('true_postfix.txt')
node.write('%s-%s' % (buildos, buildarch))

if not conf.env.XASH_ANDROID and (conf.env.XASH_WIN32 or conf.env.XASH_LINUX or conf.env.XASH_APPLE):
buildos = ''
if conf.env.XASH_X86:
buildarch = ''

conf.env.revert()

if buildos == 'android':
Expand Down

0 comments on commit fab8cfe

Please sign in to comment.