# HG changeset patch # User jbe # Date 1612531628 -3600 # Node ID 247d9d02930633f7a71891b08f93b8902b5d1fe3 # Parent 73303a85266f06ebfd3cbe9c606b26e0ef1c3eb6 Improved Makefile to allow manual selection of PLATFORM and DISTRIBUTION; Emit warning if platform or Linux distribution could not be determined diff -r 73303a85266f -r 247d9d029306 Makefile --- a/Makefile Fri Feb 05 14:11:54 2021 +0100 +++ b/Makefile Fri Feb 05 14:27:08 2021 +0100 @@ -1,7 +1,9 @@ # BSD Makefile # On GNU systems, use bmake. +.ifndef PLATFORM PLATFORM != uname +.endif .if $(PLATFORM) == "FreeBSD" # Default configuration for FreeBSD @@ -12,7 +14,9 @@ .elif $(PLATFORM) == "Linux" # Distinguish between different Linux distributions +.ifndef DISTRIBUTION DISTRIBUTION != lsb_release -i -s +.endif .if $(DISTRIBUTION) == "Debian" || $(DISTRIBUTION) == "Raspbian" # Default configuration for Debian LUA_INCLUDE ?= /usr/include/lua5.3 @@ -27,6 +31,7 @@ UTIL_FLAGS ?= -ldl -lbsd .else # Default configuration for other Linux distributions +.warning Could not determine Linux distribution. You might need to set LUA_INCLUDE, LUA_LIBDIR, LUA_LIBRARY, and UTIL_FLAGS manually! LUA_INCLUDE ?= /usr/include LUA_LIBDIR ?= /usr/lib LUA_LIBRARY ?= lua @@ -35,6 +40,7 @@ .else # Default configuration for other systems +.warning Could not determine Platform. You might need to set LUA_INCLUDE, LUA_LIBDIR, LUA_LIBRARY, and UTIL_FLAGS manually! LUA_INCLUDE ?= /usr/include LUA_LIBDIR ?= /usr/lib LUA_LIBRARY ?= lua