summaryrefslogtreecommitdiff
path: root/i386/Makefile.in
diff options
context:
space:
mode:
authorThomas Schwinge <tschwinge@gnu.org>2006-01-31 09:21:05 +0000
committerThomas Schwinge <tschwinge@gnu.org>2009-06-18 00:26:31 +0200
commit70b84c83f21a5943a291e86520e02f676517e644 (patch)
tree3532ba64b621bd7cc568a4d7853d57abe7c397ee /i386/Makefile.in
parent3a52c9edfa90e81f19b208e0c289072dcb2f24c8 (diff)
2006-01-31 Thomas Schwinge <tschwinge@gnu.org>
Cleanup of GNU Mach's build system. The system dependend parts are now handeled by the respective Makefile and no longer by the top-level one. * configure, i386/configure, i386/linux/configure, linux/configure: Regenerated. * Makefile.in: Various cleanups. (mach/machine, mach_machine): Targets removed. (AWK, CC, CFLAGS, CPPFLAGS, DEFINES, INCLUDES, INSTALL, INSTALL_DATA) (INSTALL_PROGRAM, LD, MIG, MIGFLAGS, NM): Variables moved into Makerules.in. Do not include $(sysdep)/Makefrag anymore. (all, check, clean, distclean, mostlyclean, maintainer-clean, install) (install-headers, install-kernel): Recurse into the system dependend subdirectory. (check): Add a basic test using mbchk. (clean, distclean): Be more explicit in what to delete. ($(systype)/%): New target. (kernel.o): Incorporate the system dependend archive. (installed-sysdep-headers-names, $(installed-sysdep-headers-names)): Variable and target moved into the system dependend Makefile.in. (install-headers, mkheaderdirs): Don't care for the system dependend header files. (%.symc, %.symc.o, %.h, %_user.c, %_interface.h, %_server.c): Targets moved into Makerules.in. Inclusion of dependency files: Likewise. (%.migs_d, %.migu_d, %.migsh_d, %.miguh_d, make-deps, %.d): Likewise. Include Makerules. * Makerules.in: New file, mainly based on Makefile.in. * configure.in: Do not substitute cross_compiling and not explicitly substitute LDFLAGS. Check for cpp, ranlib, ar and mbchk. Care for the mach/machine symbolic link. Add Makerules as a config file. * i386/Makefile.in: Various cleanups. Merge i386/Makefrag and the system dependent stuff from Makefile.in into this file. (all, check, install, install-headers, install-kernel): Recurse into the system dependend subdirectory. (sysdep.o): transformed to the new target sysdep.a. (linux/linux.o): Target removed. (clean, distclean): Be more explicit in what to delete. (linux/%): New target. (install-headers): Install the system dependend header files. (mkheaderdirs): New target. Include the top-level Makerules. * i386/Makefrag: File removed. * i386/Makerules.in: New file. * i386/configure.in: Synchronize AC_INIT to the top-level definition. Do not check for ld and make. Add Makerules as a config file. * i386/linux/Makefile.in: Various cleanups. Replace linux-objs with objfiles. (check, install, install-headers, install-kernel): New empty targets. Don't care about linux-flags if no_deps is true. Inclusion of dependency files removed and instead... Include the top-level Makerules. * i386/linux/Makerules.in: New file. * i386/linux/configure.ac: Synchronize AC_INIT to the top-level definition. Do not check for gcc and ld. Do not explicitly substitute LDFLAGS. Add Makerules as a config file. * linux/configure.in: Synchronize AC_INIT to the top-level definition. Do not create directories using a dummy file. * linux/dummy.in: File removed. * ddb/db_access.h: Include <machine/vm_param.h> instead of "vm_param.h". * kern/bootstrap.c: Likewise. * kern/thread.c: Likewise. * vm/vm_kern.c: Likewise. * vm/vm_object.c: Likewise. * vm/vm_resident.c: Likewise.
Diffstat (limited to 'i386/Makefile.in')
-rw-r--r--i386/Makefile.in191
1 files changed, 169 insertions, 22 deletions
diff --git a/i386/Makefile.in b/i386/Makefile.in
index b6355e5..c6fe430 100644
--- a/i386/Makefile.in
+++ b/i386/Makefile.in
@@ -1,5 +1,5 @@
# Makefile for i386
-# Copyright 1999 Free Software Foundation, Inc.
+# 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
@@ -12,58 +12,205 @@
# 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@
+
+top_srcdir = @srcdir@/..
+top_builddir = ../
+#
+# 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
+# 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.
+
+
+# Source files for any i386 kernel
+i386at-files = autoconf.c blit.c conf.c cons_conf.c fd.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 phys_mem_grab_page.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))
-# Variables from `configure'.
-srcdir=@srcdir@
+# This file is only needed for KDB support. It'll be discarded at linking time
+# if it's not needed.
+objfiles += _setjmp.o
-# Programs found by configure.
-LD = @LD@
-MAKE = @MAKE@
+# XXX: In i386, com is always enabled.
+objfiles += com.o
-# Rules. There are few rules because Makefrag does most things in i386.
-all: sysdep.o
+# This file is only needed for LPR support.
+ifeq ($(enable_lpr),yes)
+objfiles += lpr.o
+endif
-sysdep.o: linux/linux.o $(srcdir)/configure
+
+
+# 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)/bogus -I$(srcdir)
+
+
+#
+# Rules.
+#
+
+all: sysdep.a
+ $(MAKE) -C linux $@
+
+# `boothdr.o' is special.
+sysdep.a: $(objfiles) linux/linux.o
rm -f $@
- $(LD) -r -o $@ linux/linux.o
+ $(AR) cr $@ $(filter-out boothdr.o,$^)
+ $(RANLIB) $@
-linux/linux.o: FORCE
- cd linux && $(MAKE) all
-FORCE:
+check:
+ $(MAKE) -C linux $@
clean:
- rm -f sysdep.o
- cd linux && $(MAKE) 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
+ rm -f *.migs_d *.migsh_d *.migu_d *.miguh_d
distclean: clean
- cd linux && $(MAKE) distclean
- rm -f config.status config.log Makefile
+ $(MAKE) -C linux $@
+ rm -f Makefile Makerules
+ rm -f config.status config.log
mostlyclean: distclean
- cd linux && $(MAKE) mostlyclean
+ $(MAKE) -C linux $@
maintainer-clean: mostlyclean
+ $(MAKE) -C linux $@
rm -f $(srcdir)/configure
- cd linux && $(MAKE) maintainer-clean
-install-headers:
+linux/%: FORCE
+ $(MAKE) -C linux $(@F)
+FORCE:
+
+
+#
+# Installation
+#
+
+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)
-
+#
# Autoconf support
+#
$(srcdir)/configure: configure.in
cd $(srcdir) && autoconf
Makefile: Makefile.in config.status
- ./config.status
+ ./config.status $@
config.status: configure
./config.status --recheck
vpath %.in $(srcdir)
vpath configure $(srcdir)
+
+
+#
+# Makerules
+#
+
+include $(top_builddir)/Makerules