[BACK]Return to Makefile CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / src / sys / arch / amiga / stand / bootblock / boot

Annotation of src/sys/arch/amiga/stand/bootblock/boot/Makefile, Revision 1.38.76.1

1.38.76.1! yamt        1: #      $NetBSD: Makefile,v 1.38 2006/01/25 13:23:50 is Exp $
1.34      lukem       2:
                      3: .include <bsd.sys.mk>          # for HOST_SH
1.1       is          4:
1.2       is          5: ### what we need:
1.1       is          6:
1.38      is          7: #XX# lines replace similar lines, or are added, in case we want to
                      8: #XX# compile LIBZ ourselves to save a few bytes (think TXLT)
                      9:
                     10: #XX#DIR_LIBZ = ${DIR_TOP}/../common/dist/zlib
                     11:
1.10      is         12: DIR_TOP=       ${.CURDIR}/../../../../..
                     13: DIR_SA =       ${DIR_TOP}/lib/libsa
1.38      is         14: DIR_LIBZ=
1.10      is         15: DIR_KERN=      ${DIR_TOP}/lib/libkern
                     16: DIR_KERN_MD=   ${DIR_TOP}/lib/libkern/arch/$(MACHINE_ARCH)
1.36      is         17: DIR_LIBC=      ${DIR_TOP}/../common/lib/libc
1.1       is         18:
1.36      is         19: .PATH:  $(DIR_SA) ${DIR_LIBZ} $(DIR_KERN) $(DIR_KERN_MD) \
                     20:        ${DIR_LIBC}/gen ${DIR_LIBC}/arch/m68k/gen \
                     21:        ${DIR_LIBC}/inet ${DIR_LIBC}/arch/m68k/inet \
                     22:        ${DIR_LIBC}/quad ${DIR_LIBC}/arch/m68k/quad \
                     23:        ${DIR_LIBC}/string ${DIR_LIBC}/arch/m68k/string
1.1       is         24:
1.38      is         25: ### find out what to use for libz
                     26:
                     27: S=     ${DIR_TOP}      # ????
                     28: Z_AS= library
                     29: .include "${DIR_TOP}/lib/libz/Makefile.inc"
                     30: LIBZ= ${ZLIB}
                     31:
1.2       is         32: # prefer our assembler versions over assembler, and assembler over C:
1.1       is         33:
1.2       is         34: .SUFFIXES:
                     35: .SUFFIXES: .out .o .po .so .s .S .c .cc .C .f .y .l .ln .m4 .sh
1.1       is         36:
1.24      mhitch     37: FILES= boot.amiga
1.13      veego      38: BINDIR=/usr/mdec
1.1       is         39:
1.15      is         40: COBJS = main.o console.o xd.o twiddle.o bzero.o gets.o
1.19      is         41: COBJS+=  lseek.o open.o read.o close.o dev.o errno.o
1.27      mhitch     42: COBJS+=  ufs.o ustarfs.o panic.o vers.o files.o
1.37      is         43: COBJS+=  divdi3.o moddi3.o qdivrem.o
1.1       is         44:
1.23      mhitch     45: SOBJS = alloc.o ashrdi3.o ashldi3.o bcopy.o muldi3.o printf.o startit.o
1.38      is         46: SOBJS += strlen.o memcmp.o memset.o strerror.o strncmp.o
                     47: SOBJS += libstubs.o
1.37      is         48:
1.2       is         49: OBJS=  $(SOBJS) $(COBJS)
1.1       is         50:
1.38      is         51: #XX#DEFS = -D_STANDALONE -DINSECURE -DDYNAMIC_CRC_TABLE -DNOBYFOUR -UBYFOUR
                     52: DEFS = -D_STANDALONE -DINSECURE
1.24      mhitch     53: DEFS += -D__INTERNAL_LIBSA_CREAD
                     54: SOBJS += cread.o
1.38      is         55:
                     56: #XX#SOBJS += adler32.o crc32.o inflate.o trees.o \
                     57: #XX#       zutil.o infback.o inftrees.o inffast.o
                     58:
1.25      aymeric    59: #DEFS += -DBOOT_ELF32 -DBOOT_AOUT
1.24      mhitch     60: SOBJS += loadfile.o loadfile_aout.o loadfile_elf32.o
                     61:
