Home | History | Annotate | Line # | Download | only in stand
Makefile.inc revision 1.18.4.1
      1  1.18.4.1      yamt #	$NetBSD: Makefile.inc,v 1.18.4.1 2014/05/22 11:40:11 yamt Exp $
      2       1.1  fredette 
      3       1.1  fredette # Must have S=/usr/src/sys (or equivalent)
      4       1.1  fredette # But note: this is w.r.t. a subdirectory
      5       1.1  fredette S=	${.CURDIR}/../../../..
      6       1.1  fredette 
      7       1.1  fredette .if defined(SA_PROG)
      8       1.1  fredette 
      9       1.1  fredette .include <bsd.own.mk>
     10       1.1  fredette 
     11      1.18   tsutsui WARNS?=	2
     12      1.18   tsutsui 
     13       1.1  fredette LIBSA!=cd ${.CURDIR}/../libsa && ${PRINTOBJDIR}
     14       1.1  fredette 
     15       1.1  fredette MDEC_DIR?=/usr/mdec
     16       1.1  fredette 
     17       1.1  fredette RELOC?= 240000
     18       1.8   tsutsui DEFS?= -Dsun3 -D_STANDALONE -D__daddr_t=int32_t
     19       1.1  fredette INCL?= -I. -I${.CURDIR} -I${.CURDIR}/../libsa -I${S}/lib/libsa -I${S}
     20       1.1  fredette 
     21  1.18.4.1      yamt .if defined(HAVE_GCC) && ${HAVE_GCC} >= 48
     22  1.18.4.1      yamt # gcc 4.8 convers -mc68000 to -mcpu=68000 and that breaks gas
     23  1.18.4.1      yamt # which works for -march=68010 but breaks for -mcpu=68010
     24  1.18.4.1      yamt CPUFLAGS= -march=68010
     25  1.18.4.1      yamt .else
     26      1.12   tsutsui CPUFLAGS= -mc68000 -Wa,-mc68010
     27  1.18.4.1      yamt .endif
     28  1.18.4.1      yamt COPTS= -Os -fno-defer-pop -ffreestanding -fno-unwind-tables
     29      1.12   tsutsui CFLAGS= -msoft-float
     30      1.12   tsutsui CPPFLAGS= ${DEFS} ${DEBUG} ${INCL}
     31       1.1  fredette 
     32       1.1  fredette SRTOBJ= ${LIBSA}/SRT0.o ${LIBSA}/SRT1.o
     33      1.16   tsutsui SRTLIB= ${LIBSA}/lib/sa/libsa.a ${LIBSA}/lib/kern/libkern.a
     34       1.1  fredette 
     35       1.1  fredette CLEANFILES+= ${SA_PROG} ${SA_PROG}.bin
     36       1.1  fredette 
     37       1.1  fredette # Make a copy of the executable with its ELF headers removed.
     38       1.1  fredette ${SA_PROG}.bin : ${SA_PROG}
     39       1.1  fredette 	${OBJCOPY} --output-target=binary ${SA_PROG} $@
     40       1.1  fredette 
     41       1.1  fredette ${SA_PROG} : ${OBJS} ${DPADD} ${SRTLIB}
     42       1.3     lukem 	${LD} -N -Ttext ${RELOC} -e start ${SA_LDFLAGS} -o $@ \
     43  1.18.4.1      yamt 	    ${SRTOBJ} ${OBJS} ${LDADD} ${SRTLIB}
     44       1.1  fredette 	@${SIZE} $@
     45       1.1  fredette 
     46       1.1  fredette .if !target(proginstall)
     47       1.1  fredette realall: ${SA_PROG} ${SA_PROG}.bin
     48       1.1  fredette proginstall: ${SA_PROG}.bin
     49       1.2     lukem 	${INSTALL_FILE} -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \
     50       1.2     lukem 		${SA_PROG}.bin ${DESTDIR}${MDEC_DIR}/${SA_PROG}
     51       1.1  fredette .endif
     52       1.1  fredette 
     53       1.1  fredette .endif	# defined(SA_PROG)
     54       1.1  fredette 
     55      1.15   tsutsui .include <bsd.klinks.mk>
     56      1.17   tsutsui 
     57      1.17   tsutsui # XXX SHOULD NOT NEED TO DEFINE THESE!
     58      1.17   tsutsui LIBCRT0=
     59  1.18.4.1      yamt LIBCRTI=
     60      1.17   tsutsui LIBC=
     61      1.17   tsutsui LIBCRTBEGIN=
     62      1.17   tsutsui LIBCRTEND=
     63