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.
 
 
 
 
 

24 lines
561 B

  1. CFLAGS = -g
  2. INCLUDE = -I/usr/include -I.
  3. LIBS = -L/usr/local/lib -l:libarchive.so.13.1.2
  4. #if PYTHON_VERSION
  5. PYVER = $(PYTHON_VERSION)
  6. #else
  7. PYVER = 2.7
  8. #endif
  9. all: __libarchive.so
  10. _libarchive_wrap.c: _libarchive.i
  11. swig -python -shadow _libarchive.i
  12. _libarchive_wrap.o: _libarchive_wrap.c
  13. ${CC} -c ${CFLAGS} -fPIC ${INCLUDE} $$(python${PYVER}-config --cflags) _libarchive_wrap.c
  14. __libarchive.so: _libarchive_wrap.o
  15. ${CC} _libarchive_wrap.o -shared $$(python${PYVER}-config --ldflags) -o __libarchive.so ${LIBS}
  16. clean:
  17. rm -f *.o *.so *.pyc