Put mp_nbusses and bus_data under APIC_IO
[dragonfly.git] / Makefile.inc1
index d05dfc0..6b8776d 100644 (file)
@@ -121,6 +121,13 @@ DESTDIRBASE?=              ${OBJTREE}${.CURDIR}
 
 # This sets the compiler we use to build the world/kernel with
 WORLD_CCVER?=  gcc41
+WORLD_BINUTILSVER?=    binutils217
+
+# temporary until everybody has converted to x86_64
+.if ${MACHINE_ARCH} == "amd64"
+MACHINE_ARCH=  x86_64
+.makeenv MACHINE_ARCH
+.endif
 
 TARGET_ARCH?=  ${MACHINE_ARCH}
 .if ${TARGET_ARCH} == ${MACHINE_ARCH}
@@ -130,6 +137,12 @@ TARGET?=   ${TARGET_ARCH}
 .endif
 .if make(buildworld)
 BUILD_ARCH!=   sysctl -n hw.machine_arch
+
+# temporary until everybody has converted to x86_64
+.if ${BUILD_ARCH} == "amd64"
+BUILD_ARCH=    x86_64
+.endif
+
 .if ${MACHINE_ARCH} != ${BUILD_ARCH}
 .error To cross-build, set TARGET_ARCH.
 .endif
@@ -146,7 +159,7 @@ MACHINE_PLATFORM= pc32
 .if !defined(TARGET_PLATFORM)
 .if ${TARGET_ARCH} == "i386"
 TARGET_PLATFORM= pc32
-.elif ${TARGET_ARCH} == "amd64"
+.elif ${TARGET_ARCH} == "x86_64"
 TARGET_PLATFORM= pc64
 .else
 .error Unknown target architecture.
@@ -274,7 +287,8 @@ CROSSENV=   MAKEOBJDIRPREFIX=${WORLDDEST} \
                MACHINE_PLATFORM=${TARGET_PLATFORM} \
                OBJFORMAT_PATH=${CTOOLSDEST} \
                HOST_CCVER=${HOST_CCVER} \
-               CCVER=${WORLD_CCVER}
+               CCVER=${WORLD_CCVER} \
+               BINUTILSVER=${WORLD_BINUTILSVER}
 
 WMAKEENV=      ${CROSSENV} \
                DESTDIR=${WORLDDEST} \
@@ -298,7 +312,10 @@ KMAKEENV=  ${WMAKEENV}
 # Attempt to rebuild the entire system, with reasonable chance of
 # success, regardless of how old your existing system is.
 #
-_worldtmp:
+_worldtmp: _cleantmp _mtreetmp
+.ORDER: _cleantmp _mtreetmp
+
+_cleantmp:
        @echo
        @echo "--------------------------------------------------------------"
        @echo ">>> Rebuilding the temporary build tree"
@@ -310,6 +327,8 @@ _worldtmp:
        rm -f ${OBJTREE}${.CURDIR}/usr.bin/kdump/ioctl.c
        rm -f ${OBJTREE}${.CURDIR}/usr.bin/truss/ioctl.c
 .endif
+
+_mtreetmp:
        mkdir -p ${DESTDIRBASE} ${BTOOLSDEST} ${CTOOLSDEST} ${WORLDDEST}
 .for _dir in ${WORLDDEST} ${BTOOLSDEST} ${CTOOLSDEST}
        mtree -deU -f ${.CURDIR}/etc/mtree/BSD.root.dist        \
@@ -398,14 +417,15 @@ WMAKE_TGTS+=      _includes _libraries _depend everything
 
 buildworld: ${WMAKE_TGTS}
 
-quickworld: _obj _includes _libraries _depend everything
+quickworld: _mtreetmp _obj _includes _libraries _depend everything
 
-realquickworld: _obj _includes _libraries everything
+realquickworld: _mtreetmp _obj _includes _libraries everything
 
 crossworld: _worldtmp _bootstrap-tools _obj _build-tools _cross-tools
 
 .ORDER: ${WMAKE_TGTS}
 .ORDER: _obj _includes
