diff --git a/python/Makefile b/python/Makefile index 6bba9cd..d70aba5 100644 --- a/python/Makefile +++ b/python/Makefile @@ -1,7 +1,7 @@ all: olm-python2 olm-python3 OLM_HEADERS = ../include/olm/olm.h ../include/olm/inbound_group_session.h \ - ../include/olm/outbound_group_session.h \ + ../include/olm/outbound_group_session.h include/olm/olm.h: $(OLM_HEADERS) mkdir -p include/olm @@ -10,12 +10,15 @@ include/olm/olm.h: $(OLM_HEADERS) echo 'void *memset(void *s, int c, size_t n);' >> include/olm/olm.h include/olm/pk.h: include/olm/olm.h ../include/olm/pk.h - $(CPP) -I dummy -I ../include -o include/olm/pk.h ../include/olm/pk.h + $(CPP) -I dummy -I ../include -o include/olm/pk.h ../include/olm/pk.h include/olm/sas.h: include/olm/olm.h ../include/olm/sas.h $(CPP) -I dummy -I ../include -o include/olm/sas.h ../include/olm/sas.h -headers: include/olm/olm.h include/olm/pk.h include/olm/sas.h +include/olm/error.h: include/olm/olm.h ../include/olm/error.h + $(CPP) -I dummy -I ../include -o include/olm/error.h ../include/olm/error.h + +headers: include/olm/olm.h include/olm/pk.h include/olm/sas.h include/olm/error.h olm-python2: headers DEVELOP=$(DEVELOP) python2 setup.py build diff --git a/python/dummy/olm/error.h b/python/dummy/olm/error.h new file mode 100644 index 0000000..e69de29 diff --git a/python/olm_build.py b/python/olm_build.py index 0606337..38053e0 100644 --- a/python/olm_build.py +++ b/python/olm_build.py @@ -49,6 +49,9 @@ ffibuilder.set_source( extra_compile_args=compile_args, extra_link_args=link_args) +with open(os.path.join(PATH, "include/olm/error.h")) as f: + ffibuilder.cdef(f.read(), override=True) + with open(os.path.join(PATH, "include/olm/olm.h")) as f: ffibuilder.cdef(f.read(), override=True)