From: Arun Thomas Date: Fri, 10 Aug 2012 17:02:30 +0000 (+0200) Subject: Clean up arch Makefiles for libminc X-Git-Tag: v3.2.1~390 X-Git-Url: http://zhaoyanbai.com/repos/%22http:/www.isc.org/icons/zpipe.c?a=commitdiff_plain;h=fbad9eaf95299e5cc281c3872ce2600d63b53cf7;p=minix.git Clean up arch Makefiles for libminc --- diff --git a/include/Makefile b/include/Makefile index 5a120d103..c34bb2d69 100644 --- a/include/Makefile +++ b/include/Makefile @@ -76,7 +76,7 @@ SUBDIR+= ../common/include/prop .if defined(__MINIX) .include "Makefile.minix.inc" -SUBDIR+= arch/${MACHINE} +SUBDIR+= arch/${MACHINE_ARCH} SUBDIR+= arch sys minix SUBDIR+= net netinet netinet6 .endif diff --git a/include/arch/Makefile b/include/arch/Makefile index d9989a0b8..0cae09c6a 100644 --- a/include/arch/Makefile +++ b/include/arch/Makefile @@ -53,7 +53,7 @@ SUBDIR+= xen # x68k x86_64 xen \ # zaurus -INCSYMLINKS= ${MACHINE} /usr/include/machine +INCSYMLINKS= ${MACHINE_ARCH} /usr/include/machine INCSYMLINKS+= machine/float.h /usr/include/float.h \ machine/stdarg.h /usr/include/stdarg.h diff --git a/lib/libminc/Makefile b/lib/libminc/Makefile index 21d84275f..3bad86058 100644 --- a/lib/libminc/Makefile +++ b/lib/libminc/Makefile @@ -10,13 +10,11 @@ CPPFLAGS.sched_start.c+= -I${NETBSDSRCDIR} LIBCSRCDIR=${NETBSDSRCDIR}/lib/libc -MACHINE_ARCH=${MACHINE} - # # Shared libc with userspace (/common/lib/libc) # .include "${NETBSDSRCDIR}/common/lib/libc/Makefile.inc" -.include "${.CURDIR}/arch/${MACHINE}/Makefile.libc.inc" +.include "${.CURDIR}/arch/${MACHINE_ARCH}/Makefile.libc.inc" .if empty(SRCS:Mbyte_swap_8.*) SRCS+= bswap64.c .endif @@ -88,8 +86,8 @@ CLEANFILES+= errlist.c isnanf_ieee754.c isnand_ieee754.c \ isfinitef_ieee754.c isfinited_ieee754.c \ signbitf_ieee754.c signbitd_ieee754.c \ - nanf.c infinityl.c -.PATH.c: ${LIBCSRCDIR}/arch/${MACHINE}/gen ${LIBCSRCDIR}/gen/minix \ + nanf.c +.PATH.c: ${LIBCSRCDIR}/arch/${MACHINE_ARCH}/gen ${LIBCSRCDIR}/gen/minix \ ${LIBCSRCDIR}/gen ${LIBCSRCDIR} SRCS+= ${i} CPPFLAGS.${i}+= -I${LIBCSRCDIR}/include @@ -106,8 +104,8 @@ CPPFLAGS.${i}+= -I${LIBCSRCDIR}/include .endfor # Import from string .for i in strcspn.c strerror.c strerror_r.c strtol.c \ - bcmp.S bcopy.S bzero.S -.PATH.S: ${LIBCSRCDIR}/arch/${MACHINE}/string + bcopy.S bzero.S +.PATH.S: ${LIBCSRCDIR}/arch/${MACHINE_ARCH}/string .PATH.c: ${LIBCSRCDIR}/string SRCS+= ${i} CPPFLAGS.${i}+= -D_LIBC -I${LIBCSRCDIR}/include @@ -133,7 +131,7 @@ CPPFLAGS.${i}+= -I${LIBCSRCDIR}/include -I${LIBCSRCDIR}/locale stime.c syscall.c _ucontext.c umask.c unlink.c waitpid.c \ brksize.S _ipc.S _senda.S ucontext.S mmap.c init.c .PATH.c: ${LIBCSRCDIR}/sys-minix -.PATH.S: ${LIBCSRCDIR}/arch/${MACHINE}/sys-minix +.PATH.S: ${LIBCSRCDIR}/arch/${MACHINE_ARCH}/sys-minix SRCS+= ${i} CPPFLAGS.${i}+= -I${LIBCSRCDIR}/include .endfor diff --git a/lib/libminc/arch/i386/Makefile.libc.inc b/lib/libminc/arch/i386/Makefile.libc.inc index e4c2e2abb..63d72ab71 100644 --- a/lib/libminc/arch/i386/Makefile.libc.inc +++ b/lib/libminc/arch/i386/Makefile.libc.inc @@ -2,3 +2,15 @@ SRCS+= byte_swap_2.S byte_swap_4.S ffs.S _setjmp.S SRCS+= memchr.S memcmp.S memcpy.S memmove.S memset.S \ strcat.S strchr.S strcmp.S strcpy.S strlen.S \ strncmp.S strrchr.S + +.for i in infinityl.c +.PATH.c: ${LIBCSRCDIR}/arch/${MACHINE_ARCH}/gen +SRCS+= ${i} +CPPFLAGS.${i}+= -I${LIBCSRCDIR}/include +.endfor +# Import from string +.for i in bcmp.S +.PATH.S: ${LIBCSRCDIR}/arch/${MACHINE_ARCH}/string +SRCS+= ${i} +CPPFLAGS.${i}+= -D_LIBC -I${LIBCSRCDIR}/include +.endfor