1srcs += files( 2 ('endian_' + host_machine.endian() + '.c'), 3 'memaccess.c', 4) 5 6if host_machine.endian() == 'little' 7 add_project_arguments('-D__FLASHROM_LITTLE_ENDIAN__=1', language : 'c') 8endif 9if host_machine.endian() == 'big' 10 add_project_arguments('-D__FLASHROM_BIG_ENDIAN__=1', language : 'c') 11endif 12 13# OpenBSD requires libi386 or libamd64 for I/O port handling 14if host_machine.system() == 'openbsd' 15 if host_machine.cpu_family() == 'x86' 16 libi386 = cc.find_library('i386') 17 deps += libi386 18 elif host_machine.cpu_family() == 'x86_64' 19 libamd64 = cc.find_library('amd64') 20 deps += libamd64 21 endif 22endif 23 24# NetBSD requires libx86 or libx86_64 for I/O port handling 25if host_machine.system() == 'netbsd' 26 if host_machine.cpu_family() == 'x86' 27 libx86 = cc.find_library('x86') 28 deps += libx86 29 elif host_machine.cpu_family() == 'x86_64' 30 libx86_64 = cc.find_library('x86_64') 31 deps += libx86_64 32 endif 33endif 34 35 36# SunOS requires external libraries for network sockets 37# they are used to support serial devices via network 38if host_machine.system() == 'sunos' 39 libsocket = cc.find_library('socket') 40 libnsl = cc.find_library('nsl') 41 deps += [ libsocket, libnsl] 42endif 43