diff options
author | Joshua Haberman <joshua@reverberate.org> | 2010-07-18 22:45:15 -0700 |
---|---|---|
committer | Joshua Haberman <joshua@reverberate.org> | 2010-07-18 22:45:15 -0700 |
commit | 5871ed0d02ff69b20b65f577dd3be18a2e92dec7 (patch) | |
tree | 72f3d51fdf0a42e9cf3b5303b8fee7833fce2a1c /Makefile | |
parent | 4b6c8b6b2317436ab77b38e17b49a7c7b03bf3f4 (diff) |
First go at Lua bindings.
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -30,6 +30,13 @@ CFLAGS=-std=c99 INCLUDE=-Idescriptor -Icore -Itests -Istream -I. CPPFLAGS=-Wall -Wextra -g $(INCLUDE) $(strip $(shell test -f perf-cppflags && cat perf-cppflags)) LDLIBS=-lpthread +ifeq ($(shell uname), Darwin) + CPPFLAGS += -I/usr/include/lua5.1 + LDFLAGS += -L/usr/local/lib -llua +else + CFLAGS += $(strip $(shell pkg-config --silence-errors --cflags lua || pkg-config --cflags lua5.1)) + LDFLAGS += $(strip $(shell pkg-config --silence-errors --libs lua || pkg-config --libs lua5.1)) +endif LIBUPB=core/libupb.a LIBUPB_PIC=core/libupb_pic.a @@ -59,6 +66,9 @@ core/upb_def.o: core/upb_def.c core/upb_def.lo: core/upb_def.c $(CC) $(CFLAGS) $(CPPFLAGS) -Os -c -o $@ $< -fPIC +lang_ext/lua/upb.so: lang_ext/lua/upb.lo + $(CC) $(CFLAGS) $(CPPFLAGS) -shared -o $@ $< core/libupb_pic.a + STATICOBJ=$(patsubst %.c,%.o,$(SRC)) SHAREDOBJ=$(patsubst %.c,%.lo,$(SRC)) |