Home | History | Annotate | Line # | Download | only in conf
Makefile.luna68k revision 1.25
      1 #	$NetBSD: Makefile.luna68k,v 1.25 2014/11/13 15:03:06 uebayasi 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/luna68k/conf/``machineid''
      9 # after which you should do
     10 #	config machineid
     11 # Machine generic makefile changes should be made in
     12 #	/sys/arch/luna68k/conf/Makefile.luna68k
     13 # after which config should be rerun for all machines of that type.
     14 # To specify debugging, add the config line: makeoptions DEBUG="-g"
     15 # A better way is to specify -g only for a few files.
     16 #
     17 #	makeoptions DEBUGLIST="uvm* trap if_*"
     18 
     19 MACHINE_ARCH=m68k
     20 USETOOLS?=	no
     21 NEED_OWN_INSTALL_TARGET?=no
     22 .include <bsd.own.mk>
     23 
     24 ##
     25 ## (1) port identification
     26 ##
     27 LUNA68K=	$S/arch/luna68k
     28 GENASSYM_CONF=	${LUNA68K}/luna68k/genassym.cf
     29 
     30 ##
     31 ## (2) compile settings
     32 ##
     33 CPPFLAGS+=	-Dluna68k
     34 CFLAGS+=	-msoft-float
     35 AFLAGS+=	-x assembler-with-cpp
     36 
     37 ##
     38 ## (3) libkern and compat
     39 ##
     40 OPT_MODULAR=	%MODULAR%
     41 .if !empty(OPT_MODULAR)
     42 KERN_AS=	obj
     43 .else
     44 KERN_AS=	library
     45 .endif
     46 
     47 ##
     48 ## (4) local objects, compile rules, and dependencies
     49 ##
     50 # for the Motorola 68040 Floating Point Software Product
     51 .include "$S/arch/m68k/fpsp/Makefile.inc"
     52 
     53 MD_OBJS=	locore.o ${FPSP}
     54 MD_CFILES=
     55 MD_SFILES=	
     56 
     57 locore.o: ${LUNA68K}/luna68k/locore.s assym.h
     58 	${NORMAL_S}
     59 
     60 ##
     61 ## (5) link settings
     62 ##
     63 LINKFORMAT=	-N -T ldscript
     64 .if (${OBJECT_FMT} == "ELF")
     65 # Need to convert the kernel from ELF to a.out so that PROM can load it.
     66 
     67 SYSTEM_LD_HEAD_EXTRA+=; \
     68 	( cat ${LUNA68K}/conf/kern.ldscript.head ; \
     69 	  OBJDUMP=${OBJDUMP} ${HOST_SH} $S/conf/mkldscript.sh \
     70 	        ${SYSTEM_OBJ} ; \
     71 	  cat ${LUNA68K}/conf/kern.ldscript.tail ) > ldscript
     72 SYSTEM_DEP+=	${LUNA68K}/conf/kern.ldscript.head \
     73 		$S/conf/mkldscript.sh \
     74 		${LUNA68K}/conf/kern.ldscript.tail
     75 
     76 SYSTEM_LD_TAIL_EXTRA+=; \
     77 	echo "${ELF2AOUT} $@ $@.aout" ; \
     78 	    ${ELF2AOUT} $@ $@.aout
     79 .endif
     80 
     81 ##
     82 ## (6) port specific target dependencies
     83 ##
     84 
     85 # depend on CPU configuration
     86 machdep.c trap.o: Makefile
     87 
     88 copy.o copypage.o lock_stubs.o: assym.h
     89 
     90 ##
     91 ## (7) misc settings
     92 ##
     93 
     94 ##
     95 ## (8) config(8) generated machinery
     96 ##
     97 %INCLUDES
     98 
     99 %OBJS
    100 
    101 %CFILES
    102 
    103 %SFILES
    104 
    105 %LOAD
    106 
    107 %RULES
    108 
    109 ##
    110 ## (9) port independent kernel machinery
    111 ##
    112 .include "$S/conf/Makefile.kern.inc"
    113 
    114 ##
    115 ## (10) Appending make options.
    116 ##
    117 %MAKEOPTIONSAPPEND
    118