Home | History | Annotate | Line # | Download | only in stand
Makefile.buildboot revision 1.21
      1  1.21   tsutsui #	$NetBSD: Makefile.buildboot,v 1.21 2014/01/12 15:26:28 tsutsui Exp $
      2   1.1   reinoud 
      3   1.1   reinoud S?=	${.CURDIR}/../../../..
      4   1.1   reinoud 
      5   1.1   reinoud .PATH: ${.CURDIR}/../lib
      6   1.1   reinoud 
      7  1.16      matt KLINK_MACHINE=	acorn32
      8  1.15      matt 
      9   1.1   reinoud SRCS=	${PROGSOURCE}
     10   1.1   reinoud NOMAN=# defined
     11   1.1   reinoud BINDIR=/usr/mdec
     12   1.1   reinoud BINMODE=444
     13   1.1   reinoud FILESDIR=/usr/mdec
     14   1.4    simonb 
     15   1.4    simonb # XXX SHOULD NOT NEED TO DEFINE THESE!
     16   1.4    simonb LIBCRT0=
     17  1.21   tsutsui LIBCRTI=
     18   1.4    simonb LIBC=
     19   1.4    simonb LIBCRTBEGIN=
     20   1.4    simonb LIBCRTEND=
     21   1.1   reinoud 
     22  1.10     bjh21 MKMODULE?=no
     23   1.9     bjh21 .if ${MKMODULE} == "yes"
     24   1.9     bjh21 RISCOSTYPE ?= ffa
     25   1.9     bjh21 LINKFLAGS+=-shared -Bsymbolic --no-undefined -T ${.CURDIR}/../module.ldscript
     26   1.9     bjh21 CFLAGS+=-DRISCOS_MODULE
     27   1.9     bjh21 .else
     28   1.1   reinoud RISCOSTYPE ?= ff8
     29   1.9     bjh21 RELOC=8000
     30   1.9     bjh21 # -N (OMAGIC) since we don't need a gap between text and data.
     31   1.9     bjh21 LINKFLAGS+=-N -Ttext ${RELOC}
     32   1.9     bjh21 .endif
     33   1.1   reinoud 
     34  1.14     joerg .include <bsd.own.mk>
     35  1.16      matt .include <bsd.klinks.mk>
     36  1.14     joerg 
     37   1.1   reinoud SRCS+=		vers.c
     38   1.1   reinoud CLEANFILES+=	vers.c
     39   1.1   reinoud .PHONY: vers.c
     40   1.1   reinoud vers.c: ${.CURDIR}/version
     41  1.14     joerg 	${HOST_SH} ${S}/conf/newvers_stand.sh ${${MKREPRO} == "yes" :?:-D} \
     42  1.16      matt 	    ${.CURDIR}/version ${KLINK_MACHINE} ${NEWVERSWHAT}
     43   1.1   reinoud 
     44   1.1   reinoud CPPFLAGS+=	-D_STANDALONE 
     45   1.7     bjh21 CPPFLAGS+=	-I. -I${.CURDIR}/../../.. -I${.CURDIR}/../../../..
     46   1.1   reinoud CPPFLAGS+=	-I${.CURDIR}/../lib
     47  1.20     joerg CPPFLAGS+=	${ARM_APCS_FLAGS} -march=armv3m
     48  1.18  christos .if ${HAVE_GCC} < 48
     49  1.17      matt CPPFLAGS+=	-mno-thumb -mno-thumb-interwork
     50  1.19  christos .else
     51  1.19  christos CPPFLAGS+=	-marm
     52  1.18  christos .endif
     53  1.15      matt CPUFLAGS=
     54   1.1   reinoud CFLAGS=		-O2
     55  1.17      matt CFLAGS+=	-ffreestanding -fno-unwind-tables
     56   1.1   reinoud CFLAGS+=	-Wall -Wstrict-prototypes -Wmissing-prototypes
     57   1.1   reinoud 
     58   1.2     bjh21 CLEANFILES+= machine ${MACHINE_ARCH}
     59   1.1   reinoud 
     60   1.1   reinoud ### find out what to use for libkern
     61   1.1   reinoud KERN_AS=	library
     62   1.1   reinoud .include "${S}/lib/libkern/Makefile.inc"
     63   1.1   reinoud LIBKERN=	${KERNLIB}
     64   1.1   reinoud 
     65   1.1   reinoud ### find out what to use for libz
     66   1.1   reinoud Z_AS=		library
     67   1.1   reinoud .include "${S}/lib/libz/Makefile.inc"
     68   1.1   reinoud LIBZ=		${ZLIB}
     69   1.1   reinoud 
     70   1.1   reinoud ### find out what to use for libsa
     71   1.1   reinoud SA_AS=		library
     72  1.11     bjh21 SAMISCMAKEFLAGS+= SA_INCLUDE_NET=no
     73   1.1   reinoud CPPFLAGS+=	-DLIBSA_NO_RAW_ACCESS \
     74   1.1   reinoud 		-DHEAP_VARIABLE
     75   1.1   reinoud .include "${S}/lib/libsa/Makefile.inc"
     76   1.1   reinoud LIBSA=		${SALIB}
     77   1.1   reinoud 
     78   1.1   reinoud ### find out what to use for libriscos
     79   1.1   reinoud RISCOS_AS=		library
     80   1.1   reinoud .include "${S}/arch/acorn32/stand/lib/Makefile.inc"
     81   1.1   reinoud LIBRISCOS=		${RISCOSLIB}
     82   1.1   reinoud 
     83   1.1   reinoud ${PROG}: ${OBJS} ${LIBSA} ${LIBZ} ${LIBKERN} ${LIBRISCOS}
     84   1.9     bjh21 	${_MKTARGET_LINK}
     85   1.9     bjh21 	${LD} -o ${.TARGET} ${LINKFLAGS} ${OBJS} \
     86  1.12     bjh21 	    --start-group ${LIBSA} ${LIBZ} ${LIBRISCOS} ${LIBKERN} --end-group
     87   1.1   reinoud 	${SIZE} ${.TARGET}
     88   1.1   reinoud 
     89   1.1   reinoud ${PROG},${RISCOSTYPE}: ${PROG}
     90   1.9     bjh21 	${_MKTARGET_CREATE}
     91   1.1   reinoud 	${OBJCOPY} --output-target=binary ${.ALLSRC} ${.TARGET}
     92   1.1   reinoud 
     93   1.1   reinoud realall: ${PROG},${RISCOSTYPE}
     94   1.1   reinoud 
     95   1.1   reinoud CLEANFILES+=	${PROG},${RISCOSTYPE}
     96   1.1   reinoud FILES+=		${PROG},${RISCOSTYPE}
     97   1.1   reinoud 
     98   1.1   reinoud .include <bsd.prog.mk>
     99