Home | History | Annotate | Line # | Download | only in stand
Makefile.inc revision 1.24.2.1
      1  1.24.2.1       tls #	$NetBSD: Makefile.inc,v 1.24.2.1 2014/08/10 06:54:09 tls 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.24.2.1       tls .if ${MACHINE} == "sun3"
     18  1.24.2.1       tls RELOC?= 280000
     19  1.24.2.1       tls .else
     20       1.1  fredette RELOC?= 240000
     21  1.24.2.1       tls .endif
     22       1.8   tsutsui DEFS?= -Dsun3 -D_STANDALONE -D__daddr_t=int32_t
     23       1.1  fredette INCL?= -I. -I${.CURDIR} -I${.CURDIR}/../libsa -I${S}/lib/libsa -I${S}
     24       1.1  fredette 
     25      1.21  christos .if defined(HAVE_GCC) && ${HAVE_GCC} >= 48
     26      1.21  christos # gcc 4.8 convers -mc68000 to -mcpu=68000 and that breaks gas
     27      1.21  christos # which works for -march=68010 but breaks for -mcpu=68010
     28      1.21  christos CPUFLAGS= -march=68010
     29      1.21  christos .else
     30      1.21  christos CPUFLAGS= -mc68000 -Wa,-mc68010
     31      1.21  christos .endif
     32      1.19     joerg COPTS= -Os -fno-defer-pop -ffreestanding -fno-unwind-tables
     33      1.12   tsutsui CFLAGS= -msoft-float
     34      1.12   tsutsui CPPFLAGS= ${DEFS} ${DEBUG} ${INCL}
     35       1.1  fredette 
     36       1.1  fredette SRTOBJ= ${LIBSA}/SRT0.o ${LIBSA}/SRT1.o
     37      1.16   tsutsui SRTLIB= ${LIBSA}/lib/sa/libsa.a ${LIBSA}/lib/kern/libkern.a
     38       1.1  fredette 
     39       1.1  fredette CLEANFILES+= ${SA_PROG} ${SA_PROG}.bin
     40       1.1  fredette 
     41       1.1  fredette # Make a copy of the executable with its ELF headers removed.
     42       1.1  fredette ${SA_PROG}.bin : ${SA_PROG}
     43       1.1  fredette 	${OBJCOPY} --output-target=binary ${SA_PROG} $@
     44       1.1  fredette 
     45       1.1  fredette ${SA_PROG} : ${OBJS} ${DPADD} ${SRTLIB}
     46      1.23  christos 	${LD} -N -Ttext ${RELOC} -e start ${SA_LDFLAGS} -o $@ \
     47      1.22  christos 	    ${SRTOBJ} ${OBJS} ${LDADD} ${SRTLIB}
     48       1.1  fredette 	@${SIZE} $@
     49       1.1  fredette 
     50       1.1  fredette .if !target(proginstall)
     51       1.1  fredette realall: ${SA_PROG} ${SA_PROG}.bin
     52       1.1  fredette proginstall: ${SA_PROG}.bin
     53       1.2     lukem 	${INSTALL_FILE} -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \
     54       1.2     lukem 		${SA_PROG}.bin ${DESTDIR}${MDEC_DIR}/${SA_PROG}
     55       1.1  fredette .endif
     56       1.1  fredette 
     57       1.1  fredette .endif	# defined(SA_PROG)
     58       1.1  fredette 
     59      1.15   tsutsui .include <bsd.klinks.mk>
     60      1.17   tsutsui 
     61      1.17   tsutsui # XXX SHOULD NOT NEED TO DEFINE THESE!
     62      1.17   tsutsui LIBCRT0=
     63      1.24   tsutsui LIBCRTI=
     64      1.17   tsutsui LIBC=
     65      1.17   tsutsui LIBCRTBEGIN=
     66      1.17   tsutsui LIBCRTEND=
     67