Commit 432e84a8 authored by Jaromil's avatar Jaromil
Browse files

general python flags

if -fPIC error arises again, that's due to make clean needed
parent ba6c107f
...@@ -136,14 +136,14 @@ linux-lib: cflags += -shared -DLIBRARY ...@@ -136,14 +136,14 @@ linux-lib: cflags += -shared -DLIBRARY
linux-python: apply-patches lua53 milagro lpeglabel linux-python: apply-patches lua53 milagro lpeglabel
swig -python ${pwd}/build/swig.i swig -python ${pwd}/build/swig.i
${gcc} ${cflags} -c ${pwd}/build/swig_wrap.c \ ${gcc} ${cflags} -c ${pwd}/build/swig_wrap.c \
-o src/zen_python.o $(shell pkg-config python --cflags) -o src/zen_python.o
CC=${gcc} CFLAGS="${cflags}" LDFLAGS="${ldflags}" LDADD="${ldadd}" \ CC=${gcc} CFLAGS="${cflags}" LDFLAGS="${ldflags}" LDADD="${ldadd}" \
make -C src python make -C src python
osx-python: apply-patches lua53 milagro lpeglabel osx-python: apply-patches lua53 milagro lpeglabel
swig -python ${pwd}/build/swig.i swig -python ${pwd}/build/swig.i
${gcc} ${cflags} -c ${pwd}/build/swig_wrap.c \ ${gcc} ${cflags} -c ${pwd}/build/swig_wrap.c \
-o src/zen_python.o $(shell pkg-config python --cflags) -o src/zen_python.o
CC=${gcc} CFLAGS="${cflags}" LDFLAGS="${ldflags}" LDADD="${ldadd}" \ CC=${gcc} CFLAGS="${cflags}" LDFLAGS="${ldflags}" LDADD="${ldadd}" \
make -C src python make -C src python
......
...@@ -68,6 +68,11 @@ ldflags := -lm ...@@ -68,6 +68,11 @@ ldflags := -lm
system := Darwin system := Darwin
endif endif
ifneq (,$(findstring python,$(MAKECMDGOALS)))
cflags += $(shell pkg-config python --cflags)
ldflags += $(shell pkg-config python --libs)
endif
ifneq (,$(findstring javascript,$(MAKECMDGOALS))) ifneq (,$(findstring javascript,$(MAKECMDGOALS)))
gcc := ${EMSCRIPTEN}/emcc gcc := ${EMSCRIPTEN}/emcc
ar := ${EMSCRIPTEN}/emar ar := ${EMSCRIPTEN}/emar
......
...@@ -55,7 +55,7 @@ linux-lib: ${SOURCES} ...@@ -55,7 +55,7 @@ linux-lib: ${SOURCES}
${CC} ${CFLAGS} ${SOURCES} -o libzenroom-${ARCH}-${VERSION}-${BRANCH}-${HASH}.so ${LDFLAGS} ${LDADD} ${CC} ${CFLAGS} ${SOURCES} -o libzenroom-${ARCH}-${VERSION}-${BRANCH}-${HASH}.so ${LDFLAGS} ${LDADD}
python: ${SOURCES} python: ${SOURCES}
${LD} -shared ${SOURCES} zen_python.o -o _zenroom.so ${LDFLAGS} ${LDADD} ${LD} -shared ${SOURCES} zen_python.o -o _zenroom.so ${LDFLAGS} ${LDADD} $(shell pkg-config python --libs)
go: ${SOURCES} go: ${SOURCES}
${LD} -shared ${SOURCES} zen_go.o -o libzenroomgo.so ${LDFLAGS} ${LDADD} ${LD} -shared ${SOURCES} zen_go.o -o libzenroomgo.so ${LDFLAGS} ${LDADD}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment