mirror of
https://github.com/troglobit/libuev.git
synced 2026-10-30 12:10:30 +00:00
Lua binding, done coding
This commit is contained in:
1 parent
c3f9d0dc8d
commit
5c817c20ed
6 files changed
+507
-97
No files matched your search
@@ -12,13 +12,14 @@ CROSS_COMPILE=
|
||||
CC=$(CROSS_COMPILE)gcc
|
||||
AR=$(CROSS_COMPILE)ar
|
||||
|
||||
INCLUDE += -I /usr/include/lua5.1/
|
||||
LDFLAGS=-s
|
||||
CFLAGS=-fPIC -g -Os
|
||||
CFLAGS=-fPIC -g -Os $(INCLUDE)
|
||||
|
||||
MAJOR = 1
|
||||
|
||||
all: libuevent.a libuevent.so.$(MAJOR)
|
||||
lua: luauevent.so
|
||||
lua: luevent.so
|
||||
|
||||
libuevent.a: libuevent.o
|
||||
$(AR) r $@ $^
|
||||
@@ -27,8 +28,8 @@ libuevent.a: libuevent.o
|
||||
libuevent.so.$(MAJOR): libuevent.o
|
||||
$(CC) $(LDFLAGS) -shared -o $@ $^ -Wl,-soname=libuevent
|
||||
|
||||
luauevent.so: luauevent.o all
|
||||
$(CC) $(LDFLAGS) -shared -o $@ $^ -L . -l uevent -Wl,-soname=uevent
|
||||
luevent.so: luevent.o all
|
||||
$(CC) $(LDFLAGS) -shared -o $@ $^ -L . -l uevent -Wl,-soname=luevent
|
||||
|
||||
test: all
|
||||
$(CC) -g -o test -D NO_DEBUG test.c libuevent.c && ./test
|
||||
@@ -37,7 +38,7 @@ luatest: lua
|
||||
lua test.lua
|
||||
|
||||
clean:
|
||||
rm -f libuevent.o luauevent.o libuevent.so.$(MAJOR) luauevent.so test
|
||||
rm -f libuevent.o luauevent.o libuevent.so.$(MAJOR) luevent.so test
|
||||
|
||||
|
||||
.PHONY: all test clean luatest lua
|
||||
Reference in new issue
Block a user