mirror of
https://github.com/cloudwu/skynet.git
synced 2026-07-24 12:20:41 +00:00
add some lua library
This commit is contained in:
42
lpeg/makefile
Normal file
42
lpeg/makefile
Normal file
@@ -0,0 +1,42 @@
|
||||
LIBNAME = lpeg
|
||||
LUADIR = /usr/include/lua5.1/
|
||||
|
||||
COPT = -O2 -DNDEBUG
|
||||
|
||||
CWARNS = -Wall -Wextra -pedantic \
|
||||
-Waggregate-return \
|
||||
-Wbad-function-cast \
|
||||
-Wcast-align \
|
||||
-Wcast-qual \
|
||||
-Wdeclaration-after-statement \
|
||||
-Wdisabled-optimization \
|
||||
-Wmissing-prototypes \
|
||||
-Wnested-externs \
|
||||
-Wpointer-arith \
|
||||
-Wshadow \
|
||||
-Wsign-compare \
|
||||
-Wstrict-prototypes \
|
||||
-Wundef \
|
||||
-Wwrite-strings \
|
||||
# -Wunreachable-code \
|
||||
|
||||
|
||||
CFLAGS = $(CWARNS) $(COPT) -ansi -I$(LUADIR)
|
||||
CC = gcc
|
||||
|
||||
# For Linux
|
||||
DLLFLAGS = -shared -fpic
|
||||
ENV =
|
||||
|
||||
# For Mac OS
|
||||
# ENV = MACOSX_DEPLOYMENT_TARGET=10.4
|
||||
# DLLFLAGS = -bundle -undefined dynamic_lookup
|
||||
|
||||
lpeg.so: lpeg.o
|
||||
env $(ENV) $(CC) $(DLLFLAGS) lpeg.o -o lpeg.so
|
||||
|
||||
lpeg.o: makefile lpeg.c lpeg.h
|
||||
|
||||
test: test.lua re.lua lpeg.so
|
||||
test.lua
|
||||
|
||||
Reference in New Issue
Block a user