Makefile 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. # $OpenBSD: Makefile,v 1.6 2014/02/23 20:01:04 miod Exp $
  2. # $NetBSD: Makefile,v 1.9 2013/01/22 15:48:40 tsutsui Exp $
  3. # @(#)Makefile 8.2 (Berkeley) 8/15/93
  4. NOMAN= # defined
  5. S= ${.CURDIR}/../../../..
  6. CPPFLAGS+= -nostdinc -D_STANDALONE
  7. CPPFLAGS+= -I${.CURDIR} -I${.OBJDIR} -I${S} -I${S}/arch
  8. CPPFLAGS+= -DSUPPORT_DISK
  9. CPPFLAGS+= -DSUPPORT_ETHERNET
  10. CPPFLAGS+= -DSUPPORT_BOOTP
  11. #CPPFLAGS+= -DBOOTP_DEBUG -DNETIF_DEBUG -DETHER_DEBUG -DNFS_DEBUG
  12. #CPPFLAGS+= -DRPC_DEBUG -DRARP_DEBUG -DNET_DEBUG -DDEBUG -DPARANOID
  13. OBJCOPY?= objcopy
  14. TEXTADDR= 0x700000 # 7MB
  15. LDSCRIPT= ${.CURDIR}/boot.ldscript
  16. LINKFORMAT= -static -N -Ttext ${TEXTADDR} -T ${LDSCRIPT} \
  17. --warn-common -nopie
  18. SRCS= locore.S
  19. SRCS+= init_main.c
  20. SRCS+= fault.c setjmp.S
  21. SRCS+= bcd.c
  22. SRCS+= devopen.c
  23. SRCS+= conf.c
  24. SRCS+= getline.c parse.c
  25. SRCS+= boot.c
  26. SRCS+= cons.c prf.c awaitkey.c
  27. SRCS+= sio.c
  28. SRCS+= bmc.c bmd.c font.c kbd.c
  29. SRCS+= sc.c sd.c
  30. SRCS+= ufs_disksubr.c
  31. # netboot support
  32. SRCS+= if_le.c lance.c getsecs.c
  33. SRCS+= dev_net.c
  34. PROG= boot
  35. ### find out what to use for libkern
  36. .PATH: ${S}/lib/libkern
  37. SRCS+= memcpy.c strlcat.c strlcpy.c strlen.c
  38. SRCS+= muldi3.c negdi2.c ashrdi3.c
  39. ### find out what to use for libsa
  40. .PATH: ${S}/lib/libsa
  41. SRCS+= strtol.c
  42. SAREL=
  43. SADST= .
  44. USE_LOADFILE= yes
  45. .include "${S}/lib/libsa/Makefile.inc"
  46. LIBS= ${SALIB} ${ZLIB} ${KERNLIB}
  47. ${PROG}: ${LDSCRIPT} ${OBJS} ${LIBS}
  48. ${LD} ${LINKFORMAT} -x -o ${PROG}.elf ${OBJS} ${LIBS}
  49. ${OBJCOPY} -S -O a.out-m88k-openbsd --impure ${PROG}.elf ${PROG}
  50. install: ${PROG}
  51. install -m 555 -g bin -o bin ${PROG} ${DESTDIR}${MDEC_DIR}
  52. CLEANFILES+= ${PROG}.elf
  53. .BEGIN:
  54. @([ -h machine ] || ln -s ${.CURDIR}/../../include machine)
  55. @([ -h m88k ] || ln -s ${.CURDIR}/../../../m88k/include m88k)
  56. .include <bsd.prog.mk>