Makefile.bsd 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. # $NetBSD: Makefile,v 1.36 2003/10/21 10:01:19 lukem Exp $
  2. # @(#)Makefile 8.2 (Berkeley) 4/19/94
  3. .include <bsd.own.mk> # for INSTALL_OFFENSIVE_FORTUNES
  4. SRCFILES= fortunes fortunes2 startrek zippy unamerican-o limerick \
  5. netbsd farber
  6. DATFILES= fortunes.dat fortunes2.dat startrek.dat zippy.dat \
  7. fortunes-o fortunes-o.dat fortunes2-o fortunes2-o.dat \
  8. limerick.dat limerick-o limerick-o.dat unamerican-o \
  9. unamerican-o.dat netbsd.dat netbsd-o netbsd-o.dat \
  10. farber.dat
  11. # TO AVOID INSTALLING THE POTENTIALLY OFFENSIVE FORTUNES, RUN 'make' with
  12. # "INSTALL_OFFENSIVE_FORTUNES=NO", or set "INSTALL_OFFENSIVE_FORTUNES=NO"
  13. # IN bsd.own.mk OR /etc/mk.conf.
  14. INSTALL_OFFENSIVE_FORTUNES?= YES
  15. .if (${INSTALL_OFFENSIVE_FORTUNES} == "YES")
  16. TYPE= real
  17. .else
  18. TYPE= fake
  19. .endif
  20. CLEANFILES+=${DATFILES}
  21. STRFILEDIR!=cd $(.CURDIR)/../strfile; ${PRINTOBJDIR}
  22. STRFILE=${STRFILEDIR}/strfile
  23. .if ${MKSHARE} != "no"
  24. FILES=${SRCFILES} ${DATFILES}
  25. FILESDIR=/usr/share/games/fortune
  26. .endif
  27. realall: ${DATFILES}
  28. # Normal fortunes: build directly from data files.
  29. fortunes.dat fortunes2.dat startrek.dat zippy.dat limerick.dat netbsd.dat farber.dat:
  30. ${_MKTARGET_CREATE}
  31. ${STRFILE} -rs ${.CURDIR}/${.TARGET:R} ${.TARGET}
  32. fortunes.dat: fortunes
  33. fortunes2.dat: fortunes2
  34. startrek.dat: startrek
  35. zippy.dat: zippy
  36. limerick.dat: limerick
  37. netbsd.dat: netbsd
  38. farber.dat: farber
  39. # Obscene fortunes: we have to build source and data files
  40. fortunes-o: fortunes-o.${TYPE}
  41. ${_MKTARGET_CREATE}
  42. tr 'a-zA-Z' 'n-za-mN-ZA-M' < ${.ALLSRC} > ${.TARGET}
  43. fortunes-o.dat: fortunes-o
  44. ${_MKTARGET_CREATE}
  45. ${STRFILE} -rsx ${.ALLSRC} ${.TARGET}
  46. fortunes2-o: fortunes2-o.${TYPE}
  47. ${_MKTARGET_CREATE}
  48. tr 'a-zA-Z' 'n-za-mN-ZA-M' < ${.ALLSRC} > ${.TARGET}
  49. fortunes2-o.dat: fortunes2-o
  50. ${_MKTARGET_CREATE}
  51. ${STRFILE} -rsx ${.ALLSRC} ${.TARGET}
  52. limerick-o: limerick-o.${TYPE}
  53. ${_MKTARGET_CREATE}
  54. tr 'a-zA-Z' 'n-za-mN-ZA-M' < ${.ALLSRC} > ${.TARGET}
  55. limerick-o.dat: limerick-o
  56. ${_MKTARGET_CREATE}
  57. ${STRFILE} -rsx ${.ALLSRC} ${.TARGET}
  58. unamerican-o: unamerican-o.${TYPE}
  59. ${_MKTARGET_CREATE}
  60. tr 'a-zA-Z' 'n-za-mN-ZA-M' < ${.ALLSRC} > ${.TARGET}
  61. unamerican-o.dat: unamerican-o
  62. ${_MKTARGET_CREATE}
  63. ${STRFILE} -rsx ${.ALLSRC} ${.TARGET}
  64. netbsd-o: netbsd-o.${TYPE}
  65. ${_MKTARGET_CREATE}
  66. tr 'a-zA-Z' 'n-za-mN-ZA-M' < ${.ALLSRC} > ${.TARGET}
  67. netbsd-o.dat: netbsd-o
  68. ${_MKTARGET_CREATE}
  69. ${STRFILE} -rsx ${.ALLSRC} ${.TARGET}
  70. .include <bsd.prog.mk>