makefile 1.3 KB

123456789101112131415161718192021222324252627282930313233343536
  1. CFLAGS=`pkg-config --cflags --libs libxml-2.0` -g -Wall -Wextra -O3 -std=gnu99
  2. LDLIBS=`pkg-config --libs libxml-2.0` -larchive -lbinn
  3. objects=keyval.o dict.o 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
  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 keyval.c $(mingwLDLIBS)
  12. $(mingw) $(mingwCFLAGS) -c dict.c $(mingwLDLIBS)
  13. $(mingw) $(mingwCFLAGS) -c comments.c $(mingwLDLIBS)
  14. $(mingw) $(mingwCFLAGS) -c zip.c $(mingwLDLIBS)
  15. $(mingw) $(mingwCFLAGS) -c xmlbuff.c $(mingwLDLIBS)
  16. $(mingw) $(mingwCFLAGS) anonymize.c $(objects) $(mingwLDLIBS) -o $@
  17. mac/anonymize:
  18. gcc $(MACCFLAGS) -c keyval.c $(MACLDLIBS)
  19. gcc $(MACCFLAGS) -c dict.c $(MACLDLIBS)
  20. gcc $(MACCFLAGS) -c comments.c $(MACLDLIBS)
  21. gcc $(MACCFLAGS) -c zip.c $(MACLDLIBS)
  22. gcc $(MACCFLAGS) -c xmlbuff.c $(MACLDLIBS)
  23. gcc $(MACCFLAGS) anonymize.c $(objects) $(MACLDLIBS) -o $@
  24. .PHONY: clean
  25. clean:
  26. rm *.o
  27. win: bin/anonymize.exe
  28. mac: mac/anonymize
  29. default: anonymize