diff options
author | Rob Kendrick (solaris) <rjek@rjek.com> | 2013-03-29 14:18:01 +0000 |
---|---|---|
committer | Rob Kendrick (solaris) <rjek@rjek.com> | 2013-03-29 14:18:01 +0000 |
commit | 200befa8f07cd5d40938997eb298e51a95560c4c (patch) | |
tree | 44b41b3e59da081471f378dd7d3feb20d0fe0860 | |
parent | c425fd12f34ac50407b24c65f1f9e228ed3da615 (diff) | |
download | luxio-200befa8f07cd5d40938997eb298e51a95560c4c.tar.gz |
Check if CC is meaningfull, and override if not. For Solaris.
-rw-r--r-- | Makefile | 9 |
1 files changed, 7 insertions, 2 deletions
@@ -6,6 +6,11 @@ ifeq ($(strip $(shell which pkg-config > /dev/null || echo NONE)),NONE) $(error This makefile requires pkg-config) endif +ifeq ($(strip $(shell which $(CC) > /dev/null || echo NONE)),NONE) + $(info Luxio: Hmm, CC make variable contains nonsense. Overriding to gcc.) + CC := gcc +endif + # This isn't nice. Find a nice way. HOST_OS := $(shell uname -s) @@ -15,7 +20,7 @@ else EXTRA_LIBS := endif -NAKED_LUA_VER := $(shell pkg-config --variable V lua) +NAKED_LUA_VER := $(shell (pkg-config --modversion lua || pkg-config --variable V lua) | cut -d. -f1-2) # fine appropriate Lua interpreter LUA_REPL := $(shell (which lua5.1 > /dev/null 2>&1 && echo lua5.1) || \ @@ -31,6 +36,7 @@ LUA51_PKG := $(shell (pkg-config --exists lua5.1 && echo lua5.1) || \ (pkg-config --exists lua51 && echo lua51) || \ (echo "NONE")) + LUA51_PKG := $(strip $(LUA51_PKG)) ifeq ($(LUA51_PKG),NONE) @@ -102,7 +108,6 @@ endif CFLAGS ?= -O2 -Wall -CC ?= gcc INSTALL := /usr/bin/install LUALIBS := $(patsubst %,luxio/%.lua, \ |