summaryrefslogtreecommitdiff
path: root/i386
diff options
context:
space:
mode:
authorThomas Schwinge <tschwinge@gnu.org>2006-10-15 14:49:03 +0000
committerThomas Schwinge <tschwinge@gnu.org>2009-06-18 00:26:46 +0200
commit0adf9500edf4772052501d9c061d6a0abde5fd8e (patch)
tree9b3563c454875336e6be54886784e58db394b7c1 /i386
parent323e17604a4df5eb3548c99aa9603e0a0e0b1e1d (diff)
2006-10-15 Thomas Schwinge <tschwinge@gnu.org>
[task #5956 --- ``Automake'ify GNU Mach's code base''] * Makefile.am: New file. * Makerules.am <configure's findings, System dependent Makerules> <Compilation flags, Dependency generation, Autoconf support>: Remove sections. <Building from foo.cli, Building from foo.srv>: Rewrite: (%.server.defs.c, %.user.defs.c, %.server.h %.server.c) (%.user.h %.user.c, %.server.defs, %.user.defs): New targets. (%.h %_user.c %.cli.d, %_interface.h %_server.c %.srv.d): Remove targets. (echo-%): New target. * Makefrag.am <configure's findings, Rules, Kernel Image, Installation> <Building the distribution, Autoconf support, Makerules>: Remove sections. (enable_kdb, enable_kmsg): Adopt. <All the source in each directory> <Header files installed for user use>: Rewrite to adopt to how things are to be done now. <Automatically generated source files>: New section. (i386/Makefrag.am): Include file if appropriate. * i386/Makefrag.am <configure's findings, Rules, Installation> <Autoconf support, Makerules>: Remove sections. (enable_lpr): Adopt. <Source files for any i386 kernel>: Rewrite to adopt to how things are to be done now. * i386/linux/Makefrag.am: New file. * linux/Makefrag.am: Likewise.
Diffstat (limited to 'i386')
-rw-r--r--i386/Makefrag.am303
-rw-r--r--i386/linux/Makefrag.am24
2 files changed, 136 insertions, 191 deletions
diff --git a/i386/Makefrag.am b/i386/Makefrag.am
index dc5c661..1ba5eb8 100644
--- a/i386/Makefrag.am
+++ b/i386/Makefrag.am
@@ -1,62 +1,7 @@
-# Makefile for i386
-# Copyright 1999, 2006 Free Software Foundation, Inc.
-#
-# Permission to use, copy, modify and distribute this software and its
-# documentation is hereby granted, provided that both the copyright
-# notice and this permission notice appear in all copies of the
-# software, derivative works or modified versions, and any portions
-# thereof, and that both notices appear in supporting documentation.
-#
-# THE FREE SOFTWARE FOUNDATION ALLOWS FREE USE OF THIS SOFTWARE IN ITS
-# "AS IS" CONDITION. THE FREE SOFTWARE FOUNDATION DISCLAIMS ANY
-# LIABILITY OF ANY KIND FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE
-# USE OF THIS SOFTWARE.
-
-
-#
-# configure's findings.
-#
-
-srcdir = @srcdir@
-
-prefix = @prefix@
-exec_prefix = @exec_prefix@
-bindir = @bindir@
-bootdir = $(exec_prefix)/boot
-datadir = @datadir@
-includedir = @includedir@
-infodir = @infodir@
-libdir = @libdir@
-libexecdir = @libexecdir@
-localstatedir = @localstatedir@
-mandir = @mandir@
-oldincludedir = @oldincludedir@
-sbindir = @sbindir@
-sharedstatedir = @sharedstatedir@
-sysconfdir = @sysconfdir@
+# Makefile fragment for i386
-top_srcdir = @srcdir@/..
-top_builddir = ../
+# Copyright 1997, 1999, 2006 Free Software Foundation, Inc.
-
-#
-# Default target
-#
-
-all:
-
-
-# Detect if the user wants LPR
-ifeq ($(findstring -DMACH_LPR,@DEFS@),-DMACH_LPR)
-enable_lpr=yes
-else
-enable_lpr=no
-endif
-
-
-# i386 Mach makefile fragment
-# Copyright 1997, 1999 Free Software Foundation, Inc.
-#
# Permission to use, copy, modify and distribute this software and its
# documentation is hereby granted, provided that both the copyright
# notice and this permission notice appear in all copies of the
@@ -67,151 +12,127 @@ endif
# "AS IS" CONDITION. THE FREE SOFTWARE FOUNDATION DISCLAIMS ANY
# LIABILITY OF ANY KIND FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE
# USE OF THIS SOFTWARE.
-
-
-# Source files for any i386 kernel
-i386at-files = autoconf.c conf.c cons_conf.c rtc.c \
- i386at_ds_routines.c immc.c int_init.c iopl.c kd.c kd_event.c \
- kd_mouse.c kd_queue.c model_dep.c pic_isa.c
-i386-files = ast_check.c db_disasm.c db_interface.c db_trace.c debug_i386.c \
- fpe_linkage.c fpu.c gdt.c hardclock.c idt.c io_emulate.c io_map.c \
- iopb.c ktss.c kttd_interface.c ldt.c loose_ends.c mp_desc.c pcb.c \
- phys.c pic.c pit.c seg.c trap.c user_ldt.c
-intel-files = pmap.c read_fault.c
-
-# Assembler source
-i386at-Sfiles = boothdr.S interrupt.S kdasm.S
-i386-Sfiles = cswitch.S debug_trace.S idt_inittab.S locore.S spl.S
-
-# Account for them in the image
-objfiles += $(subst .c,.o,$(i386at-files) $(i386-files) $(intel-files)) \
- $(subst .S,.o,$(i386at-Sfiles) $(i386-Sfiles))
-vpath %.c $(srcdir)/i386at $(srcdir)/i386 $(srcdir)/intel
-vpath %.S $(srcdir)/i386at $(srcdir)/i386
-
-# Files from the generic source that we want
-objfiles += busses.o cirbuf.o
-# Hm.
-vpath busses.c $(top_srcdir)/chips
-vpath cirbuf.c $(top_srcdir)/device
-
-# Mig-generated
-objfiles += mach_i386_server.o
-
-servers = $(filter %_server.o,$(objfiles))
-
-# This file is only needed for KDB support. It'll be discarded at linking time
-# if it's not needed.
-objfiles += _setjmp.o
-
-# XXX: In i386, com is always enabled.
-objfiles += com.o
-
-# This file is only needed for LPR support.
-ifeq ($(enable_lpr),yes)
-objfiles += lpr.o
-endif
-
+# Source files for any i386 kernel.
+libkernel_a_SOURCES += \
+ i386/i386at/autoconf.c \
+ i386/i386at/boothdr.S \
+ i386/i386at/com.c \
+ i386/i386at/conf.c \
+ i386/i386at/cons_conf.c \
+ i386/i386at/rtc.c \
+ i386/i386at/i386at_ds_routines.c \
+ i386/i386at/immc.c \
+ i386/i386at/int_init.c \
+ i386/i386at/interrupt.S \
+ i386/i386at/iopl.c \
+ i386/i386at/kd.c \
+ i386/i386at/kdasm.S \
+ i386/i386at/kd_event.c \
+ i386/i386at/kd_mouse.c \
+ i386/i386at/kd_queue.c \
+ i386/i386at/model_dep.c \
+ i386/i386at/pic_isa.c
+
+# lpr device support.
+if enable_lpr
+libkernel_a_SOURCES += \
+ i386/i386at/lpr.c
+endif
-# Where to find some things
-vpath i386asm.sym $(srcdir)/i386
-vpath mach_i386.srv $(srcdir)/i386
-
-# Our include files; they precede the generic ones.
-INCLUDES = -I. -I$(srcdir)/i386at -I$(srcdir)/i386 -I$(srcdir)/include \
- -I$(srcdir)/include/mach/sa -I$(srcdir)
-
-# Static dependencies.
-
-# For building with `no_deps=t'.
-boothdr.o: i386asm.h
-
-#
-# Rules.
-#
-
-all: sysdep.a
- $(MAKE) -C linux $@
-
-sysdep.a: $(objfiles) linux/linux.o
- rm -f $@
- $(AR) cr $@ $^
- $(RANLIB) $@
-
-check:
- $(MAKE) -C linux $@
-
-clean:
- $(MAKE) -C linux $@
- rm -f sysdep.a
- rm -f $(objfiles) $(subst .o,.d,$(objfiles))
- rm -f *.symc *.symc.o *_user.c *_server.c *.h *.cli.d *.srv.d
-
-distclean: clean
- $(MAKE) -C linux $@
- rm -f Makefile Makerules
- rm -f config.status config.log
-
-mostlyclean: distclean
- $(MAKE) -C linux $@
-
-maintainer-clean: mostlyclean
- $(MAKE) -C linux $@
- rm -f $(srcdir)/configure
-
-linux/%: FORCE
- $(MAKE) -C linux $(@F)
-FORCE:
+libkernel_a_SOURCES += \
+ i386/i386/ast_check.c \
+ i386/i386/cswitch.S \
+ i386/i386/db_disasm.c \
+ i386/i386/db_interface.c \
+ i386/i386/db_trace.c \
+ i386/i386/debug_i386.c \
+ i386/i386/debug_trace.S \
+ i386/i386/fpe_linkage.c \
+ i386/i386/fpu.c \
+ i386/i386/gdt.c \
+ i386/i386/hardclock.c \
+ i386/i386/idt.c \
+ i386/i386/idt_inittab.S \
+ i386/i386/io_emulate.c \
+ i386/i386/io_map.c \
+ i386/i386/iopb.c \
+ i386/i386/ktss.c \
+ i386/i386/kttd_interface.c \
+ i386/i386/ldt.c \
+ i386/i386/locore.S \
+ i386/i386/loose_ends.c \
+ i386/i386/mp_desc.c \
+ i386/i386/pcb.c \
+ i386/i386/phys.c \
+ i386/i386/pic.c \
+ i386/i386/pit.c \
+ i386/i386/seg.c \
+ i386/i386/spl.S \
+ i386/i386/trap.c \
+ i386/i386/user_ldt.c
+
+# This file is only needed for KDB support.
+if enable_kdb
+libkernel_a_SOURCES += \
+ i386/i386/_setjmp.S
+endif
+libkernel_a_SOURCES += \
+ i386/intel/pmap.c \
+ i386/intel/read_fault.c
+
+# Files from the generic sources that we want.
+libkernel_a_SOURCES += \
+ chips/busses.c \
+ device/cirbuf.c
+
+# See Makefrag.am about lib_dep_tr_for_defs.a.
+nodist_lib_dep_tr_for_defs_a_SOURCES += \
+ i386/i386/mach_i386.server.defs.c
+nodist_libkernel_a_SOURCES += \
+ i386/i386/mach_i386.server.h \
+ i386/i386/mach_i386.server.c
+# i386/i386/mach_i386.server.defs
#
-# Installation
+# Static dependencies.
#
-install:
- $(MAKE) -C linux $@
-
-installed-headers = $(addprefix mach/i386/, \
- asm.h boolean.h disk.h eflags.h exception.h fp_reg.h ioccom.h \
- kern_return.h mach_i386.defs mach_i386_types.h machine_types.defs \
- multiboot.h rpc.h syscall_sw.h thread_status.h trap.h vm_param.h \
- vm_types.h)
-
-installed-headers-names = $(addprefix $(includedir)/,$(installed-headers))
-$(installed-headers-names): $(includedir)/%: $(srcdir)/include/%
- $(INSTALL_DATA) $< $@
-
-install-headers: mkheaderdirs $(installed-headers-names)
- ln -sfn $(systype) $(includedir)/mach/machine
- $(MAKE) -C linux $@
-
-install-kernel:
- $(MAKE) -C linux $@
-
-mkheaderdirs:
- mkdir -p $(includedir)/mach/$(systype)
+# TODO. Hm.
+i386/i386at/boothdr.o: i386/i386/i386asm.h
+nodist_libkernel_a_SOURCES += \
+ i386/i386/i386asm.h
#
-# Autoconf support
+# Architecture specialities.
#
-$(srcdir)/configure: configure.in
- cd $(srcdir) && autoconf
-
-Makefile: Makefile.in config.status
- ./config.status $@
-
-config.status: configure
- ./config.status --recheck
-
-vpath %.in $(srcdir)
-vpath configure $(srcdir)
-
+LINKFLAGS_gnumach = \
+ -T '$(srcdir)/$(systype)'/ldscript
#
-# Makerules
-#
-
-include $(top_builddir)/Makerules
+# Installation.
+#
+
+include_mach_i386dir = $(includedir)/mach/i386
+include_mach_i386_HEADERS = \
+ i386/include/mach/i386/asm.h \
+ i386/include/mach/i386/boolean.h \
+ i386/include/mach/i386/disk.h \
+ i386/include/mach/i386/eflags.h \
+ i386/include/mach/i386/exception.h \
+ i386/include/mach/i386/fp_reg.h \
+ i386/include/mach/i386/ioccom.h \
+ i386/include/mach/i386/kern_return.h \
+ i386/include/mach/i386/mach_i386.defs \
+ i386/include/mach/i386/mach_i386_types.h \
+ i386/include/mach/i386/machine_types.defs \
+ i386/include/mach/i386/multiboot.h \
+ i386/include/mach/i386/rpc.h \
+ i386/include/mach/i386/syscall_sw.h \
+ i386/include/mach/i386/thread_status.h \
+ i386/include/mach/i386/trap.h \
+ i386/include/mach/i386/vm_param.h \
+ i386/include/mach/i386/vm_types.h
diff --git a/i386/linux/Makefrag.am b/i386/linux/Makefrag.am
new file mode 100644
index 0000000..533c6c3
--- /dev/null
+++ b/i386/linux/Makefrag.am
@@ -0,0 +1,24 @@
+# Makefile fragment for i386-specific Linux code.
+
+# Copyright (C) 2006 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License as
+# published by the Free Software Foundation; either version 2, or (at
+# your option) any later version.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+#
+# Files for device driver support.
+#
+
+liblinux_a_SOURCES += \
+ linux/src/arch/i386/lib/semaphore.S