Home | History | Annotate | Line # | Download | only in stand
Makefile.buildboot revision 1.8.4.1
      1  1.8.4.1   rpaulo #	$NetBSD: Makefile.buildboot,v 1.8.4.1 2006/09/09 02:36:41 rpaulo 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.1  reinoud SRCS=	${PROGSOURCE}
      8      1.1  reinoud NOMAN=# defined
      9      1.1  reinoud BINDIR=/usr/mdec
     10      1.1  reinoud BINMODE=444
     11      1.1  reinoud FILESDIR=/usr/mdec
     12      1.4   simonb 
     13      1.4   simonb # XXX SHOULD NOT NEED TO DEFINE THESE!
     14      1.4   simonb LIBCRT0=
     15      1.4   simonb LIBC=
     16      1.4   simonb LIBCRTBEGIN=
     17      1.4   simonb LIBCRTEND=
     18      1.1  reinoud 
     19  1.8.4.1   rpaulo MKMODULE?=no
     20  1.8.4.1   rpaulo .if ${MKMODULE} == "yes"
     21  1.8.4.1   rpaulo RISCOSTYPE ?= ffa
     22  1.8.4.1   rpaulo LINKFLAGS+=-shared -Bsymbolic --no-undefined -T ${.CURDIR}/../module.ldscript
     23  1.8.4.1   rpaulo CFLAGS+=-DRISCOS_MODULE
     24  1.8.4.1   rpaulo .else
     25      1.1  reinoud RISCOSTYPE ?= ff8
     26  1.8.4.1   rpaulo RELOC=8000
     27  1.8.4.1   rpaulo # -N (OMAGIC) since we don't need a gap between text and data.
     28  1.8.4.1   rpaulo LINKFLAGS+=-N -Ttext ${RELOC}
     29  1.8.4.1   rpaulo .endif
     30      1.1  reinoud 
     31      1.1  reinoud SRCS+=		vers.c
     32      1.1  reinoud CLEANFILES+=	vers.c
     33      1.1  reinoud .PHONY: vers.c
     34      1.1  reinoud vers.c: ${.CURDIR}/version
     35      1.5    lukem 	${HOST_SH} ${S}/conf/newvers_stand.sh ${.CURDIR}/version ${MACHINE} ${NEWVERSWHAT}
     36      1.1  reinoud 
     37      1.1  reinoud CPPFLAGS+=	-D_STANDALONE 
     38      1.7    bjh21 CPPFLAGS+=	-I. -I${.CURDIR}/../../.. -I${.CURDIR}/../../../..
     39      1.1  reinoud CPPFLAGS+=	-I${.CURDIR}/../lib
     40      1.1  reinoud CFLAGS=		-O2
     41      1.3     matt CFLAGS+=	-ffreestanding
     42      1.1  reinoud CFLAGS+=	-Wall -Wstrict-prototypes -Wmissing-prototypes
     43      1.1  reinoud 
     44      1.1  reinoud .if !make(obj) && !make(clean) && !make(cleandir)
     45      1.6    bjh21 .BEGIN:
     46      1.6    bjh21 	-rm -f machine ${MACHINE_ARCH}
     47      1.6    bjh21 	ln -s $S/arch/${MACHINE}/include machine
     48      1.6    bjh21 	ln -s $S/arch/${MACHINE_ARCH}/include ${MACHINE_ARCH}
     49      1.1  reinoud .endif
     50      1.1  reinoud 
     51      1.2    bjh21 CLEANFILES+= machine ${MACHINE_ARCH}
     52      1.1  reinoud 
     53      1.1  reinoud ### find out what to use for libkern
     54      1.1  reinoud KERN_AS=	library
     55      1.1  reinoud .include "${S}/lib/libkern/Makefile.inc"
     56      1.1  reinoud LIBKERN=	${KERNLIB}
     57      1.1  reinoud 
     58      1.1  reinoud ### find out what to use for libz
     59      1.1  reinoud Z_AS=		library
     60      1.1  reinoud .include "${S}/lib/libz/Makefile.inc"
     61      1.1  reinoud LIBZ=		${ZLIB}
     62      1.1  reinoud 
     63      1.1  reinoud ### find out what to use for libsa
     64      1.1  reinoud SA_AS=		library
     65  1.8.4.1   rpaulo SAMISCMAKEFLAGS+= SA_INCLUDE_NET=no
     66      1.1  reinoud CPPFLAGS+=	-DLIBSA_NO_RAW_ACCESS \
     67      1.1  reinoud 		-DLIBSA_USE_MEMCPY -DLIBSA_USE_MEMSET \
     68      1.1  reinoud 		-DHEAP_VARIABLE
     69      1.1  reinoud .include "${S}/lib/libsa/Makefile.inc"
     70      1.1  reinoud LIBSA=		${SALIB}
     71      1.1  reinoud 
     72      1.1  reinoud ### find out what to use for libriscos
     73      1.1  reinoud RISCOS_AS=		library
     74      1.1  reinoud .include "${S}/arch/acorn32/stand/lib/Makefile.inc"
     75      1.1  reinoud LIBRISCOS=		${RISCOSLIB}
     76      1.1  reinoud 
     77      1.1  reinoud ${PROG}: ${OBJS} ${LIBSA} ${LIBZ} ${LIBKERN} ${LIBRISCOS}
     78  1.8.4.1   rpaulo 	${_MKTARGET_LINK}
     79  1.8.4.1   rpaulo 	${LD} -o ${.TARGET} ${LINKFLAGS} ${OBJS} \
     80  1.8.4.1   rpaulo 	    --start-group ${LIBSA} ${LIBZ} ${LIBRISCOS} ${LIBKERN} --end-group
     81      1.1  reinoud 	${SIZE} ${.TARGET}
     82      1.1  reinoud 
     83      1.1  reinoud ${PROG},${RISCOSTYPE}: ${PROG}
     84  1.8.4.1   rpaulo 	${_MKTARGET_CREATE}
     85      1.1  reinoud 	${OBJCOPY} --output-target=binary ${.ALLSRC} ${.TARGET}
     86      1.1  reinoud 
     87      1.1  reinoud realall: ${PROG},${RISCOSTYPE}
     88      1.1  reinoud 
     89      1.1  reinoud CLEANFILES+=	${PROG},${RISCOSTYPE}
     90      1.1  reinoud FILES+=		${PROG},${RISCOSTYPE}
     91      1.1  reinoud 
     92      1.1  reinoud .include <bsd.prog.mk>
     93