1.34      lukem      62: NETBSD_VERS!=  ${HOST_SH} ${.CURDIR}/../../../../../conf/osrelease.sh
1.24      mhitch     63: DEFS+= -DNETBSD_VERS='"${NETBSD_VERS}"'
1.1       is         64:
1.2       is         65: ### main target: ###
1.1       is         66:
1.24      mhitch     67: realall: machine m68k ${FILES}
                     68:
                     69: CLEANFILES += boot.amiga x.out xxstart.o libboot.a vers.c machine m68k
1.1       is         70:
1.18      tron       71: .include <bsd.prog.mk>
                     72:
1.2       is         73: ### special  rules for bootblocks ###
1.1       is         74:
1.38.76.1! yamt       75: INCPATH = -nostdinc -I${DIR_TOP} -I${DIR_TOP}/lib/libsa
        !            76: INCPATH += -I${DIR_TOP}/../common/dist/zlib
        !            77: INCPATH += -I${.CURDIR}
1.24      mhitch     78: INCPATH += -I${.CURDIR}/../../.. -I${.OBJDIR}
1.38.76.1! yamt       79: INCPATH += -I${.CURDIR}/../aout2bb
1.10      is         80:
1.2       is         81: AFLAGS += -m68030 -l
1.10      is         82: CAFLAGS += -Wa,-l -Wa,-m68030 ${INCPATH}
1.1       is         83:
1.33      mhitch     84: COPTIM= -Os -fomit-frame-pointer -fcse-follow-jumps -fcse-skip-blocks  -Wa,-l -m68060 -Wa,-m68030
1.38.76.1! yamt       85: CFLAGS= -ffreestanding ${COPTIM} ${INCPATH} ${DEFS}
        !            86: CFLAGS+= -Werror
        !            87: CFLAGS+= -Wall -Wmissing-prototypes -Wstrict-prototypes -Wpointer-arith
1.1       is         88:
1.2       is         89: .c.o:
1.18      tron       90:        ${CC} ${CFLAGS} -S $< -o $*.s
                     91:        ${TXLT} < $*.s | ${AS} ${AFLAGS} -o $*.o
1.2       is         92:        rm $*.s
1.1       is         93:
1.18      tron       94: .s.o: ; ${CC} ${CAFLAGS} ${COPTS} -x assembler-with-cpp -o $@ -c $<
1.1       is         95:
1.18      tron       96: .S.o: ; ${CC} ${CAFLAGS} ${COPTS} -x assembler-with-cpp -o $@ -c $<
1.1       is         97:
1.24      mhitch     98: boot.amiga: x.out
1.27      mhitch     99:        ${RELOC2BB} -S x.out $@ || ${NM} -u x.out
1.2       is        100:
1.38      is        101: x.out: xxstart.o libboot.a ${LIBZ}
1.18      tron      102:        ${LD} ${LDFLAGS} -r -dc -e _start -o $@ $>
1.22      mhitch    103:        ${SIZE} $@
                    104:        ${NM} -u $@
1.2       is        105:
                    106: xxstart.o: ${.CURDIR}/bbstart.s
1.18      tron      107:        ${CC} ${CAFLAGS} ${COPTS} -x assembler-with-cpp \
1.2       is        108:                -o $@ -c $>
                    109:
1.18      tron      110: libboot.a: ${OBJS}
                    111:        ${AR} r $@ $> && ${RANLIB} $@
1.2       is        112:
1.24      mhitch    113: .PHONY:        vers.c
                    114: vers.c:        ${.CURDIR}/version
1.34      lukem     115:        ${HOST_SH} ${DIR_TOP}/conf/newvers_stand.sh -N ${.CURDIR}/version "amiga"
1.24      mhitch    116:
1.38.76.1! yamt      117: .if !make(obj) && !make(clean) && !make(cleandir)
        !           118: .NOPATH: machine m68k
        !           119: .BEGIN: machine m68k
        !           120:
1.24      mhitch    121: machine:
                    122:        -rm -f $@
                    123:        ln -s ${DIR_TOP}/arch/amiga/include $@
                    124:
                    125: m68k:
                    126:        -rm -f $@
                    127:        ln -s ${DIR_TOP}/arch/m68k/include $@
1.38.76.1! yamt      128: .endif
1.24      mhitch    129:
1.10      is        130: # make sure these are built:
1.2       is        131:
1.10      is        132: ${COBJS}: ${TXLT}
1.24      mhitch    133: ${FILES}: ${RELOC2BB}
1.26      aymeric   134:
                    135: .include "${.CURDIR}/../Makefile.booters"

CVSweb <webmaster@jp.NetBSD.org>