Source code pulled from OpenBSD for OpenNTPD. The place to contribute to this code is via the OpenBSD CVS tree.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

167 lines
5.7 KiB

28 years ago
28 years ago
26 years ago
25 years ago
22 years ago
22 years ago
  1. # $OpenBSD: Makefile,v 1.114 2002/12/03 21:54:21 miod Exp $
  2. # $NetBSD: Makefile,v 1.59 1996/05/15 21:36:43 jtc Exp $
  3. # @(#)Makefile 5.45.1.1 (Berkeley) 5/6/91
  4. # The ``rm -rf''s used below are safe because rm doesn't follow symbolic
  5. # links.
  6. # Missing: mp.h
  7. FILES= a.out.h ar.h assert.h bitstring.h blf.h bm.h bsd_auth.h cast.h \
  8. cpio.h ctype.h curses.h db.h dbm.h des.h dirent.h disktab.h \
  9. dlfcn.h elf_abi.h err.h fnmatch.h fstab.h fts.h getopt.h glob.h grp.h \
  10. ifaddrs.h inttypes.h iso646.h kvm.h langinfo.h libgen.h limits.h \
  11. locale.h login_cap.h malloc.h math.h md4.h md5.h memory.h mpool.h \
  12. ndbm.h netdb.h netgroup.h nlist.h nl_types.h ohash.h olf_abi.h \
  13. paths.h poll.h pwd.h ranlib.h re_comp.h readpassphrase.h regex.h \
  14. resolv.h rmd160.h search.h setjmp.h sgtty.h sha1.h skipjack.h \
  15. signal.h stab.h stdbool.h stddef.h stdio.h stdlib.h string.h \
  16. strings.h struct.h sysexits.h tar.h time.h ttyent.h tzfile.h \
  17. unistd.h utime.h utmp.h vis.h
  18. FILES+= link.h link_aout.h link_elf.h
  19. .if (${MACHINE_ARCH} != "vax")
  20. FILES+= ieeefp.h
  21. .endif
  22. MFILES= float.h frame.h stdarg.h varargs.h
  23. LFILES= errno.h fcntl.h syslog.h termios.h
  24. DIRS= arpa protocols rpc rpcsvc
  25. LDIRS= crypto ddb dev isofs miscfs net netatalk netccitt netinet altq \
  26. netinet6 netipx netiso netnatm netns nfs scsi sys ufs uvm xfs
  27. # Directories with an includes target
  28. RDIRS= ../lib/libc_r ../lib/libcom_err ../lib/libcompat ../lib/libcurses \
  29. ../lib/libcurses++ ../lib/libform ../lib/libssl ../lib/libmenu \
  30. ../lib/libocurses ../lib/libossaudio ../lib/libpanel ../lib/librpcsvc \
  31. ../lib/libskey ../lib/libsectok ../lib/libedit ../lib/libpcap \
  32. ../lib/libutil ../lib/libusbhid ../lib/libwrap ../lib/libz \
  33. ../lib/libkeynote ../lib/libevent \
  34. ../usr.bin/lex ../gnu/lib/libreadline \
  35. ../sys/arch/${MACHINE}
  36. # Places using Makefile that needs a prerequisite target met before includes
  37. PRDIRS=
  38. # Directories with an includes target that use Makefile.bsd-wrapper
  39. WDIRS= ../usr.sbin/httpd ../gnu/egcs/libio ../gnu/egcs/libstdc++ \
  40. ../gnu/egcs/libf2c ../gnu/egcs/libobjc ../gnu/egcs/gcc \
  41. ../gnu/usr.bin/binutils
  42. # Places using Makefile.bsd-wrapper that needs a prerequisite target met
  43. # before includes
  44. PWDIRS= ../usr.sbin/httpd ../gnu/egcs/libf2c ../gnu/usr.bin/binutils
  45. NOOBJ= noobj
  46. # Change SYS_INCLUDE in bsd.own.mk to "symlinks" if you don't want copies
  47. .include <bsd.own.mk>
  48. SYS_INCLUDE?= copies
  49. .if ${KERBEROS:L} == "yes"
  50. RDIRS+= ../kerberosIV/lib
  51. PRDIRS+=../kerberosIV/lib/kadm ../kerberosIV/lib/krb
  52. .endif
  53. .if ${KERBEROS5:L} == "yes"
  54. RDIRS+= ../kerberosV/lib
  55. .endif
  56. prereq:
  57. @for i in ${PRDIRS}; do \
  58. echo preparing in ${.CURDIR}/$$i; \
  59. cd ${.CURDIR}/$$i && ${MAKE} prereq; \
  60. done
  61. @for i in ${PWDIRS}; do \
  62. echo preparing in ${.CURDIR}/$$i; \
  63. cd ${.CURDIR}/$$i && ${MAKE} -f Makefile.bsd-wrapper prereq; \
  64. done
  65. includes:
  66. @echo installing ${FILES}
  67. @for i in ${FILES}; do \
  68. cmp -s $$i ${DESTDIR}/usr/include/$$i || \
  69. ${INSTALL} ${INSTALL_COPY} -m 444 $$i ${DESTDIR}/usr/include/$$i; \
  70. done
  71. @echo installing ${DIRS}
  72. @for i in ${DIRS}; do \
  73. ${INSTALL} -d -o ${BINOWN} -g ${BINGRP} -m 755 \
  74. ${DESTDIR}/usr/include/$$i; \
  75. cd ${.CURDIR}/$$i && for j in *.[ih]; do \
  76. cmp -s $$j ${DESTDIR}/usr/include/$$i/$$j || \
  77. ${INSTALL} ${INSTALL_COPY} -m 444 $$j ${DESTDIR}/usr/include/$$i/$$j; \
  78. done; \
  79. done
  80. @rm -f ${DESTDIR}/usr/include/openssl
  81. @ln -sf ssl ${DESTDIR}/usr/include/openssl
  82. @echo installing ${LFILES}
  83. @for i in ${LFILES}; do \
  84. rm -f ${DESTDIR}/usr/include/$$i && \
  85. ln -s sys/$$i ${DESTDIR}/usr/include/$$i; \
  86. done
  87. @echo installing ${MFILES}
  88. @for i in ${MFILES}; do \
  89. rm -f ${DESTDIR}/usr/include/$$i && \
  90. ln -s machine/$$i ${DESTDIR}/usr/include/$$i; \
  91. done
  92. chown -R ${BINOWN}:${BINGRP} ${DESTDIR}/usr/include
  93. find ${DESTDIR}/usr/include -type f | \
  94. xargs chmod a=r
  95. find ${DESTDIR}/usr/include -type d | \
  96. xargs chmod u=rwx,go=rx
  97. @for i in ${RDIRS}; do \
  98. echo installing in ${.CURDIR}/$$i; \
  99. cd ${.CURDIR}/$$i && ${MAKE} includes; \
  100. done
  101. @for i in ${WDIRS}; do \
  102. echo installing in ${.CURDIR}/$$i; \
  103. cd ${.CURDIR}/$$i && ${MAKE} -f Makefile.bsd-wrapper includes; \
  104. done
  105. copies:
  106. @echo copies: ${LDIRS}
  107. @for i in ${LDIRS}; do \
  108. rm -rf ${DESTDIR}/usr/include/$$i && \
  109. ${INSTALL} -d -o ${BINOWN} -g ${BINGRP} -m 755 \
  110. ${DESTDIR}/usr/include/$$i ; \
  111. done
  112. cd ../sys; \
  113. pax -rw -pa -L \
  114. `find ${LDIRS} -follow -type f -name '*.h' \
  115. '!' -path 'dev/microcode/*' -print` ${DESTDIR}/usr/include
  116. cd ${DESTDIR}/usr/include && rm -rf ${MACHINE} ${MACHINE_ARCH} machine
  117. ${INSTALL} -d -o ${BINOWN} -g ${BINGRP} -m 755 \
  118. ${DESTDIR}/usr/include/${MACHINE}
  119. pax -rw -pa -s "|\.\./sys/arch/${MACHINE}/include||" \
  120. ../sys/arch/${MACHINE}/include/*.h \
  121. ${DESTDIR}/usr/include/${MACHINE}
  122. if test ${MACHINE} != ${MACHINE_ARCH} -a \
  123. -d ../sys/arch/${MACHINE_ARCH}/include; then \
  124. ${INSTALL} -d -o ${BINOWN} -g ${BINGRP} -m 755 \
  125. ${DESTDIR}/usr/include/${MACHINE_ARCH}; \
  126. pax -rw -pa -s "|\.\./sys/arch/${MACHINE_ARCH}/include||" \
  127. ../sys/arch/${MACHINE_ARCH}/include/*.h \
  128. ${DESTDIR}/usr/include/${MACHINE_ARCH}; \
  129. fi
  130. ln -sf ${MACHINE} ${DESTDIR}/usr/include/machine; \
  131. symlinks:
  132. @echo symlinks: ${LDIRS}
  133. @for i in ${LDIRS}; do \
  134. rm -rf ${DESTDIR}/usr/include/$$i && \
  135. ln -s /sys/$$i ${DESTDIR}/usr/include/$$i; \
  136. done
  137. cd ${DESTDIR}/usr/include && rm -rf ${MACHINE} ${MACHINE_ARCH} machine
  138. ln -s /sys/arch/${MACHINE}/include ${DESTDIR}/usr/include/${MACHINE}
  139. if test ${MACHINE} != ${MACHINE_ARCH} -a \
  140. -d ../sys/arch/${MACHINE_ARCH}/include ; then \
  141. ln -s /sys/arch/${MACHINE_ARCH}/include \
  142. ${DESTDIR}/usr/include/${MACHINE_ARCH} ; \
  143. fi
  144. ln -sf ${MACHINE} ${DESTDIR}/usr/include/machine
  145. includes: ${SYS_INCLUDE}
  146. .PHONY: prereq includes copies symlink
  147. .include <bsd.prog.mk>