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
35
Makefile
35
Makefile
|
@ -13,17 +13,11 @@ usage:
|
||||||
@echo " make world # Compile everything (libraries & commands)"
|
@echo " make world # Compile everything (libraries & commands)"
|
||||||
@echo " make includes # Install include files from src/"
|
@echo " make includes # Install include files from src/"
|
||||||
@echo " make libraries # Compile and install libraries (ack)"
|
@echo " make libraries # Compile and install libraries (ack)"
|
||||||
.ifdef MINIX_GENERATE_ELF
|
|
||||||
@echo " make elf-libraries # Compile and install gcc/clang elf libs"
|
@echo " make elf-libraries # Compile and install gcc/clang elf libs"
|
||||||
.endif
|
|
||||||
@echo " make commands # Compile all, commands, but don't install"
|
@echo " make commands # Compile all, commands, but don't install"
|
||||||
@echo " make install # Compile and install commands"
|
@echo " make install # Compile and install commands"
|
||||||
@echo " make depend # Generate required .depend files"
|
@echo " make depend # Generate required .depend files"
|
||||||
@echo " make gnu-includes # Install include files for GCC"
|
@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 " make clean # Remove all compiler results"
|
||||||
@echo ""
|
@echo ""
|
||||||
@echo "Run 'make' in tools/ to create a new MINIX configuration."
|
@echo "Run 'make' in tools/ to create a new MINIX configuration."
|
||||||
|
@ -37,19 +31,7 @@ usage:
|
||||||
# 'make install' target.
|
# 'make install' target.
|
||||||
#
|
#
|
||||||
# etcfiles has to be done first.
|
# etcfiles has to be done first.
|
||||||
.ifdef MINIX_GENERATE_ELF
|
|
||||||
world: mkfiles includes depend libraries elf-libraries install etcforce
|
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
|
|
||||||
|
|
||||||
mkfiles:
|
mkfiles:
|
||||||
make -C share/mk install
|
make -C share/mk install
|
||||||
|
@ -63,29 +45,12 @@ includes:
|
||||||
libraries: includes
|
libraries: includes
|
||||||
$(MAKE) -C lib build_ack
|
$(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
|
MKHEADERS443_PKGSRC=/usr/pkg/gcc44/libexec/gcc/i686-pc-minix/4.4.3/install-tools/mkheaders
|
||||||
gnu-includes: includes
|
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
|
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
|
elf-libraries: includes
|
||||||
$(MAKE) -C lib build_elf_base
|
|
||||||
.else
|
|
||||||
elf-libraries: elf-includes
|
|
||||||
$(MAKE) -C lib build_elf
|
$(MAKE) -C lib build_elf
|
||||||
.endif
|
|
||||||
|
|
||||||
commands: includes libraries
|
commands: includes libraries
|
||||||
$(MAKE) -C commands all
|
$(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:
|
20110624:
|
||||||
(Next release bumped to MINIX 3.2.0.)
|
(Next release bumped to MINIX 3.2.0.)
|
||||||
ELF support in the base system. /usr/lib libraries
|
ELF support in the base system. /usr/lib libraries
|
||||||
|
|
12
lib/Makefile
12
lib/Makefile
|
@ -33,18 +33,10 @@ SUBDIR+= libend
|
||||||
build_ack:
|
build_ack:
|
||||||
sh ack_build.sh obj depend all install
|
sh ack_build.sh obj depend all install
|
||||||
|
|
||||||
.if defined(MINIX_GENERATE_ELF)
|
build_elf:
|
||||||
build_elf_base:
|
sh elf_build.sh obj depend all install
|
||||||
sh elf_build_base.sh obj depend all install
|
|
||||||
.else
|
|
||||||
build_gnu:
|
|
||||||
sh gnu_build.sh obj depend all install
|
|
||||||
.endif
|
|
||||||
|
|
||||||
clean_all:
|
clean_all:
|
||||||
sh ack_build.sh clean
|
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
|
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
|
#!/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 COMPILER_TYPE=gnu
|
||||||
export MAKEOBJDIR=obj-elf
|
export PATH=$PATH:/usr/pkg/bin
|
||||||
export PATH=$PATH:/usr/gnu_cross/bin
|
|
||||||
export NBSD_LIBC=${NBSD_LIBC}
|
|
||||||
|
|
||||||
if [ "$@" != clean ]
|
export MAKEOBJDIR=obj-elfbase-nbsd
|
||||||
then echo "$0: Unexpected arguments $@"
|
make $@ NBSD_LIBC=yes
|
||||||
exit 1
|
export MAKEOBJDIR=obj-elfbase
|
||||||
fi
|
make $@ NBSD_LIBC=no
|
||||||
|
|
||||||
make $@
|
|
||||||
|
|
|
@ -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.
|
# All platforms are ELF.
|
||||||
#
|
#
|
||||||
#OBJECT_FMT= ELF
|
#OBJECT_FMT= ELF
|
||||||
.if defined(MINIX_GENERATE_ELF) && ${COMPILER_TYPE} == "gnu"
|
.if ${COMPILER_TYPE} == "gnu"
|
||||||
OBJECT_FMT= ELF
|
OBJECT_FMT= ELF
|
||||||
.else
|
.else
|
||||||
OBJECT_FMT= a.out
|
OBJECT_FMT= a.out
|
||||||
|
|
|
@ -238,11 +238,6 @@ COMPILER_TYPE=gnu
|
||||||
AR?= ar
|
AR?= ar
|
||||||
.endif
|
.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".
|
# Set NBSD_LIBC to either "yes" or "no".
|
||||||
.if !defined(NBSD) || (${NBSD} == "no") \
|
.if !defined(NBSD) || (${NBSD} == "no") \
|
||||||
|| !defined(COMPILER_TYPE) || (${COMPILER_TYPE} == "ack")
|
|| !defined(COMPILER_TYPE) || (${COMPILER_TYPE} == "ack")
|
||||||
|
|
Loading…
Reference in a new issue