Home | History | Annotate | Line # | Download | only in boot
Makefile revision 1.5
      1 #	$NetBSD: Makefile,v 1.5 1995/11/23 02:39:20 cgd Exp $
      2 
      3 .PATH: ${.CURDIR}/.. ${.CURDIR}/../../../../lib/libsa
      4 
      5 BOOT_PROG = boot
      6 BOOT_RELOC = ${SECONDARY_LOAD_ADDRESS}
      7 
      8 BOOT_SRCS = start.S boot.c disk.c conf.c prom.c prom_disp.S OSFpal.c
      9 BOOT_SRCS+= alloc.c bzero.c close.c dev.c devopen.c disklabel.c
     10 BOOT_SRCS+= getfile.c gets.c ioctl.c lseek.c open.c printf.c read.c
     11 BOOT_SRCS+= strcmp.c ufs.c write.c bcopy.c filesystem.c strlen.c
     12 BOOT_SRCS+= ntohl.c prom_swpal.S
     13 BOOT_OBJS = ${BOOT_SRCS:N*.h:R:S/$/.o/g}
     14 
     15 HEADERSIZE_PROG = headersize
     16 
     17 AFLAGS += -DASSEMBLER
     18 CPPFLAGS += -I${.CURDIR}/../.. -I${.CURDIR}/../../../..
     19 CFLAGS = -Werror -mno-fp-regs -g -DCOMPAT_UFS
     20 
     21 CLEANFILES+= vers.c vers.o
     22 
     23 .PATH: ${.CURDIR}/../../../../lib/libkern
     24 
     25 all: ${BOOT_PROG}
     26 
     27 ${BOOT_PROG}: ${BOOT_OBJS} ${HEADERSIZE_PROG}
     28 	sh ${.CURDIR}/newvers.sh ${.CURDIR}/version
     29 	${COMPILE.c} vers.c
     30 	${LD} -Ttext ${BOOT_RELOC} -N -e start -o ${BOOT_PROG}.coff \
     31 	     ${BOOT_OBJS} vers.o -lc # XXX
     32 	size ${BOOT_PROG}.coff
     33 	strip ${BOOT_PROG}.coff
     34 	dd if=${BOOT_PROG}.coff of=${BOOT_PROG} \
     35 	    bs=`./${HEADERSIZE_PROG} < ${BOOT_PROG}.coff` skip=1
     36 
     37 install:
     38 	install -c -o bin -g bin -m 444 ${BOOT_PROG} \
     39 	    ${DESTDIR}${BINDIR}/${BOOT_PROG}
     40 
     41 clean: _SUBDIRUSE
     42 	rm -f a.out [Ee]rrs mklog core *.core \
     43 	    ${BOOT_PROG} ${BOOT_OBJS} ${CLEANFILES} \
     44 	    ${BOOT_PROG}.coff ${HEADERSIZE_PROG}
     45 
     46 cleandir: _SUBDIRUSE clean
     47 
     48 .include "${.CURDIR}/../Makefile.inc"
     49 .include <bsd.obj.mk>
     50 .include <bsd.dep.mk>
     51 .include <bsd.subdir.mk>
     52