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.
 
 
 
 
 

21 lines
528 B

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