Created
September 2, 2014 01:40
-
-
Save zhaozg/f0768b40c65894a96cfd to your computer and use it in GitHub Desktop.
detect lua lib in Makefile
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
exist = $(shell pkg-config --exists luajit; if [ $?=0 ]; then echo "exist"; else echo "notexist"; fi;) | |
ifeq ($(exist), exist) | |
override CFLAGS += $(shell pkg-config luajit --cflags) | |
override LFLAGS += $(shell pkg-config luajit --libs) | |
else | |
exist = $(shell pkg-config --exists lua; if [ $?=0 ]; then echo "exist"; else echo "notexist"; fi;) | |
ifeq ($(exist), exist) | |
override CFLAGS += $(shell pkg-config lua --cflags) | |
override LFLAGS += $(shell pkg-config lua --libs) | |
endif | |
endif | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment