makefile 738 B

123456789101112131415161718
  1. CFLAGS=`xml2-config --cflags` -I/usr/local/opt/libarchive/include -g -Wall -Wextra -Wshadow -O3 -std=c99
  2. LDLIBS=`xml2-config --libs` -larchive -lbinn
  3. objects=comments.o zip.o xmlbuff.o
  4. anonymize: $(objects)
  5. .PHONY: clean
  6. clean:
  7. rm *.o
  8. test: anonymize
  9. @./anonymize testFiles/input.docx testFiles/output.docx
  10. @cmp testFiles/input.docx testFiles/output.docx -s ; if [ $$? -eq 0 ] ; then echo "FAILURE: Files should differ after anonymizing!"; exit 1; fi
  11. @./anonymize testFiles/output.docx -d
  12. @cmp testFiles/input.docx testFiles/output.docx -s ; if [ $$? -eq 0 ] ; then echo "OK"; else echo "FAILURE: Files should be the same after de-anonymizing!"; exit 1; fi
  13. @rm testFiles/output.docx testFiles/output.docx.bin
  14. default: anonymize