Simplify ELF library build logic
-Remove obsolete clang-libraries and gnu-libraries targets -Buildworld now builds elf-libraries as well
This commit is contained in:
parent
d0d7b43342
commit
9902a435cd
9 changed files with 16 additions and 93 deletions
37
Makefile
37
Makefile
|
@ -13,17 +13,11 @@ usage:
|
|||
@echo " make world # Compile everything (libraries & commands)"
|
||||
@echo " make includes # Install include files from src/"
|
||||
@echo " make libraries # Compile and install libraries (ack)"
|
||||
.ifdef MINIX_GENERATE_ELF
|
||||
@echo " make elf-libraries # Compile and install gcc/clang elf libs"
|
||||
.endif
|
||||
@echo " make commands # Compile all, commands, but don't install"
|
||||
@echo " make install # Compile and install commands"
|
||||
@echo " make depend # Generate required .depend files"
|
||||
@echo " make gnu-includes # Install include files for GCC"
|
||||
.ifndef MINIX_GENERATE_ELF
|
||||
@echo " make gnu-libraries # Compile and install libraries for GCC"
|
||||
@echo " make clang-libraries # Compile and install libraries for GCC with clang"
|
||||
.endif
|
||||
@echo " make clean # Remove all compiler results"
|
||||
@echo ""
|
||||
@echo "Run 'make' in tools/ to create a new MINIX configuration."
|
||||
|
@ -37,19 +31,7 @@ usage:
|
|||
# 'make install' target.
|
||||
#
|
||||
# etcfiles has to be done first.
|
||||
.ifdef MINIX_GENERATE_ELF
|
||||
world: mkfiles includes depend libraries elf-libraries install etcforce
|
||||
.else
|
||||
.if ${COMPILER_TYPE} == "ack"
|
||||
world: mkfiles includes depend libraries install etcforce
|
||||
.elif ${COMPILER_TYPE} == "gnu"
|
||||
.if ${OBJECT_FMT} == "a.out"
|
||||
world: mkfiles includes depend gnu-libraries install etcforce
|
||||
.elif ${OBJECT_FMT} == "ELF"
|
||||
world: mkfiles elf-includes depend elf-libraries install etcforce
|
||||
.endif
|
||||
.endif
|
||||
.endif
|
||||
world: mkfiles includes depend libraries elf-libraries install etcforce
|
||||
|
||||
mkfiles:
|
||||
make -C share/mk install
|
||||
|
@ -63,29 +45,12 @@ includes:
|
|||
libraries: includes
|
||||
$(MAKE) -C lib build_ack
|
||||
|
||||
MKHEADERS411=/usr/gnu/libexec/gcc/i386-pc-minix/4.1.1/install-tools/mkheaders
|
||||
MKHEADERS443=/usr/gnu/libexec/gcc/i686-pc-minix/4.4.3/install-tools/mkheaders
|
||||
MKHEADERS443_PKGSRC=/usr/pkg/gcc44/libexec/gcc/i686-pc-minix/4.4.3/install-tools/mkheaders
|
||||
gnu-includes: includes
|
||||
SHELL=/bin/sh; if [ -f $(MKHEADERS411) ] ; then sh -e $(MKHEADERS411) ; fi
|
||||
SHELL=/bin/sh; if [ -f $(MKHEADERS443) ] ; then sh -e $(MKHEADERS443) ; fi
|
||||
SHELL=/bin/sh; if [ -f $(MKHEADERS443_PKGSRC) ] ; then sh -e $(MKHEADERS443_PKGSRC) ; fi
|
||||
|
||||
.ifndef MINIX_GENERATE_ELF
|
||||
gnu-libraries: includes #gnu-includes
|
||||
$(MAKE) -C lib build_gnu
|
||||
|
||||
clang-libraries: includes
|
||||
$(MAKE) -C lib build_clang
|
||||
.endif
|
||||
|
||||
.ifdef MINIX_GENERATE_ELF
|
||||
elf-libraries: includes
|
||||
$(MAKE) -C lib build_elf_base
|
||||
.else
|
||||
elf-libraries: elf-includes
|
||||
$(MAKE) -C lib build_elf
|
||||
.endif
|
||||
|
||||
commands: includes libraries
|
||||
$(MAKE) -C commands all
|
||||
|
|
|
@ -1,3 +1,8 @@
|
|||
20110628:
|
||||
Since buildworld will also build the elf-libraries, you
|
||||
must follow the process in
|
||||
http://wiki.minix3.org/en/UsersGuide/ELFSwitch
|
||||
|
||||
20110624:
|
||||
(Next release bumped to MINIX 3.2.0.)
|
||||
ELF support in the base system. /usr/lib libraries
|
||||
|
|
12
lib/Makefile
12
lib/Makefile
|
@ -33,18 +33,10 @@ SUBDIR+= libend
|
|||
build_ack:
|
||||
sh ack_build.sh obj depend all install
|
||||
|
||||
.if defined(MINIX_GENERATE_ELF)
|
||||
build_elf_base:
|
||||
sh elf_build_base.sh obj depend all install
|
||||
.else
|
||||
build_gnu:
|
||||
sh gnu_build.sh obj depend all install
|
||||
.endif
|
||||
build_elf:
|
||||
sh elf_build.sh obj depend all install
|
||||
|
||||
clean_all:
|
||||
sh ack_build.sh clean
|
||||
sh clang_build.sh clean
|
||||
sh gnu_build.sh clean
|
||||
sh elf_build_base.sh clean
|
||||
sh elf_build.sh clean
|
||||
|
||||
|
|
|
@ -1,9 +0,0 @@
|
|||
#!/bin/sh
|
||||
|
||||
export CC=clang
|
||||
export COMPILER_TYPE=gnu
|
||||
export PATH=$PATH:/usr/pkg/bin:/usr/gnu_cross/bin
|
||||
export MAKEOBJDIR=obj-elf-clang
|
||||
export NBSD_LIBC=${NBSD_LIBC}
|
||||
|
||||
make $@
|
|
@ -1,16 +1,12 @@
|
|||
#!/bin/sh
|
||||
|
||||
# This file is obsolete and is only useful to 'clean' its objects.
|
||||
set -e
|
||||
|
||||
export CC=i386-pc-minix3-gcc
|
||||
export CC=clang
|
||||
export COMPILER_TYPE=gnu
|
||||
export MAKEOBJDIR=obj-elf
|
||||
export PATH=$PATH:/usr/gnu_cross/bin
|
||||
export NBSD_LIBC=${NBSD_LIBC}
|
||||
export PATH=$PATH:/usr/pkg/bin
|
||||
|
||||
if [ "$@" != clean ]
|
||||
then echo "$0: Unexpected arguments $@"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
make $@
|
||||
export MAKEOBJDIR=obj-elfbase-nbsd
|
||||
make $@ NBSD_LIBC=yes
|
||||
export MAKEOBJDIR=obj-elfbase
|
||||
make $@ NBSD_LIBC=no
|
||||
|
|
|
@ -1,12 +0,0 @@
|
|||
#!/bin/sh
|
||||
|
||||
set -e
|
||||
|
||||
export CC=clang
|
||||
export COMPILER_TYPE=gnu
|
||||
export PATH=$PATH:/usr/pkg/bin
|
||||
|
||||
export MAKEOBJDIR=obj-elfbase-nbsd
|
||||
make $@ NBSD_LIBC=yes
|
||||
export MAKEOBJDIR=obj-elfbase
|
||||
make $@ NBSD_LIBC=no
|
|
@ -1,9 +0,0 @@
|
|||
#!/bin/sh
|
||||
|
||||
export CC=gcc
|
||||
export PATH=$PATH:/usr/pkg/bin
|
||||
|
||||
export MAKEOBJDIR=obj-gnu-nbsd
|
||||
make $@ NBSD_LIBC=yes
|
||||
export MAKEOBJDIR=obj-gnu
|
||||
make $@ NBSD_LIBC=no
|
|
@ -535,7 +535,7 @@ DEBUGMODE?= ${NONBINMODE}
|
|||
# All platforms are ELF.
|
||||
#
|
||||
#OBJECT_FMT= ELF
|
||||
.if defined(MINIX_GENERATE_ELF) && ${COMPILER_TYPE} == "gnu"
|
||||
.if ${COMPILER_TYPE} == "gnu"
|
||||
OBJECT_FMT= ELF
|
||||
.else
|
||||
OBJECT_FMT= a.out
|
||||
|
|
|
@ -238,11 +238,6 @@ COMPILER_TYPE=gnu
|
|||
AR?= ar
|
||||
.endif
|
||||
|
||||
.if exists(/usr/pkg/i386-pc-minix/lib/ldscripts/elf_i386_minix.x) \
|
||||
&& exists(/usr/pkg/lib/clang/2.9)
|
||||
MINIX_GENERATE_ELF=yes
|
||||
.endif
|
||||
|
||||
# Set NBSD_LIBC to either "yes" or "no".
|
||||
.if !defined(NBSD) || (${NBSD} == "no") \
|
||||
|| !defined(COMPILER_TYPE) || (${COMPILER_TYPE} == "ack")
|
||||
|
|
Loading…
Reference in a new issue