Skip to content

Commit

Permalink
make sure we're linking statically against luajit
Browse files Browse the repository at this point in the history
  • Loading branch information
richardhundt committed Oct 7, 2012
1 parent 86f91f4 commit 833d5a1
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,15 @@ OS_NAME=$(shell uname -s)
MH_NAME=$(shell uname -m)

CFLAGS=-O2 -Wall
LFLAGS=-lluv -lluajit -lstdc++ -lm -ldl -lpthread
LDFLAGS=-lluv -lluajit -lstdc++ -lm -ldl -lpthread

ifeq (${OS_NAME}, Darwin)
ifeq (${MH_NAME}, x86_64)
CFLAGS+=-pagezero_size 10000 -image_base 100000000 -framework CoreServices
endif
else
CFLAGS+=-Wl,-E -fomit-frame-pointer -fno-stack-protector
LFLAGS+=-lrt
LDFLAGS+=-lrt
endif

INCS=-I${LUVDIR}/src -I${LUADIR}/src -L${LUADIR}/src -L${LUVDIR}/src -I${LUVDIR}/src/zmq/include -I${LUVDIR}/src/uv/include
Expand All @@ -29,7 +29,7 @@ all: ${BINDIR}/lupa
${BINDIR}/lupa: ${DEPS}
mkdir -p ${BLDDIR}
mkdir -p ${BINDIR}
${CC} ${CFLAGS} ${INCS} -o ${BINDIR}/lupa ${SRCDIR}/lib_init.c ${SRCDIR}/lupa.c ${LPEGDIR}/lpeg.o ${LFLAGS}
${CC} ${CFLAGS} ${INCS} -o ${BINDIR}/lupa ${SRCDIR}/lib_init.c ${SRCDIR}/lupa.c ${LUADIR}/src/libluajit.a ${LPEGDIR}/lpeg.o ${LDFLAGS}

${LUADIR}/src/libluajit.a:
git submodule update --init ${LUADIR}
Expand Down

0 comments on commit 833d5a1

Please sign in to comment.