sys.mk: Improved defaults (sys.mk) for make(1)
. Handle more compiler names, including most cross-compilers. . Allows to use acd(1) and [whatever-]acc to designate ACK compiler. . Do not abort (on COMPILER_TYPE not defined) if the compiler name is not recognized.
This commit is contained in:
parent
35b203fdb1
commit
6edbcbf9a3
1 changed files with 7 additions and 5 deletions
|
@ -10,7 +10,8 @@ __MINIX= yes
|
||||||
|
|
||||||
.LIBS: .a
|
.LIBS: .a
|
||||||
|
|
||||||
AR?= aal
|
### MINIX: see at bottom
|
||||||
|
#AR?= aal
|
||||||
ARFLAGS?= rl
|
ARFLAGS?= rl
|
||||||
RANLIB?= ranlib
|
RANLIB?= ranlib
|
||||||
|
|
||||||
|
@ -229,11 +230,12 @@ YACC.y?= ${YACC} ${YFLAGS}
|
||||||
|
|
||||||
# MINIX
|
# MINIX
|
||||||
|
|
||||||
.if !empty(CC:Mcc)
|
.if !empty(CC:Mcc) || !empty(CC:Macd) || !empty(CC:M*acc)
|
||||||
COMPILER_TYPE=ack
|
COMPILER_TYPE=ack
|
||||||
.elif !empty(CC:Mgcc) || !empty(CC:Mclang)
|
AR?= aal
|
||||||
|
.elif !empty(CC:M*gcc) || !empty(CC:M*clang) || !empty(CC:M*pcc)
|
||||||
COMPILER_TYPE=gnu
|
COMPILER_TYPE=gnu
|
||||||
AR=ar
|
AR?= ar
|
||||||
.endif
|
.endif
|
||||||
|
|
||||||
.if exists(/usr/pkg/i386-pc-minix/lib/ldscripts/elf_i386_minix.x) \
|
.if exists(/usr/pkg/i386-pc-minix/lib/ldscripts/elf_i386_minix.x) \
|
||||||
|
@ -243,7 +245,7 @@ MINIX_GENERATE_ELF=yes
|
||||||
|
|
||||||
# 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") \
|
||||||
|| (${COMPILER_TYPE} == "ack")
|
|| !defined(COMPILER_TYPE) || (${COMPILER_TYPE} == "ack")
|
||||||
NBSD_LIBC= no
|
NBSD_LIBC= no
|
||||||
.else
|
.else
|
||||||
NBSD_LIBC= yes
|
NBSD_LIBC= yes
|
||||||
|
|
Loading…
Reference in a new issue