Loading...
--- /dev/null
+++ Libc/Libc-763.12/Makefile.obsd_end
@@ -0,0 +1,63 @@
+# For the OpenBSD auto patching mechanism and compatibility environment
+# setup, original OpenBSD sources a put into a OpenBSD subdirectory.
+# If a file with the same name, but suffix ".patch" is in that directory,
+# that patch will be applied before use.
+#
+# The OBSDMDSRCS, OBSDMISRCS, OBSDORIGHDRS and OBSDSRCS variables must be set,
+# and bracketed by .include of Makefile.obsd_begin and Makefile.obsd_end
+#
+# Set up dependencies between the OpenBSD source (in a OpenBSD subdirectory)
+# and a file with a -obsd.x suffix (where x is 'c' or 's'). The suffix
+# rules will then compile the file with the simulate OpenBSD environment.
+
+OBSDSECTIONS= 1 2 3 4 5 6 7 8 9
+
+# This .for statement forces evaluation of ${CWD}
+.for _cwd in ${CWD}
+
+.for _src in ${OBSDSRCS}
+.ifmake autopatch
+${_cwd}/${_src:R}-obsd.${_src:E}: ${_cwd}/OpenBSD/${_src} _AUTOPATCH
+AUTOPATCHSRCS+= ${_cwd}/${_src:R}-obsd.${_src:E}
+.else # !autopatch
+SRCS+= ${_src}
+.endif # autopatch
+.endfor
+
+.for _src in ${OBSDMDSRCS}
+.ifmake autopatch
+${_cwd}/${_src:R}-obsd.${_src:E}: ${_cwd}/OpenBSD/${_src} _AUTOPATCH
+AUTOPATCHSRCS+= ${_cwd}/${_src:R}-obsd.${_src:E}
+.else # !autopatch
+MDSRCS+= ${_src}
+.endif # autopatch
+.endfor
+
+.for _src in ${OBSDMISRCS}
+.ifmake autopatch
+${_cwd}/${_src:R}-obsd.${_src:E}: ${_cwd}/OpenBSD/${_src} _AUTOPATCH
+AUTOPATCHSRCS+= ${_cwd}/${_src:R}-obsd.${_src:E}
+.else # !autopatch
+MISRCS+= ${_src}
+.endif # autopatch
+.endfor
+
+.ifmake autopatch
+.for _src in ${OBSDHDRS}
+${_cwd}/${_src}: ${_cwd}/OpenBSD/${_src} _AUTOPATCH
+AUTOPATCHHDRS+= ${_cwd}/${_src}
+.endfor
+.endif # autopatch
+
+.for _sect in ${OBSDSECTIONS}
+.for _src in ${OBSDMAN${_sect}}
+.ifmake autopatch
+${_cwd}/${_src}: ${_cwd}/OpenBSD/${_src} _AUTOPATCH
+AUTOPATCHMAN+= ${_cwd}/${_src}
+.else # !autopatch
+MAN${_sect}+= ${_src}
+.endif # autopatch
+.endfor
+.endfor
+
+.endfor # _cwd