Home | History | Annotate | Line # | Download | only in m68k
      1  1.5  thorpej #	$NetBSD: Makefile.cmachflags,v 1.5 2026/07/08 04:26:53 thorpej Exp $
      2  1.1      abs 
      3  1.1      abs # Set CMACHFLAGS best target the specific CPU combination, based on
      4  1.2      mrg # their "options" setting.
      5  1.1      abs 
      6  1.1      abs # This should typically be included iff the config file has not already set
      7  1.1      abs # CMACHFLAGS, eg:
      8  1.1      abs #   .if !defined(CMACHFLAGS)
      9  1.1      abs #   .include "$S/arch/m68k/Makefile.cmachflags"
     10  1.1      abs #   CMACHFLAGS+=    -Wa,-m68030 -Wa,-m68851
     11  1.1      abs #   .endif
     12  1.1      abs 
     13  1.4   andvar # Table of CPUs targeted vs gcc flags. Note: -m68020 and -m68030 are
     14  1.1      abs # ~identical, but they are both included for completeness.
     15  1.1      abs 
     16  1.1      abs # 020 030 040 060 -m68020-60
     17  1.1      abs # 030 040 060     -m68020-60
     18  1.1      abs # 020 040 060     -m68020-60
     19  1.1      abs # 020 030 060     -m68020-60
     20  1.1      abs # 040 060         -m68020-60 (Would have been nice to have a -m68040-60)
     21  1.1      abs # 030 060         -m68020-60
     22  1.1      abs # 020 060         -m68020-60
     23  1.1      abs # 060             -m68060
     24  1.1      abs #
     25  1.1      abs # 020 030 040     -m68020-40
     26  1.1      abs # 030 040         -m68020-40
     27  1.1      abs # 020 040         -m68020-40
     28  1.1      abs # 040             -m68040
     29  1.1      abs #
     30  1.1      abs # 020 030         -m68020
     31  1.1      abs # 030             -m68030
     32  1.1      abs # 020             -m68020
     33  1.5  thorpej #
     34  1.5  thorpej # 010             -m68010
     35  1.1      abs 
     36  1.5  thorpej HAVE_M68010!=	grep '\#define[ 	]*M68010' opt_m68k_arch.h 2>/dev/null || echo no
     37  1.2      mrg HAVE_M68020!=	grep '\#define[ 	]*M68020' opt_m68k_arch.h 2>/dev/null || echo no
     38  1.2      mrg HAVE_M68030!=	grep '\#define[ 	]*M68030' opt_m68k_arch.h 2>/dev/null || echo no
     39  1.2      mrg HAVE_M68040!=	grep '\#define[ 	]*M68040' opt_m68k_arch.h 2>/dev/null || echo no
     40  1.2      mrg HAVE_M68060!=	grep '\#define[ 	]*M68060' opt_m68k_arch.h 2>/dev/null || echo no
     41  1.2      mrg 
     42  1.5  thorpej .if ${HAVE_M68010} != "no"
     43  1.5  thorpej CMACHFLAGS=	-m68010 -Wa,-m68010
     44  1.5  thorpej .else
     45  1.5  thorpej 
     46  1.2      mrg .if ${HAVE_M68060} != "no"
     47  1.2      mrg . if ${HAVE_M68020} != "no" || ${HAVE_M68030} != "no" || ${HAVE_M68040} != "no"
     48  1.2      mrg CMACHFLAGS=	-m68020-60
     49  1.2      mrg . else
     50  1.1      abs CMACHFLAGS=	-m68060
     51  1.2      mrg . endif
     52  1.2      mrg .elif ${HAVE_M68040} != "no"
     53  1.2      mrg . if ${HAVE_M68020} != "no" || ${HAVE_M68030} != "no"
     54  1.2      mrg CMACHFLAGS=	-m68020-40
     55  1.3   martin . else	# !-DM68060
     56  1.1      abs CMACHFLAGS=	-m68040
     57  1.2      mrg . endif
     58  1.2      mrg .elif ${HAVE_M68020} != "no"
     59  1.1      abs CMACHFLAGS=	-m68020
     60  1.1      abs .else
     61  1.1      abs CMACHFLAGS=	-m68030
     62  1.3   martin .endif	# !-DM68060
     63  1.5  thorpej 
     64  1.5  thorpej .endif	# HAVE_M68010
     65