+.ORDER: _mtreetmp _obj
 
 #
 # installcheck
@@ -449,13 +469,6 @@ reinstall:
        @echo ">>> Installing everything.."
        @echo "--------------------------------------------------------------"
        cd ${.CURDIR}; ${MAKE} -f Makefile.inc1 install
-.if !defined(NOMAN) && !defined(NO_MAKEDB_RUN)
-       @echo
-       @echo "--------------------------------------------------------------"
-       @echo ">>> Rebuilding man page indices"
-       @echo "--------------------------------------------------------------"
-       cd ${.CURDIR}/share/man; ${MAKE} makedb
-.endif
 
 #
 # buildkernel, nativekernel, quickkernel, and installkernel
@@ -481,7 +494,13 @@ reinstall:
 KERNCONF=      ${KERNEL}
 KERNWARN=      yes
 .else
+# XXX makeshift fix to build the right kernel for the (target) architecture
+# We should configure this in the platform files somehow
+.if ${TARGET_ARCH} == "i386"
 KERNCONF?=     GENERIC
+.else
+KERNCONF?=     X86_64_GENERIC
+.endif
 .endif
 INSTKERNNAME?= kernel
 
@@ -577,9 +596,6 @@ buildkernel:        bk_tools bk_build_list bk_kernwarn
        echo ${KERNEL_VERSION_${_kernel}} > ${KRNLOBJDIR}/${_kernel}/version
 .endif
        touch ${KRNLOBJDIR}/${_kernel}/.buildkernel_run
-       cd ${KRNLOBJDIR}/${_kernel}; \
-           MAKESRCPATH=${KRNLSRCDIR}/dev/disk/aic7xxx/aicasm \
-           ${MAKE} -DBOOTSTRAPPING -f ${KRNLSRCDIR}/dev/disk/aic7xxx/aicasm/Makefile
 .if !defined(NO_KERNELDEPEND)
        cd ${KRNLOBJDIR}/${_kernel}; \
            ${KMAKEENV} ${MAKE} KERNEL=${INSTKERNNAME} depend
@@ -755,7 +771,7 @@ bootstrap-tools:
     usr.bin/mklocale usr.bin/uuencode usr.bin/compile_et usr.bin/hexdump \
     usr.bin/cap_mkdb usr.bin/true usr.bin/false \
     usr.bin/cmp usr.bin/xargs usr.bin/id usr.bin/env usr.bin/dirname \
-    usr.bin/tail \
+    usr.bin/tail usr.bin/unifdef \
     usr.sbin/chown usr.sbin/mtree usr.sbin/config \
     usr.sbin/btxld usr.sbin/zic usr.sbin/makewhatis \
     gnu/usr.bin/texinfo gnu/usr.bin/grep gnu/usr.bin/sort \
@@ -785,7 +801,7 @@ _gcc44_cross= gnu/usr.bin/cc44
 _gcc44_tools= gnu/usr.bin/cc44/cc_prep gnu/usr.bin/cc44/cc_tools
 .endif
 _custom_cross= libexec/customcc
-_binutils= gnu/usr.bin/binutils217
+_binutils= gnu/usr.bin/${WORLD_BINUTILSVER}
 
 build-tools:
 .for _tool in ${_gcc41_tools} ${_gcc44_tools} ${_libkrb5} ${_share}
@@ -867,7 +883,8 @@ _generic_libs=      gnu/lib
 _prebuild_libs+= lib/libcom_err lib/libcrypt lib/libmd \
                lib/libncurses/libncurses lib/libopie lib/libradius \
                lib/libsbuf lib/libtacplus lib/libm \
-               lib/libpam lib/libypclnt lib/lib${THREAD_LIB}
+               lib/libpam lib/libypclnt lib/lib${THREAD_LIB} \
+               lib/libpthread lib/libprop lib/libdevattr
 
 lib/libopie__L lib/libradius__L lib/libtacplus__L: lib/libmd__L