Makefile revision 1.10.4.3 1 1.10.4.3 nathanw # $NetBSD: Makefile,v 1.10.4.3 2002/04/17 00:02:42 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.3 nathanw CFLAGS+= -Wall -Wno-uninitialized
22 1.10.4.3 nathanw CFLAGS+= -fomit-frame-pointer -fno-function-cse -fstrength-reduce
23 1.10.4.2 nathanw .if ${OBJECT_FMT} == "ELF"
24 1.10.4.2 nathanw LDFLAGS= -static -nostdlib -Wl,-x,-N,-e,bootxx,-Ttext,${LOADADDR}
25 1.10.4.2 nathanw .else
26 1.10.4.2 nathanw LDFLAGS= -static -nostdlib -Wl,-N,-Ttext,${LOADADDR}
27 1.10.4.2 nathanw .endif
28 1.10.4.2 nathanw
29 1.10.4.2 nathanw # logically src/sys
30 1.10.4.2 nathanw S=${.CURDIR}/../../../..
31 1.10.4.2 nathanw S_SA=${S}/lib/libsa
32 1.10.4.2 nathanw S_KERN=${S}/lib/libkern
33 1.10.4.2 nathanw S_MACHSA=${S}/arch/atari/stand/libsa
34 1.10.4.2 nathanw S_LIBTOS=${S}/arch/atari/stand/tostools/libtos
35 1.10.4.2 nathanw
36 1.10.4.3 nathanw S_MACHSAOBJ!= cd ${S_MACHSA} && ${PRINTOBJDIR}
37 1.10.4.3 nathanw
38 1.10.4.3 nathanw LIBSA=${S_MACHSAOBJ}/libsa.a
39 1.10.4.2 nathanw
40 1.10.4.2 nathanw DPADD= ${LIBSA}
41 1.10.4.2 nathanw LDADD= ${LIBSA}
42 1.10.4.2 nathanw
43 1.10.4.2 nathanw beforeinstall:
44 1.10.4.2 nathanw @len=`size ${PROG} | awk 'NR==2 { print $$1+$$2 }'`; \
45 1.10.4.2 nathanw if [ $$len -gt 6656 ]; then \
46 1.10.4.2 nathanw size ${PROG}; \
47 1.10.4.2 nathanw false; \
48 1.10.4.2 nathanw fi; \
49 1.10.4.2 nathanw ${OBJCOPY} -O binary ${PROG} ${PROG}XX
50 1.10.4.2 nathanw @cat ${PROG}XX /dev/zero | dd of=${PROG}X \
51 1.10.4.2 nathanw bs=1 count=6656 2>/dev/null
52 1.10.4.2 nathanw @mv -f ${PROG} ${PROG}XX
53 1.10.4.2 nathanw @mv -f ${PROG}X ${PROG};
54 1.10.4.2 nathanw
55 1.10.4.2 nathanw afterinstall:
56 1.10.4.2 nathanw @mv -f ${PROG}XX ${PROG}
57 1.10.4.2 nathanw
58 1.10.4.2 nathanw .s.o:
59 1.10.4.2 nathanw ${CPP} ${CPPFLAGS} ${.IMPSRC} | ${AS} ${ASFLAGS} -o ${.TARGET}
60 1.10.4.2 nathanw
61 1.10.4.2 nathanw .c.o:
62 1.10.4.2 nathanw ${CC} ${CFLAGS} ${CPPFLAGS} -c ${.IMPSRC} -o ${.TARGET}
63 1.10.4.2 nathanw
64 1.10.4.2 nathanw ${PROG}:
65 1.10.4.2 nathanw ${CC} ${LDFLAGS} -o ${.TARGET} ${OBJS} ${LDADD}
66 1.10.4.2 nathanw
67 1.10.4.2 nathanw ${PROG}: ../xxboot/LOADADDR
68 1.10.4.2 nathanw
69 1.10.4.2 nathanw .PATH: ${S_LIBTOS}
70 1.10.4.2 nathanw
71 1.10.4.2 nathanw .include "../xxboot/LOADADDR"
72 1.10.4.2 nathanw .include <bsd.prog.mk>
73