]> git.saurik.com Git - apple/libc.git/blobdiff - gdtoa/Makefile.inc
Libc-498.tar.gz
[apple/libc.git] / gdtoa / Makefile.inc
index b3db9b77193d300a49bcbb5a379860cf6a0c8b34..50e8f9068daad70e09f35e1240ab4c8bf7f2fe3d 100644 (file)
@@ -2,14 +2,27 @@
 
 CFLAGS += -I${.CURDIR}/gdtoa
 
+.ifmake autopatch
+ALL_ARCHS ?= i386 ppc ppc64 x86_64
+.for a in $(ALL_ARCHS)
+.if exists(../${a}/stdlib/gdtoa.mk)
+.include "../${a}/stdlib/gdtoa.mk"
+.endif
+.endfor
+.else # !autopatch
+.if exists(${.CURDIR}/${MACHINE_ARCH}/stdlib/gdtoa.mk)
+.include "${.CURDIR}/${MACHINE_ARCH}/stdlib/gdtoa.mk"
+.endif
+.endif # autopatch
+GDTOA_UNIQUE_SRCS != perl -e '@z = split(" ", "$(GDTOA_FBSDSRCS)"); $$, = "\n"; print @z' | sort -u
+
 .include "Makefile.fbsd_begin"
-FBSDMISRCS= _hdtoa.c _ldtoa.c glue.c \
+FBSDMISRCS= $(GDTOA_UNIQUE_SRCS) _hdtoa.c _ldtoa.c glue.c \
     gdtoa-dmisc.c gdtoa-dtoa.c gdtoa-gdtoa.c gdtoa-gethex.c gdtoa-gmisc.c \
     gdtoa-hd_init.c gdtoa-hexnan.c gdtoa-misc.c gdtoa-smisc.c \
     gdtoa-strtod.c gdtoa-strtodg.c gdtoa-strtof.c gdtoa-strtord.c \
     gdtoa-sum.c gdtoa-ulp.c
-.if exists(${.CURDIR}/${MACHINE_ARCH}/stdlib/gdtoa.mk)
-.include "${.CURDIR}/${MACHINE_ARCH}/stdlib/gdtoa.mk"
-.endif
 FBSDHDRS= gdtoa.h gdtoaimp.h 
 .include "Makefile.fbsd_end"
+
+LEGACYSRCS += gdtoa-strtof.c gdtoa-strtod.c gdtoa-strtodg.c