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