cmsconfig.mk 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. # Common setup
  2. CMS_HOSTNAME?= `hostname`
  3. CMS_ROOT_DIR?= /var/www/cms
  4. CMS_HTROOT?= /var/www/htdocs
  5. CONTENT_DIR= ${ROOT_DIR}/content
  6. TEMPLATE_DIR= ${ROOT_DIR}/templates
  7. SESSION_DIR= ${ROOT_DIR}/session
  8. CMS_DEFAULT_LANGUAGE?= en
  9. CMS_DEFAULT_TEMPLATE?= page.tmpl
  10. CMS_CONFIG_URL_IMAGES?= /images/
  11. CMS_ROOT_URL?= /
  12. BINDIR= /var/www/cgi-bin
  13. DAEMON= ${BINDIR}/${PROG}
  14. CHROOT?= /var/www
  15. WWW_USER?= www
  16. WWW_GROUP?= www
  17. # Absolute path from within the chroot
  18. ROOT_DIR= ${CMS_ROOT_DIR:S/^${CHROOT}//}
  19. # Common CFLAGS
  20. CFLAGS+= -Wall -I${.CURDIR} -Werror
  21. CFLAGS+= -Wstrict-prototypes -Wmissing-prototypes
  22. CFLAGS+= -Wmissing-declarations
  23. CFLAGS+= -Wshadow -Wpointer-arith -Wsign-compare -Wcast-qual
  24. CFLAGS+= -fdata-sections -ffunction-sections
  25. LDFLAGS+= -Wl,--gc-sections
  26. .if exists(localconfig.mk)
  27. .include <localconfig.mk>
  28. .endif
  29. CFLAGS+= -DCMS_HOSTNAME=\"${CMS_HOSTNAME}\" \
  30. -DCMS_DEFAULT_LANGUAGE=\"${CMS_DEFAULT_LANGUAGE}\" \
  31. -DCMS_CONTENT_DIR=\"${CONTENT_DIR}\" \
  32. -DCMS_TEMPLATE_DIR=\"${TEMPLATE_DIR}\" \
  33. -DCMS_SESSION_DIR=\"${SESSION_DIR}\" \
  34. -DCMS_DEFAULT_TEMPLATE=\"${CMS_DEFAULT_TEMPLATE}\" \
  35. -DCMS_CONFIG_URL_IMAGES=\"${CMS_CONFIG_URL_IMAGES}\" \
  36. -DCMS_ROOT_URL=\"${CMS_ROOT_URL}\" \
  37. -DCMS_CHROOT=\"${CHROOT}\"