Home | History | Annotate | Line # | Download | only in stand
Makefile.inc revision 1.1.8.3
      1  1.1.8.3  nathanw #	$NetBSD: Makefile.inc,v 1.1.8.3 2002/06/20 03:41:56 nathanw Exp $
      2  1.1.8.2  nathanw 
      3  1.1.8.2  nathanw # Must have S=/usr/src/sys (or equivalent)
      4  1.1.8.2  nathanw # But note: this is w.r.t. a subdirectory
      5  1.1.8.2  nathanw S=	${.CURDIR}/../../../..
      6  1.1.8.2  nathanw 
      7  1.1.8.2  nathanw .if defined(SA_PROG)
      8  1.1.8.2  nathanw 
      9  1.1.8.2  nathanw .include <bsd.own.mk>
     10  1.1.8.2  nathanw 
     11  1.1.8.2  nathanw LIBSA!=cd ${.CURDIR}/../libsa && ${PRINTOBJDIR}
     12  1.1.8.2  nathanw 
     13  1.1.8.2  nathanw MDEC_DIR?=/usr/mdec
     14  1.1.8.2  nathanw 
     15  1.1.8.2  nathanw RELOC?= 240000
     16  1.1.8.2  nathanw DEFS?= -Dsun3 -D_STANDALONE
     17  1.1.8.2  nathanw INCL?= -I. -I${.CURDIR} -I${.CURDIR}/../libsa -I${S}/lib/libsa -I${S}
     18  1.1.8.2  nathanw 
     19  1.1.8.3  nathanw CFLAGS= -mc68000 -Wa,-mc68010 -Os -msoft-float -fno-defer-pop
     20  1.1.8.2  nathanw CPPFLAGS= ${DEFS} ${DBG} ${INCL}
     21  1.1.8.2  nathanw 
     22  1.1.8.2  nathanw SRTOBJ= ${LIBSA}/SRT0.o ${LIBSA}/SRT1.o
     23  1.1.8.2  nathanw SRTLIB= ${LIBSA}/libsa.a
     24  1.1.8.2  nathanw 
     25  1.1.8.2  nathanw CLEANFILES+= ${SA_PROG} ${SA_PROG}.bin
     26  1.1.8.2  nathanw 
     27  1.1.8.2  nathanw # Make a copy of the executable with its ELF headers removed.
     28  1.1.8.2  nathanw ${SA_PROG}.bin : ${SA_PROG}
     29  1.1.8.2  nathanw 	${OBJCOPY} --output-target=binary ${SA_PROG} $@
     30  1.1.8.2  nathanw 
     31  1.1.8.2  nathanw ${SA_PROG} : ${OBJS} ${DPADD} ${SRTLIB}
     32  1.1.8.3  nathanw 	${LD} -N -Ttext ${RELOC} -e start ${SA_LDFLAGS} -o $@ \
     33  1.1.8.2  nathanw 	  ${SRTOBJ} ${OBJS} ${LDADD} ${SRTLIB}
     34  1.1.8.2  nathanw 	@${SIZE} $@
     35  1.1.8.2  nathanw 
     36  1.1.8.2  nathanw .if !target(proginstall)
     37  1.1.8.2  nathanw realall: ${SA_PROG} ${SA_PROG}.bin
     38  1.1.8.2  nathanw proginstall: ${SA_PROG}.bin
     39  1.1.8.2  nathanw 	${INSTALL_FILE} -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \
     40  1.1.8.2  nathanw 		${SA_PROG}.bin ${DESTDIR}${MDEC_DIR}/${SA_PROG}
     41  1.1.8.2  nathanw .endif
     42  1.1.8.2  nathanw 
     43  1.1.8.2  nathanw .endif	# defined(SA_PROG)
     44  1.1.8.2  nathanw 
     45  1.1.8.2  nathanw CLEANFILES+= machine m68k sun68k
     46  1.1.8.2  nathanw .BEGIN: machine m68k sun68k
     47  1.1.8.2  nathanw .NOPATH: machine m68k sun68k
     48  1.1.8.2  nathanw realall realdepend: machine m68k sun68k
     49  1.1.8.2  nathanw 
     50  1.1.8.2  nathanw machine :
     51  1.1.8.2  nathanw 	-rm -f $@
     52  1.1.8.2  nathanw 	ln -s ${S}/arch/sun68k/include $@
     53  1.1.8.2  nathanw 
     54  1.1.8.2  nathanw m68k :
     55  1.1.8.2  nathanw 	-rm -f $@
     56  1.1.8.2  nathanw 	ln -s ${S}/arch/m68k/include $@
     57  1.1.8.2  nathanw 
     58  1.1.8.2  nathanw sun68k :
     59  1.1.8.2  nathanw 	-rm -f $@
     60  1.1.8.2  nathanw 	ln -s ${S}/arch/sun68k $@
     61