libbuild2-autoconf/libbuild2-autoconf-tests/checks/byte-order/buildfile

24 lines
545 B
Plaintext
Raw Normal View History

2022-01-14 13:27:20 +00:00
# Build two executables: one with no macros defined and one with
# _POSIX_C_SOURCE defined.
#
# _POSIX_C_SOURCE and similar macros can affect whether or not BYTE_ORDER,
# BIG_ENDIAN, and LITTLE_ENDIAN are defined. Only do _POSIX_C_SOURCE here
# because the others are used much less frequently.
#
./: exe{driver}: c{driver}
./: h{config}: in{config}
c.poptions += "-I$out_base"
if ($c.target.system != 'win32-msvc')
{
./: exe{driver-posix}: obje{driver-posix}
obje{driver-posix}: c{driver}
{
c.poptions += -D_POSIX_C_SOURCE
}
}