]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - libexec/flua/Makefile
flua: support "require" for binary objects in the base system
[FreeBSD/FreeBSD.git] / libexec / flua / Makefile
1 #! $FreeBSD$
2
3 .include <src.lua.mk>
4
5 LUASRC?=        ${SRCTOP}/contrib/lua/src
6 .PATH: ${LUASRC}
7
8 PROG=   flua
9 WARNS?= 2
10 MAN=    # No manpage; this is internal.
11
12 CWARNFLAGS.gcc+=        -Wno-format-nonliteral
13
14 LIBADD= lua
15
16 # Entry point
17 SRCS+=  lua.c
18
19 # FreeBSD Extensions
20 .PATH: ${.CURDIR}/modules
21 SRCS+=  linit_flua.c
22 SRCS+=  lfs.c lposix.c
23
24 CFLAGS+=        -I${SRCTOP}/lib/liblua -I${.CURDIR}/modules -I${LUASRC}
25 CFLAGS+=        -DLUA_PROGNAME="\"${PROG}\""
26
27 # readline bits; these aren't needed if we're building a bootstrap flua, as we
28 # don't expect that one to see any REPL usage.
29 .if !defined(BOOTSTRAPPING)
30 CFLAGS+=        -DLUA_USE_READLINE
31 CFLAGS+=        -I${SRCTOP}/lib/libedit -I${SRCTOP}/contrib/libedit
32 LIBADD+=        edit
33 .endif
34
35 UCLSRC?=        ${SRCTOP}/contrib/libucl
36 .PATH: ${UCLSRC}/lua
37 SRCS+=  lua_ucl.c
38 CFLAGS+=        -I${UCLSRC}/include -I${UCLSRC}/src -I${UCLSRC}/uthash
39 LIBADD+=        ucl
40
41 LDFLAGS+=       -Wl,-E
42
43 .include <bsd.prog.mk>