Home | History | Annotate | Line # | Download | only in stand
Makefile.inc revision 1.16.4.1
      1  1.16.4.1     rmind #	$NetBSD: Makefile.inc,v 1.16.4.1 2011/05/31 03:04:20 rmind 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.16.4.1     rmind WARNS?=	2
     12  1.16.4.1     rmind 
     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.12   tsutsui CPUFLAGS= -mc68000 -Wa,-mc68010
     22      1.12   tsutsui COPTS= -Os -fno-defer-pop -ffreestanding
     23      1.12   tsutsui CFLAGS= -msoft-float
     24      1.12   tsutsui CPPFLAGS= ${DEFS} ${DEBUG} ${INCL}
     25       1.1  fredette 
     26       1.1  fredette SRTOBJ= ${LIBSA}/SRT0.o ${LIBSA}/SRT1.o
     27      1.16   tsutsui SRTLIB= ${LIBSA}/lib/sa/libsa.a ${LIBSA}/lib/kern/libkern.a
     28       1.1  fredette 
     29       1.1  fredette CLEANFILES+= ${SA_PROG} ${SA_PROG}.bin
     30       1.1  fredette 
     31       1.1  fredette # Make a copy of the executable with its ELF headers removed.
     32       1.1  fredette ${SA_PROG}.bin : ${SA_PROG}
     33       1.1  fredette 	${OBJCOPY} --output-target=binary ${SA_PROG} $@
     34       1.1  fredette 
     35       1.1  fredette ${SA_PROG} : ${OBJS} ${DPADD} ${SRTLIB}
     36       1.3     lukem 	${LD} -N -Ttext ${RELOC} -e start ${SA_LDFLAGS} -o $@ \
     37       1.1  fredette 	  ${SRTOBJ} ${OBJS} ${LDADD} ${SRTLIB}
     38       1.1  fredette 	@${SIZE} $@
     39       1.1  fredette 
     40       1.1  fredette .if !target(proginstall)
     41       1.1  fredette realall: ${SA_PROG} ${SA_PROG}.bin
     42       1.1  fredette proginstall: ${SA_PROG}.bin
     43       1.2     lukem 	${INSTALL_FILE} -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \
     44       1.2     lukem 		${SA_PROG}.bin ${DESTDIR}${MDEC_DIR}/${SA_PROG}
     45       1.1  fredette .endif
     46       1.1  fredette 
     47       1.1  fredette .endif	# defined(SA_PROG)
     48       1.1  fredette 
     49      1.15   tsutsui .include <bsd.klinks.mk>
     50  1.16.4.1     rmind 
     51  1.16.4.1     rmind # XXX SHOULD NOT NEED TO DEFINE THESE!
     52  1.16.4.1     rmind LIBCRT0=
     53  1.16.4.1     rmind LIBC=
     54  1.16.4.1     rmind LIBCRTBEGIN=
     55  1.16.4.1     rmind LIBCRTEND=
     56