Makefile revision 1.10.4.2       1  1.10.4.2  nathanw #	$NetBSD: Makefile,v 1.10.4.2 2002/01/08 00:23:39 nathanw Exp $
      2  1.10.4.2  nathanw 
      3  1.10.4.2  nathanw NOMAN=	# defined
      4  1.10.4.2  nathanw 
      5  1.10.4.2  nathanw # for OBJECT_FMT
      6  1.10.4.2  nathanw .include <bsd.own.mk>
      7  1.10.4.2  nathanw 
      8  1.10.4.2  nathanw PROG=	bootxx
      9  1.10.4.2  nathanw SRCS=	bootxx.c filesystem.c
     10  1.10.4.2  nathanw 
     11  1.10.4.2  nathanw STRIPFLAG=
     12  1.10.4.2  nathanw BINDIR=	/usr/mdec
     13  1.10.4.2  nathanw BINMODE=${NONBINMODE}
     14  1.10.4.2  nathanw 
     15  1.10.4.2  nathanw LIBCRT0=
     16  1.10.4.2  nathanw 
     17  1.10.4.2  nathanw DEFS=	-D_STANDALONE  -DHEAP_VARIABLE
     18  1.10.4.2  nathanw INCL=	-I. -I${S_LIBTOS} -I${S_MACHSA} -I${S_KERN} -I${S_SA} -I${S}
     19  1.10.4.2  nathanw 
     20  1.10.4.2  nathanw CPPFLAGS+=	${DEFS} ${INCL}
     21  1.10.4.2  nathanw CFLAGS+=	-fomit-frame-pointer -Wall -fno-function-cse -fstrength-reduce
     22  1.10.4.2  nathanw .if ${OBJECT_FMT} == "ELF"
     23  1.10.4.2  nathanw LDFLAGS=	-static -nostdlib -Wl,-x,-N,-e,bootxx,-Ttext,${LOADADDR}
     24  1.10.4.2  nathanw .else
     25  1.10.4.2  nathanw LDFLAGS=	-static -nostdlib -Wl,-N,-Ttext,${LOADADDR}
     26  1.10.4.2  nathanw .endif
     27  1.10.4.2  nathanw 
     28  1.10.4.2  nathanw # logically src/sys
     29  1.10.4.2  nathanw S=${.CURDIR}/../../../..
     30  1.10.4.2  nathanw S_SA=${S}/lib/libsa
     31  1.10.4.2  nathanw S_KERN=${S}/lib/libkern
     32  1.10.4.2  nathanw S_MACHSA=${S}/arch/atari/stand/libsa
     33  1.10.4.2  nathanw S_LIBTOS=${S}/arch/atari/stand/tostools/libtos
     34  1.10.4.2  nathanw 
     35  1.10.4.2  nathanw .if exists(${S_MACHSA}/libsa.a)
     36  1.10.4.2  nathanw LIBSA=${S_MACHSA}/libsa.a
     37  1.10.4.2  nathanw .else
     38  1.10.4.2  nathanw .	if exists(${S_MACHSA}/obj/libsa.a)
     39  1.10.4.2  nathanw LIBSA=${S_MACHSA}/obj/libsa.a
     40  1.10.4.2  nathanw .	else
     41  1.10.4.2  nathanw LIBSA=${S_MACHSA}/obj.${MACHINE}/libsa.a
     42  1.10.4.2  nathanw .	endif
     43  1.10.4.2  nathanw .endif
     44  1.10.4.2  nathanw 
     45  1.10.4.2  nathanw DPADD=	${LIBSA}
     46  1.10.4.2  nathanw LDADD=	${LIBSA}
     47  1.10.4.2  nathanw 
     48  1.10.4.2  nathanw beforeinstall:
     49  1.10.4.2  nathanw 	@len=`size ${PROG} | awk 'NR==2 { print $$1+$$2 }'`;	\
     50  1.10.4.2  nathanw 	 if [ $$len -gt 6656 ]; then				\
     51  1.10.4.2  nathanw 		size ${PROG};					\
     52  1.10.4.2  nathanw 		false;						\
     53  1.10.4.2  nathanw 	 fi;							\
     54  1.10.4.2  nathanw 	${OBJCOPY} -O binary ${PROG} ${PROG}XX
     55  1.10.4.2  nathanw 	@cat ${PROG}XX /dev/zero | dd of=${PROG}X		\
     56  1.10.4.2  nathanw 			bs=1 count=6656  2>/dev/null
     57  1.10.4.2  nathanw 	@mv -f ${PROG} ${PROG}XX
     58  1.10.4.2  nathanw 	@mv -f ${PROG}X ${PROG};
     59  1.10.4.2  nathanw 
     60  1.10.4.2  nathanw afterinstall:
     61  1.10.4.2  nathanw 	@mv -f ${PROG}XX ${PROG}
     62  1.10.4.2  nathanw 
     63  1.10.4.2  nathanw .s.o:
     64  1.10.4.2  nathanw 	${CPP} ${CPPFLAGS} ${.IMPSRC} | ${AS} ${ASFLAGS} -o ${.TARGET}
     65  1.10.4.2  nathanw 
     66  1.10.4.2  nathanw .c.o:
     67  1.10.4.2  nathanw 	${CC} ${CFLAGS} ${CPPFLAGS} -c ${.IMPSRC} -o ${.TARGET}
     68  1.10.4.2  nathanw 
     69  1.10.4.2  nathanw ${PROG}:
     70  1.10.4.2  nathanw 	${CC} ${LDFLAGS} -o ${.TARGET} ${OBJS} ${LDADD}
     71  1.10.4.2  nathanw 
     72  1.10.4.2  nathanw ${PROG}: ../xxboot/LOADADDR
     73  1.10.4.2  nathanw 
     74  1.10.4.2  nathanw .PATH: ${S_LIBTOS}
     75  1.10.4.2  nathanw 
     76  1.10.4.2  nathanw .include "../xxboot/LOADADDR"
     77  1.10.4.2  nathanw .include <bsd.prog.mk>
     78