Home | History | Annotate | Line # | Download | only in stand
Makefile.bootprogs revision 1.3
      1 # $NetBSD: Makefile.bootprogs,v 1.3 2009/05/03 15:12:12 tsutsui Exp $
      2 
      3 S=		${.CURDIR}/../../../../..
      4 
      5 NOMAN=		# defined
      6 
      7 BINDIR=		/usr/mdec
      8 BINMODE=	0444
      9 
     10 PRIMARY_LOAD_ADDRESS?=0x8c201000
     11 SECONDARY_LOAD_ADDRESS?=0x8ff00000
     12 
     13 .include <bsd.own.mk>
     14 
     15 STRIPFLAG=	# override
     16 
     17 LIBCRT0=	# nothing
     18 LIBCRTBEGIN=	# nothing
     19 LIBCRTEND=	# nothing
     20 LIBC=		# nothing
     21 
     22 .PATH:	${.CURDIR}/..
     23 
     24 COPTS=		-m4-nofpu -Os -ffreestanding
     25 
     26 LDFLAGS+=	-N
     27 CFLAGS+=	-Wall -Wmissing-prototypes -Wstrict-prototypes
     28 CPPFLAGS+=	-nostdinc -D_STANDALONE
     29 CPPFLAGS+=	-DSH4
     30 CPPFLAGS+=	-I${.OBJDIR} -I${.CURDIR}/.. -I${.CURDIR}/../../boot -I${S}
     31 
     32 .if !make(obj) && !make(clean) && !make(cleandir)
     33 .BEGIN:
     34 	-rm -f machine && \
     35 	    ln -s ${S}/arch/${MACHINE}/include machine
     36 	-rm -f ${MACHINE_CPU} && \
     37 	    ln -s ${S}/arch/${MACHINE_CPU}/include ${MACHINE_CPU}
     38 .ifdef LIBOBJ
     39 	-rm -f lib && ln -s ${LIBOBJ}/lib lib
     40 	mkdir -p ${LIBOBJ}/lib
     41 .endif
     42 .endif
     43 
     44 ### find out what to use for libsa
     45 SA_AS= library
     46 .include "${S}/lib/libsa/Makefile.inc"
     47 LIBSA= ${SALIB}
     48 CPPFLAGS+=	-I$(SADIR)
     49 
     50 ### find out what to use for libkern
     51 KERN_AS= library
     52 .include "${S}/lib/libkern/Makefile.inc"
     53 LIBKERN= ${KERNLIB}
     54 
     55 ### find out what to use for libz
     56 Z_AS= library
     57 .include "${S}/lib/libz/Makefile.inc"
     58 LIBZ= ${ZLIB}
     59 
     60 cleandir distclean: cleanlibdir
     61 
     62 cleanlibdir:
     63 	-rm -rf lib
     64