Auto-detect platform in makefiles and test runner
Use uname -s to select Linux vs macOS build flags instead of hardcoding. Add -undefined dynamic_lookup for test shared libs on macOS. Set _port=true automatically on non-Linux in ./all.
This commit is contained in:
@@ -6,6 +6,10 @@ CC = gcc
|
||||
|
||||
# compilation should generate Dynamic-Link Libraries
|
||||
CFLAGS = -Wall -O2 -I$(LUA_DIR) -fPIC -shared
|
||||
UNAME = $(shell uname -s)
|
||||
ifeq ($(UNAME),Darwin)
|
||||
CFLAGS += -undefined dynamic_lookup
|
||||
endif
|
||||
|
||||
# libraries used by the tests
|
||||
all: lib1.so lib11.so lib2.so lib21.so lib2-v2.so
|
||||
|
||||
Reference in New Issue
Block a user