xref: /netbsd-src/sys/arch/i386/stand/lib/Makefile (revision 9fc37c689f56d5ee7d1822b666cda6a7fb41815e)
1#	$NetBSD: Makefile,v 1.53 2024/07/01 01:29:59 rin Exp $
2
3S?=	${.CURDIR}/../../../..
4
5LIB= i386
6NOPIC=# defined
7NOPROFILE=# defined
8
9I386_INCLUDE_DISK?= yes
10I386_INCLUDE_PS2?= yes
11
12AFLAGS.realprot.S= ${${ACTIVE_CC} == "clang":?-no-integrated-as:}
13
14CPPFLAGS= -I$S/lib/libsa ${I386CPPFLAGS} ${I386MISCCPPFLAGS}
15#CPPFLAGS+= -DDISK_DEBUG
16#CPPFLAGS+= -DNO_DISKLABEL
17#CPPFLAGS+= -DNO_GPT
18#CPPFLAGS+= -DNO_RAIDFRAME
19#CPPFLAGS+= -DNO_MULTIBOOT2
20#CPPFLAGS+= -DSAVE_MEMORY
21
22SRCS= pcio.c conio.S comio.S comio_direct.c biosvideomode.S
23SRCS+= getsecs.c biosgetrtc.S biosdelay.S biosreboot.S gatea20.c
24SRCS+= biosmem.S getextmemx.c biosmemx.S
25SRCS+= pread.c menuutils.c parseutils.c
26SRCS+= bootinfo.c bootinfo_biosgeom.c bootinfo_memmap.c
27SRCS+= startprog.S multiboot.S
28SRCS+= biosgetsystime.S cpufunc.S bootmenu.c
29SRCS+= realprot.S message.S message32.S dump_eax.S pvcopy.S putstr.S putstr32.S
30SRCS+= rasops.c vbe.c biosvbe.S
31.if (${I386_INCLUDE_DISK} == "yes")
32SRCS+= biosdisk.c biosdisk_ll.c bios_disk.S diskbuf.c
33CWARNFLAGS.gcc+=	${CC_WNO_ADDRESS_OF_PACKED_MEMBER}
34.endif
35.if (${I386_INCLUDE_PS2} == "yes")
36SRCS+= biosmca.S biosmemps2.S
37.endif
38
39.include <bsd.own.mk>
40.undef DESTDIR
41.include <bsd.lib.mk>
42
43lib${LIB}.o:: ${OBJS:O}
44	@echo building standard ${LIB} library
45	@rm -f lib${LIB}.o
46	@${LD} -r -o lib${LIB}.o `lorder ${OBJS} | tsort`
47