1 # $NetBSD: Makefile,v 1.40 2014/04/08 15:34:18 christos Exp $ 2 3 S?= ${.CURDIR}/../../../.. 4 5 LIB= i386 6 NOPIC=# defined 7 NOPROFILE=# defined 8 9 I386_INCLUDE_DISK?= yes 10 I386_INCLUDE_DOS?= no 11 I386_INCLUDE_BUS?= no 12 I386_INCLUDE_PS2?= yes 13 14 AFLAGS.realprot.S= ${${ACTIVE_CC} == "clang":?-no-integrated-as:} 15 16 CPPFLAGS= -I$S/lib/libsa ${I386CPPFLAGS} ${I386MISCCPPFLAGS} 17 #CPPFLAGS+= -DDISK_DEBUG 18 #CPPFLAGS+= -DNO_DISKLABEL 19 #CPPFLAGS+= -DNO_GPT 20 #CPPFLAGS+= -DSAVE_MEMORY 21 22 SRCS= pcio.c conio.S comio.S comio_direct.c biosvideomode.S 23 SRCS+= getsecs.c biosgetrtc.S biosdelay.S biosreboot.S gatea20.c 24 SRCS+= biosmem.S getextmemx.c biosmemx.S printmemlist.c 25 SRCS+= pread.c menuutils.c parseutils.c 26 SRCS+= bootinfo.c bootinfo_biosgeom.c bootinfo_memmap.c 27 SRCS+= startprog.S multiboot.S 28 SRCS+= biosgetsystime.S cpufunc.S bootmenu.c 29 SRCS+= realprot.S message.S message32.S dump_eax.S pvcopy.S putstr.S putstr32.S 30 SRCS+= rasops.c vbe.c biosvbe.S 31 .if (${I386_INCLUDE_DISK} == "yes") 32 SRCS+= biosdisk.c biosdisk_ll.c bios_disk.S 33 .endif 34 .if (${I386_INCLUDE_DOS} == "yes") 35 SRCS+= dosfile.c dos_file.S 36 .endif 37 .if (${I386_INCLUDE_DISK} == "yes") || (${I386_INCLUDE_DOS} == "yes") 38 SRCS+= diskbuf.c 39 .endif 40 .if (${I386_INCLUDE_BUS} == "yes") 41 SRCS+= biospci.c bios_pci.S isapnp.c isadma.c 42 .endif 43 .if (${I386_INCLUDE_PS2} == "yes") 44 SRCS+= biosmca.S biosmemps2.S 45 .endif 46 47 .include <bsd.own.mk> 48 .undef DESTDIR 49 .include <bsd.lib.mk> 50 51 lib${LIB}.o:: ${OBJS} 52 @echo building standard ${LIB} library 53 @rm -f lib${LIB}.o 54 @${LD} -r -o lib${LIB}.o `lorder ${OBJS} | tsort` 55 56 # XXX 57 .if ${HAVE_GCC:U} == 45 58 COPTS.biosdisk.c+= -fno-strict-aliasing 59 .endif 60 .if ${ACTIVE_CC} == "gcc" && ${HAVE_GCC:U} == 48 61 COPTS.biosdisk_ll.c+= -O0 62 .endif 63