makefile 1.1 KB

1234567891011121314151617181920212223242526272829303132
  1. CFLAGS=`xml2-config --cflags` -g -Wall -Wextra -O3 -std=gnu99
  2. LDLIBS=`xml2-config --libs` -larchive -lbinn
  3. objects=comments.o zip.o xmlbuff.o
  4. mingwCFLAGS=`x86_64-w64-mingw32-pkg-config --cflags --libs libxml-2.0` -g -Wall -Wextra -O3 -std=gnu99
  5. mingwLDLIBS=`x86_64-w64-mingw32-pkg-config --libs libxml-2.0` -larchive -lbinn-1.0
  6. mingw=x86_64-w64-mingw32-gcc
  7. MACCFLAGS=`pkg-config --cflags --libs libxml-2.0 libarchive` -g -Wall -Wextra -O3 -std=gnu99
  8. MACLDLIBS=`pkg-config --libs libxml-2.0 libarchive` -lbinn
  9. anonymize: $(objects)
  10. bin/anonymize.exe:
  11. $(mingw) $(mingwCFLAGS) -c comments.c $(mingwLDLIBS)
  12. $(mingw) $(mingwCFLAGS) -c zip.c $(mingwLDLIBS)
  13. $(mingw) $(mingwCFLAGS) -c xmlbuff.c $(mingwLDLIBS)
  14. $(mingw) $(mingwCFLAGS) anonymize.c $(objects) $(mingwLDLIBS) -o $@
  15. mac/anonymize:
  16. gcc $(MACCFLAGS) -c comments.c $(MACLDLIBS)
  17. gcc $(MACCFLAGS) -c zip.c $(MACLDLIBS)
  18. gcc $(MACCFLAGS) -c xmlbuff.c $(MACLDLIBS)
  19. gcc $(MACCFLAGS) anonymize.c $(objects) $(MACLDLIBS) -o $@
  20. .PHONY: clean
  21. clean:
  22. rm *.o
  23. win: bin/anonymize.exe
  24. mac: mac/anonymize
  25. default: anonymize