diff options
author | peter <peter@FreeBSD.org> | 2003-06-26 03:48:01 +0000 |
---|---|---|
committer | peter <peter@FreeBSD.org> | 2003-06-26 03:48:01 +0000 |
commit | 2415de8f568f7c796be184f2766febaac12f1d13 (patch) | |
tree | ac95971cbd16f1d5cd4a1f8c28467d8f4cfc4a97 /lib | |
parent | 5cfe94b87517f83e86412e52ecfa3239af0f9d1c (diff) | |
download | FreeBSD-src-2415de8f568f7c796be184f2766febaac12f1d13.zip FreeBSD-src-2415de8f568f7c796be184f2766febaac12f1d13.tar.gz |
Add amd64 build glue
Diffstat (limited to 'lib')
-rw-r--r-- | lib/libstand/Makefile | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/lib/libstand/Makefile b/lib/libstand/Makefile index 0979d7b..9714b8c 100644 --- a/lib/libstand/Makefile +++ b/lib/libstand/Makefile @@ -24,6 +24,10 @@ CFLAGS+= -mpreferred-stack-boundary=2 .if ${MACHINE_ARCH} == "powerpc" CFLAGS+= -msoft-float .endif +.if ${MACHINE_ARCH} == "amd64" +CFLAGS+= -m32 +LDFLAGS+= -m elf_i386_fbsd +.endif # standalone components and stuff we have modified locally SRCS+= zutil.h __main.c assert.c bcd.c bswap.c environment.c getopt.c gets.c \ @@ -34,13 +38,17 @@ SRCS+= zutil.h __main.c assert.c bcd.c bswap.c environment.c getopt.c gets.c \ SRCS+= strcasecmp.c # byte order functions from libc +.if ${MACHINE_ARCH} != "amd64" .PATH: ${.CURDIR}/../libc/${MACHINE_ARCH}/net +.else +.PATH: ${.CURDIR}/../libc/i386/net +.endif SRCS+= htons.S ntohs.S htonl.S ntohl.S # string functions from libc .PATH: ${.CURDIR}/../libc/string .if ${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "powerpc" || \ - ${MACHINE_ARCH} == "sparc64" + ${MACHINE_ARCH} == "sparc64" || ${MACHINE_ARCH} == "amd64" SRCS+= bcmp.c bcopy.c bzero.c ffs.c index.c memccpy.c memchr.c memcmp.c \ memcpy.c memmove.c memset.c qdivrem.c rindex.c strcat.c strchr.c \ strcmp.c strcpy.c strcspn.c strlen.c strncat.c strncmp.c strncpy.c \ @@ -107,7 +115,11 @@ SRCS+= __udivdi3.S __udivsi3.S __umoddi3.S __umodsi3.S .endif # _setjmp/_longjmp +.if ${MACHINE_ARCH} == "amd64" +.PATH: ${.CURDIR}/i386 +.else .PATH: ${.CURDIR}/${MACHINE_ARCH} +.endif SRCS+= _setjmp.S # decompression functionality from libbz2 @@ -169,3 +181,12 @@ SRCS+= dosfs.c ext2fs.c SRCS+= splitfs.c .include <bsd.lib.mk> + +.if ${MACHINE_ARCH} == "amd64" +${SRCS:M*.c:R:S/$/.o/g}: machine + +beforedepend: machine + +machine: + ln -s ${.CURDIR}/../../sys/i386/include machine +.endif |