libbuild2-autoconf/libbuild2-autoconf-tests/checks/byte-order/buildfile
2022-01-24 14:53:17 +02:00

24 lines
545 B
Ruby

# 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
}
}