Loading...
--- Libc/Libc-498.1.5/Makefile.inc
+++ Libc/Libc-498/Makefile.inc
@@ -20,7 +20,7 @@
AUTOPATCHMAN=
AUTOPATCHSRCS=
-# Auto-patch (or symlink)
+# Auto-patch into OBJROOT
_AUTOPATCH: .USE
@if [ -f ${.ALLSRC}.patch ]; then \
echo cp ${.ALLSRC} ${.TARGET}; \
@@ -28,9 +28,16 @@
echo patch ${.TARGET} ${.ALLSRC}.patch; \
patch ${.TARGET} ${.ALLSRC}.patch; \
else \
- t=`basename ${.ALLSRC}` && x=`dirname ${.ALLSRC}` && d=`basename $$x`; \
- echo ln -fs $$d/$$t ${.TARGET}; \
- ln -fs $$d/$$t ${.TARGET}; \
+ echo ln -s ${.ALLSRC} ${.TARGET}; \
+ ln -s ${.ALLSRC} ${.TARGET}; \
+ fi
+# Auto-patch into current directory
+_AUTOPATCHCUR: .USE
+ @echo cp ${.ALLSRC} ${.TARGET}; \
+ cp ${.ALLSRC} ${.TARGET}; \
+ if [ -f ${.ALLSRC}.patch ]; then \
+ echo patch ${.TARGET} ${.ALLSRC}.patch; \
+ patch ${.TARGET} ${.ALLSRC}.patch; \
fi
# Standard compilation for the various forms
_STANDARD_STATIC: .USE
@@ -58,10 +65,27 @@
${VARIANTCFLAGS} ${LIBCFLAGS} \
-c ${.IMPSRC} -o ${.TARGET}
+# set object file suffix
+.if make(lib${LIB}_static.a)
+OBJSUFFIX = o
+.endif
+.if make(lib${LIB}_profile.a)
+OBJSUFFIX = po
+.endif
+.if make(lib${LIB}_debug.a)
+OBJSUFFIX = do
+.endif
+.if make(lib${LIB}.a)
+OBJSUFFIX = So
+.endif
+
+.ifnmake autopatch
#
# If there is a machine dependent makefile, use it:
#
-.sinclude "${.CURDIR}/${MACHINE_ARCH}/Makefile.inc"
+.if exists(${.CURDIR}/${MACHINE_ARCH}/Makefile.inc)
+.include "${.CURDIR}/${MACHINE_ARCH}/Makefile.inc"
+.endif
.include "${.CURDIR}/darwin/Makefile.inc"
.include "${.CURDIR}/db/Makefile.inc"
@@ -71,9 +95,7 @@
.include "${.CURDIR}/gen/Makefile.inc"
.include "${.CURDIR}/gmon/Makefile.inc"
.include "${.CURDIR}/include/Makefile.inc"
-.ifdef FEATURE_LEGACY_NX_INTERNAT_APIS
.include "${.CURDIR}/internat/Makefile.inc"
-.endif
.include "${.CURDIR}/locale/Makefile.inc"
.include "${.CURDIR}/man/Makefile.inc"
.include "${.CURDIR}/net/Makefile.inc"
@@ -106,3 +128,4 @@
.endif
.endfor
.endif
+.endif # !autopatch