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