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
473 B

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