diff options
author | Thomas Schwinge <tschwinge@gnu.org> | 2006-01-31 09:21:05 +0000 |
---|---|---|
committer | Thomas Schwinge <tschwinge@gnu.org> | 2009-06-18 00:26:31 +0200 |
commit | 70b84c83f21a5943a291e86520e02f676517e644 (patch) | |
tree | 3532ba64b621bd7cc568a4d7853d57abe7c397ee /i386/linux/Makefile.in | |
parent | 3a52c9edfa90e81f19b208e0c289072dcb2f24c8 (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/linux/Makefile.in')
-rw-r--r-- | i386/linux/Makefile.in | 101 |
1 files changed, 57 insertions, 44 deletions
diff --git a/i386/linux/Makefile.in b/i386/linux/Makefile.in index 947b40c..a13a1bb 100644 --- a/i386/linux/Makefile.in +++ b/i386/linux/Makefile.in @@ -12,21 +12,43 @@ # LIABILITY OF ANY KIND FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE # USE OF THIS SOFTWARE. + +# +# configure's findings. +# -# Variables from `configure'. -srcdir=@srcdir@ -systype=@systype@ -device_drivers=@device_drivers@ - +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_builddir = ../../ sysdep=$(srcdir)/.. linuxdir=../../linux linuxsrcdir=$(srcdir)/$(linuxdir) -# Programs found by configure. -CC = @CC@ -LD = @LD@ +systype=@systype@ +device_drivers=@device_drivers@ + + +# +# Default target +# -CFLAGS = @CFLAGS@ +all: @@ -97,22 +119,21 @@ all-linux-files = $(linux-c-files) $(linux-block-files) \ $(linux-net-files) $(linux-pci-files) $(linux-scsi-files) # These are always used. -linux-objs := $(subst .c,.o, $(linux-c-files) $(linux-pci-files)) genhd.o -linux-objs += $(subst .S,.o, $(linux-asm-files)) +objfiles := $(subst .c,.o, $(linux-c-files) $(linux-pci-files)) genhd.o +objfiles += $(subst .S,.o, $(linux-asm-files)) # These files need special flags for compilation; each one will # have a variable like wd7000.c-linux-flags with those flags. -CFLAGS += $($(<F)-linux-flags) -ASFLAGS += $($(<F)-linux-flags) - -CPPFLAGS = -DMACH -DCMU -DMACH_KERNEL -DKERNEL -DLINUX_DEV \ - -DCONTINUATIONS -D__ELF__ -Di386 \ +CFLAGS = $($(<F)-linux-flags) +ASFLAGS = $($(<F)-linux-flags) +INCLUDES = \ -I. -I.. -I$(srcdir)/.. -I../.. -I$(srcdir)/../.. \ -I$(srcdir)/../../include -I$(srcdir)/../../bogus \ -I$(srcdir)/../../util -I$(srcdir)/../../kern \ -I$(srcdir)/../../device -I$(sysdep)/i386at -I$(sysdep)/i386 \ -I$(sysdep)/include -I$(sysdep)/include/mach/sa -I$(sysdep)/bogus \ - -I$(sysdep) -Wall + -I$(sysdep) +CPPFLAGS = -Wall # These flags are: # Instead of Mach's KERNEL, Linux uses __KERNEL__. Whee. @@ -138,6 +159,8 @@ linux-asm-spec-flags = -D__KERNEL__ -D__ASSEMBLY__ -traditional \ # Here is where those specs are found. +ifneq ($(no_deps),t) + -include linux-flags # How to make this file: @@ -174,7 +197,9 @@ ifneq ($(linux-flags-done),$(all-linux-files) $(linux-asm-files)) no_deps=t endif -linux-objs += $(sort $(device_drivers)) +endif + +objfiles += $(sort $(device_drivers)) @@ -183,7 +208,7 @@ linux-objs += $(sort $(device_drivers)) $(srcdir)/configure: $(srcdir)/configure.ac $(srcdir)/../../Drivers.macros cd $(srcdir) && autoconf -Makefile device-drivers.h: $(srcdir)/Makefile.in config.status +Makefile device-drivers.h: %: $(srcdir)/%.in config.status ./config.status $@ config.status: $(srcdir)/configure @@ -197,16 +222,22 @@ vpath configure $(srcdir) # Create a linuxdev object file. all: linux.o -linux.o: $(linux-objs) $(srcdir)/configure +linux.o: $(objfiles) $(srcdir)/configure rm -f $@ - $(LD) -r -o $@ $(linux-objs) + $(LD) -r -o $@ $(objfiles) + +check: + +install install-headers install-kernel: clean: - rm -f $(linux-objs) linux.o + rm -f linux.o + rm -f linux-flags + rm -f $(objfiles) $(subst .o,.d,$(objfiles)) distclean: clean - rm -f $(linuxdir)/src/include/asm $(linuxdir)/dev/include/asm - rm -f config.status config.log Makefile device-drivers.h + rm -f Makefile Makerules device-drivers.h + rm -f config.status config.log mostlyclean: distclean @@ -214,26 +245,8 @@ maintainer-clean: mostlyclean rm -f $(srcdir)/configure - # -# Dependency generation +# Makerules # -# Include dependency files -ifneq ($(no_deps),t) - -# For each .o file we need a .d file. --include $(subst .o,.d,$(filter %.o,$(linux-objs))) /dev/null - -endif - -# Generic rule for $(CC) based compilation for making dependencies -define make-deps -set -e; $(CC) $(CFLAGS) $(CPPFLAGS) -M -MG $< | \ - sed > $@.new -e 's/$*\.o:/$*.o $@:/' -mv -f $@.new $@ -endef - -%.d: %.c $(before-compile); $(make-deps) -%.d: %.S $(before-compile); $(make-deps) - +include $(top_builddir)/Makerules |