Python 3.2 is installed like this:
./configure --prefix=/opt/python3
make
make install
How do i have to edit the makefile to work with the python installation?
Problem:
Midstate "make" does print an error:
root@j064:/opt/midstate# make
gcc -march=native -Wall -funroll-all-loops -O3 -fstrict-aliasing -Wall -std=c99 -I/opt/python3/ midstatemodule.c -o test -Wl,-O1 -Wl,--as-needed -lpython3
midstatemodule.c:5:20: error: Python.h: Datei oder Verzeichnis nicht gefunden
midstatemodule.c:96: error: expected â=â, â,â, â;â, âasmâ or â__attribute__â before â*â token
midstatemodule.c:138: error: array type has incomplete element type
midstatemodule.c:139: error: âmidstate_helperâ undeclared here (not in a function)
midstatemodule.c:139: error: âMETH_Oâ undeclared here (not in a function)
midstatemodule.c:144: error: variable âmidstatemoduleâ has initializer but incomplete type
midstatemodule.c:145: error: âPyModuleDef_HEAD_INITâ undeclared here (not in a function)
midstatemodule.c:145: warning: excess elements in struct initializer
midstatemodule.c:145: warning: (near initialization for âmidstatemoduleâ)
midstatemodule.c:146: warning: excess elements in struct initializer
midstatemodule.c:146: warning: (near initialization for âmidstatemoduleâ)
midstatemodule.c:147: warning: excess elements in struct initializer
midstatemodule.c:147: warning: (near initialization for âmidstatemoduleâ)
midstatemodule.c:148: warning: excess elements in struct initializer
midstatemodule.c:148: warning: (near initialization for âmidstatemoduleâ)
midstatemodule.c:149: warning: excess elements in struct initializer
midstatemodule.c:149: warning: (near initialization for âmidstatemoduleâ)
midstatemodule.c:150: warning: excess elements in struct initializer
midstatemodule.c:150: warning: (near initialization for âmidstatemoduleâ)
midstatemodule.c:151: warning: excess elements in struct initializer
midstatemodule.c:151: warning: (near initialization for âmidstatemoduleâ)
midstatemodule.c:152: warning: excess elements in struct initializer
midstatemodule.c:152: warning: (near initialization for âmidstatemoduleâ)
midstatemodule.c:154: warning: excess elements in struct initializer
midstatemodule.c:154: warning: (near initialization for âmidstatemoduleâ)
midstatemodule.c:157: error: expected â=â, â,â, â;â, âasmâ or â__attribute__â before âPyInit_midstateâ
make: *** [test] Fehler 1
https://gitorious.org/midstate/midstate/blobs/master/MakefileCC = gcc
CFLAGS = -march=native -Wall -funroll-all-loops -O3 -fstrict-aliasing -Wall -std=c99 -I/usr/include/python3.2
LDFLAGS = -Wl,-O1 -Wl,--as-needed -lpython3.2
all: test midstate.so
test: midstatemodule.c
$(CC) $(CFLAGS) midstatemodule.c -o test $(LDFLAGS)
midstate.so: midstatemodule.c
$(CC) $(CFLAGS) -fPIC -shared midstatemodule.c -o midstate.so $(LDFLAGS)
.PHONY: clean
clean:
rm -f midstate.so test