xref: /minix3/sys/arch/i386/stand/lib/Makefile (revision 0a6a1f1d05b60e214de2f05a7310ddd1f0e590e7)
1#	$NetBSD: Makefile,v 1.43 2015/09/07 03:44:19 uebayasi 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
14.if defined(__MINIX)
15# LSC: Our old clang still doesn't support this
16AFLAGS.biosdelay.S= ${${ACTIVE_CC} == "clang":?-no-integrated-as:}
17AFLAGS.biosgetrtc.S= ${${ACTIVE_CC} == "clang":?-no-integrated-as:}
18AFLAGS.biosgetsystime.S= ${${ACTIVE_CC} == "clang":?-no-integrated-as:}
19AFLAGS.biosmca.S= ${${ACTIVE_CC} == "clang":?-no-integrated-as:}
20AFLAGS.biosmemps2.S= ${${ACTIVE_CC} == "clang":?-no-integrated-as:}
21AFLAGS.biosmem.S= ${${ACTIVE_CC} == "clang":?-no-integrated-as:}
22AFLAGS.biosmemx.S= ${${ACTIVE_CC} == "clang":?-no-integrated-as:}
23AFLAGS.biosreboot.S= ${${ACTIVE_CC} == "clang":?-no-integrated-as:}
24AFLAGS.biosvbe.S= ${${ACTIVE_CC} == "clang":?-no-integrated-as:}
25AFLAGS.biosvideomode.S= ${${ACTIVE_CC} == "clang":?-no-integrated-as:}
26AFLAGS.bios_disk.S= ${${ACTIVE_CC} == "clang":?-no-integrated-as:}
27AFLAGS.bios_pci.S= ${${ACTIVE_CC} == "clang":?-no-integrated-as:}
28AFLAGS.comio.S= ${${ACTIVE_CC} == "clang":?-no-integrated-as:}
29AFLAGS.conio.S= ${${ACTIVE_CC} == "clang":?-no-integrated-as:}
30AFLAGS.dos_file.S= ${${ACTIVE_CC} == "clang":?-no-integrated-as:}
31AFLAGS.dump_eax.S= ${${ACTIVE_CC} == "clang":?-no-integrated-as:}
32AFLAGS.message.S= ${${ACTIVE_CC} == "clang":?-no-integrated-as:}
33AFLAGS.message32.S= ${${ACTIVE_CC} == "clang":?-no-integrated-as:}
34AFLAGS.pvcopy.S= ${${ACTIVE_CC} == "clang":?-no-integrated-as:}
35AFLAGS.putstr.S= ${${ACTIVE_CC} == "clang":?-no-integrated-as:}
36AFLAGS.putstr32.S= ${${ACTIVE_CC} == "clang":?-no-integrated-as:}
37.endif # defined(__MINIX)
38AFLAGS.realprot.S= ${${ACTIVE_CC} == "clang":?-no-integrated-as:}
39
40CPPFLAGS= -I$S/lib/libsa ${I386CPPFLAGS} ${I386MISCCPPFLAGS}
41#CPPFLAGS+= -DDISK_DEBUG
42#CPPFLAGS+= -DNO_DISKLABEL
43#CPPFLAGS+= -DNO_GPT
44#CPPFLAGS+= -DSAVE_MEMORY
45
46SRCS= pcio.c conio.S comio.S comio_direct.c biosvideomode.S
47SRCS+= getsecs.c biosgetrtc.S biosdelay.S biosreboot.S gatea20.c
48SRCS+= biosmem.S getextmemx.c biosmemx.S printmemlist.c
49SRCS+= pread.c menuutils.c parseutils.c
50SRCS+= bootinfo.c bootinfo_biosgeom.c bootinfo_memmap.c
51SRCS+= startprog.S multiboot.S
52SRCS+= biosgetsystime.S cpufunc.S bootmenu.c
53SRCS+= realprot.S message.S message32.S dump_eax.S pvcopy.S putstr.S putstr32.S
54SRCS+= rasops.c vbe.c biosvbe.S
55.if (${I386_INCLUDE_DISK} == "yes")
56SRCS+= biosdisk.c biosdisk_ll.c bios_disk.S
57.endif
58.if (${I386_INCLUDE_DOS} == "yes")
59SRCS+= dosfile.c dos_file.S
60.endif
61.if (${I386_INCLUDE_DISK} == "yes") || (${I386_INCLUDE_DOS} == "yes")
62SRCS+= diskbuf.c
63.endif
64.if (${I386_INCLUDE_BUS} == "yes")
65SRCS+= biospci.c bios_pci.S isapnp.c isadma.c
66.endif
67.if (${I386_INCLUDE_PS2} == "yes")
68SRCS+= biosmca.S biosmemps2.S
69.endif
70
71.include <bsd.own.mk>
72.undef DESTDIR
73.include <bsd.lib.mk>
74
75lib${LIB}.o:: ${OBJS:O}
76	@echo building standard ${LIB} library
77	@rm -f lib${LIB}.o
78	@${LD} -r -o lib${LIB}.o `lorder ${OBJS} | tsort`
79	@echo done
80
81# XXX
82.if ${ACTIVE_CC} == "gcc" && ${HAVE_GCC:U} == 48
83COPTS.biosdisk_ll.c+=	-O0
84.endif
85