moonbridge

changeset 331:247d9d029306

Improved Makefile to allow manual selection of PLATFORM and DISTRIBUTION; Emit warning if platform or Linux distribution could not be determined
author jbe
date Fri Feb 05 14:27:08 2021 +0100 (2021-02-05)
parents 73303a85266f
children 86d9377cc615
files Makefile
line diff
     1.1 --- a/Makefile	Fri Feb 05 14:11:54 2021 +0100
     1.2 +++ b/Makefile	Fri Feb 05 14:27:08 2021 +0100
     1.3 @@ -1,7 +1,9 @@
     1.4  # BSD Makefile
     1.5  # On GNU systems, use bmake.
     1.6  
     1.7 +.ifndef PLATFORM
     1.8  PLATFORM != uname
     1.9 +.endif
    1.10  
    1.11  .if $(PLATFORM) == "FreeBSD"
    1.12  # Default configuration for FreeBSD
    1.13 @@ -12,7 +14,9 @@
    1.14  
    1.15  .elif $(PLATFORM) == "Linux"
    1.16  # Distinguish between different Linux distributions
    1.17 +.ifndef DISTRIBUTION
    1.18  DISTRIBUTION != lsb_release -i -s
    1.19 +.endif
    1.20  .if $(DISTRIBUTION) == "Debian" || $(DISTRIBUTION) == "Raspbian"
    1.21  # Default configuration for Debian
    1.22  LUA_INCLUDE ?= /usr/include/lua5.3
    1.23 @@ -27,6 +31,7 @@
    1.24  UTIL_FLAGS  ?= -ldl -lbsd
    1.25  .else
    1.26  # Default configuration for other Linux distributions
    1.27 +.warning Could not determine Linux distribution. You might need to set LUA_INCLUDE, LUA_LIBDIR, LUA_LIBRARY, and UTIL_FLAGS manually!
    1.28  LUA_INCLUDE ?= /usr/include
    1.29  LUA_LIBDIR  ?= /usr/lib
    1.30  LUA_LIBRARY ?= lua
    1.31 @@ -35,6 +40,7 @@
    1.32  
    1.33  .else
    1.34  # Default configuration for other systems
    1.35 +.warning Could not determine Platform. You might need to set LUA_INCLUDE, LUA_LIBDIR, LUA_LIBRARY, and UTIL_FLAGS manually!
    1.36  LUA_INCLUDE ?= /usr/include
    1.37  LUA_LIBDIR  ?= /usr/lib
    1.38  LUA_LIBRARY ?= lua

Impressum / About Us