Skip to content

Commit 9250920

Browse files
committed
WIP: fix Makefile
1 parent 4b5b0f3 commit 9250920

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

Makefile

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,23 @@ RM = rm -f
44
CFLAG = -shared -fPIC
55
TARGET = bigdecimal.so
66

7+
LUA_INCLUDE_DIR ?=
8+
LUA_LIBRARIES ?=
79
BIGDECIMAL_SOURCES = lib/bigdecimal/bigdecimal.cpp
810
BIGDECIMAL_INCLUDE_DIR = lib/bigdecimal
911

1012
BUILD_CFLAGS = $(CFLAG) -I $(BIGDECIMAL_INCLUDE_DIR)
1113
SOURCE = $(BIGDECIMAL_SOURCES) lua_bigdecimal.c
1214

15+
16+
ifneq ($(LUA_INCLUDE_DIR),)
17+
BUILD_CFLAGS+= -I $(LUA_INCLUDE_DIR)
18+
endif
19+
ifneq ($(LUA_LIBRARIES),)
20+
BUILD_CFLAGS+= -L $(LUA_LIBRARIES)
21+
endif
22+
23+
1324
all: $(TARGET)
1425

1526
$(TARGET):

0 commit comments

Comments
 (0)