]> Zhao Yanbai Git Server - minix.git/commitdiff
Build libelf and mkimage in world
authorArun Thomas <arun@minix3.org>
Tue, 28 Jun 2011 22:17:35 +0000 (00:17 +0200)
committerArun Thomas <arun@minix3.org>
Wed, 29 Jun 2011 07:33:40 +0000 (09:33 +0200)
docs/UPDATING
lib/Makefile
lib/libelf/Makefile
usr.bin/Makefile
usr.bin/Makefile.inc
usr.bin/mkimage/Makefile [moved from commands/mkimage/Makefile with 66% similarity]
usr.bin/mkimage/mkimage.c [moved from commands/mkimage/mkimage.c with 100% similarity]

index f2e734a05179cd73f478855f8d11b2ae4e1f7cf1..fc5cbd4b1d0a0aa8ec81be8bdeab9f22dc6b00a2 100644 (file)
@@ -1,3 +1,7 @@
+20110629:
+       Rebuild m4:
+       make -C usr.bin/m4 install
+
 20110629:
        You must install clang. It is now used to build some of
        the userland utilities.
index 2f174de356a42156d5cc6ac5b01779cca4e4d9e0..4b083d1fc30761cff756dd064b2dfb26edc35464 100644 (file)
@@ -20,6 +20,10 @@ SUBDIR= csu ${LIBCOMPAT_DIR} ${LIBC_DIR} libcurses libdriver libnetdriver \
        libexec libdevman libusb ${LIBMINLIB_DIR} ${LIBASYN_DIR}          \
        libddekit
 
+.if defined(NBSD_LIBC) && (${NBSD_LIBC} != "no")
+SUBDIR+= libelf
+.endif
+
 .if ${COMPILER_TYPE} == "ack"
 SUBDIR+= ack/libd ack/libe ack/libfp ack/liby
 .endif
index 4360e88e1db0d87f4a08a864d0ea39aface81e02..04425708c5071102bceb396b12ff134d6015ac89 100644 (file)
@@ -1,7 +1,9 @@
 # $Id$
 
-# Requires NBSD_LIBC
+# Requires clang and NBSD_LIBC
 NBSD_LIBC:= yes
+CC:= clang
+COMPILER_TYPE:= gnu
 
 LIB=   elf
 
@@ -55,13 +57,16 @@ SRCS=       elf.c                                                   \
        libelf_phdr.c                                           \
        libelf_shdr.c                                           \
        libelf_xlate.c                                          \
-       compat/mmap.c                                           \
        ${GENSRCS}
 INCS=  libelf.h gelf.h elfdefinitions.h
 
 GENSRCS=       libelf_fsize.c libelf_msize.c libelf_convert.c
 CLEANFILES=    ${GENSRCS}
-CFLAGS+=        -I. -I${.CURDIR} -DNO_MMAP_FILE
+CFLAGS+=        -I. -I${.CURDIR}
+
+.PATH:         ${.CURDIR}/compat
+SRCS+=         mmap.c
+CFLAGS+=       -DNO_MMAP_FILE
 
 SHLIB_MAJOR=   1
 
@@ -166,8 +171,7 @@ INCSDIR= /usr/include
 
 .include <bsd.lib.mk>
 
-# FIXME: Change to using base m4 when base m4 is updated
 # Keep the .SUFFIXES line after the include of bsd.lib.mk
 .SUFFIXES:     .m4 .c
 .m4.c:
-       gm4 -D SRCDIR=${.CURDIR} ${.IMPSRC} > ${.TARGET}
+       m4 -D SRCDIR=${.CURDIR} ${.IMPSRC} > ${.TARGET}
index 24abee39681bc505c0774299a6b484ddad5a82a6..98ec348f1e069e1edb9fe84ce3830ab6d7e0f1ea 100644 (file)
@@ -2,6 +2,6 @@
 
 .include <bsd.own.mk>
 
-SUBDIR= m4
+SUBDIR= m4 mkimage
 
 .include <bsd.subdir.mk>
index 7c679f4adc8ebaf32b11a3e36d9ff63b7f56063e..ef03e0ef1f443a1dfd85067c778bcd7342e51da4 100644 (file)
@@ -3,5 +3,7 @@ NBSD_LIBC:= yes
 CC:= clang
 COMPILER_TYPE:= gnu
 
+CPPFLAGS+= -D_NETBSD_SOURCE
+
 BINDIR?=/usr/bin
 
similarity index 66%
rename from commands/mkimage/Makefile
rename to usr.bin/mkimage/Makefile
index 4ef271bc6fe61fafd3c70b24d8c4af5b5f7548cb..622d5c9096e9dbc87fa5bdf3c8b0d2a91c4712a3 100644 (file)
@@ -1,12 +1,7 @@
-
-NBSD_LIBC:= yes
-
 PROG=  mkimage
 SRCS=  mkimage.c
 MAN=
 
-CPPFLAGS+= -D_NETBSD_SOURCE
-
 DPADD+=        ${LIBELF}
 LDADD+=        -lelf