You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

20 lines
598 B

  1. CFLAGS = -g
  2. INCLUDE = -I/usr/local/include -I/usr/include -I.
  3. LIBS = -L /usr/local/lib -larchive
  4. #DEFINES = -DPyUnicode_AS_STRING=PyUnicode_AS_DATA
  5. PYVER ?= 3.9
  6. all: __libarchive.so
  7. _libarchive_wrap.c: _libarchive.i
  8. swig -python -Wall -shadow _libarchive.i
  9. _libarchive_wrap.o: _libarchive_wrap.c
  10. ${CC} -c ${CFLAGS} -fPIC $$(python${PYVER}-config --cflags) ${DEFINES} _libarchive_wrap.c
  11. __libarchive.so: _libarchive_wrap.o
  12. ${CC} _libarchive_wrap.o -shared $$(python${PYVER}-config --ldflags) -Wl,-soname=__libarchive.so -o __libarchive.so ${LIBS}
  13. clean:
  14. rm -f *.o *.so *.pyc