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.
 
 
 
 
 

19 lines
536 B

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