Home | History | Annotate | Line # | Download | only in conf
      1 #	$NetBSD: Makefile.hb68k,v 1.1 2026/07/19 01:48:20 thorpej Exp $
      2 
      3 # Makefile for NetBSD
      4 #
      5 # This makefile is constructed from a machine description:
      6 #	config machineid
      7 # Most changes should be made in the machine description
      8 #	/sys/arch/hb68k/conf/``machineid''
      9 # after which you should do
     10 #	config machineid
     11 # Machine generic makefile changes should be made in
     12 #	/sys/arch/hb68k/conf/Makefile.hb68k
     13 # after which config should be rerun for all machines of that type.
     14 #
     15 # To specify debugging, add the config line: makeoptions DEBUG="-g"
     16 # A better way is to specify -g only for a few files.
     17 #
     18 #	makeoptions DEBUGLIST="uvm* trap if_*"
     19 
     20 HAVE_M68010!=	grep '\#define[ 	]*M68010' opt_m68k_arch.h 2>/dev/null || echo no
     21 
     22 .if ${HAVE_M68010} != "no"
     23 MACHINE_ARCH=m68000
     24 .else
     25 MACHINE_ARCH=m68k
     26 .endif
     27 USETOOLS?=	no
     28 NEED_OWN_INSTALL_TARGET?=no
     29 .include <bsd.own.mk>
     30 
     31 ##
     32 ## (1) port identification
     33 ##
     34 HB68K=		$S/arch/hb68k
     35 GENASSYM_CONF=	$S/arch/m68k/m68k/genassym.cf
     36 
     37 ##
     38 ## (2) compile settings
     39 ##
     40 CPPFLAGS+=	-Dhb68k
     41 .if !defined(CMACHFLAGS)
     42 .include "$S/arch/m68k/Makefile.cmachflags"
     43 . if ${HAVE_M68010} == "no"
     44 CMACHFLAGS+=	-Wa,-m68030
     45 . endif
     46 .endif
     47 
     48 CFLAGS+=	${CMACHFLAGS} -msoft-float
     49 AFLAGS+=	-x assembler-with-cpp
     50 
     51 ##
     52 ## (3) libkern and compat
     53 ##
     54 OPT_MODULAR=	%MODULAR%
     55 # MACHINE_ARCH needs to be propagated to lib/libkern/arch/m68k/Makefile.inc.
     56 KERNMISCMAKEFLAGS=	MACHINE_ARCH=${MACHINE_ARCH}
     57 
     58 ##
     59 ## (4) local objects, compile rules, and dependencies
     60 ##
     61 .include "$S/arch/m68k/conf/Makefile.kern.m68k.inc"
     62 
     63 .if ${MACHINE_ARCH} == "m68k"
     64 # for the Motorola 68040 Floating Point Software Product
     65 .include "$S/arch/m68k/fpsp/Makefile.inc"
     66 
     67 # for the Motorola 68060 Software Support Package
     68 .include "$S/arch/m68k/060sp/Makefile.inc"
     69 .endif
     70 
     71 MD_OBJS=	locore.o
     72 .if ${MACHINE_ARCH} == "m68k"
     73 MD_LIBS=	${FPSP}
     74 .endif
     75 MD_CFILES=
     76 MD_SFILES=	${HB68K}/hb68k/locore.s
     77 
     78 
     79 locore.o: ${HB68K}/hb68k/locore.s assym.h
     80 	${NORMAL_S}
     81 ##
     82 ## (5) link settings
     83 ##
     84 LINKFORMAT=	-n
     85 TEXTADDR?=	2000
     86 
     87 ##
     88 ## (6) port specific target dependencies
     89 ##
     90 
     91 # depend on CPU configuration
     92 locore.o sys_machdep.o trap.o: Makefile
     93 
     94 copy.o copypage.o lock_stubs.o: assym.h
     95 
     96 ##
     97 ## (7) misc settings
     98 ##
     99 
    100 ##
    101 ## (8) config(8) generated machinery
    102 ##
    103 %INCLUDES
    104 
    105 %OBJS
    106 
    107 %CFILES
    108 
    109 %SFILES
    110 
    111 %LOAD
    112 
    113 %RULES
    114 
    115 ##
    116 ## (9) port independent kernel machinery
    117 ##
    118 .include "$S/conf/Makefile.kern.inc"
    119 
    120 ##
    121 ## (10) Appending make options.
    122 ##
    123 %MAKEOPTIONSAPPEND
    124