Makefile 959 B

123456789101112131415161718192021222324252627282930313233
  1. #C compiler
  2. CC := /home/zamnedix/local/1/bin/gcc
  3. #Compiler flags
  4. CFLAGS := -Wall -Og -march=native -pipe -g -Isqlite3
  5. #Where system libraries are found
  6. SYSRPATH := /lib:/lib/x86_64-linux-gnu:/usr/lib:/usr/lib/x86_64-linux-gnu
  7. #Where CMS libraries go (prepended to the binary RPATHs)
  8. RPATH := /var/www/libs
  9. #Where CGI binaries go
  10. WWWROOT := /var/www/html
  11. #User to own content
  12. WWWUSER := www-data
  13. #Group to own content
  14. WWWGROUP := www-data
  15. #dSFMT exponent
  16. MEXP := 521
  17. .PHONY: auth sqlite index install
  18. cms:
  19. ${CC} ${CFLAGS} -DDSFMT_MEXP=${MEXP} list.c util.c dSFMT.c auth.c cms.c -o index -L. -lbcrypt -lb64 -lsqlite3 -lpthread -ldl -Wl,--rpath=${RPATH}:${SYSRPATH}
  20. install:
  21. chown ${WWWUSER}:${WWWGROUP} *.so index
  22. chmod 755 *.so index
  23. cp *.so ${RPATH}
  24. cp index ${WWWROOT}
  25. testget:
  26. DEBUG="YES" REQUEST_METHOD="GET" QUERY_STRING="n=1&data=foobar" ./index
  27. @echo
  28. testpost:
  29. DEBUG="YES" REQUEST_METHOD="POST" INPUT_LENGTH=20 ./index
  30. @echo