diff options
Diffstat (limited to 'i386/linux/Makefile.in')
-rw-r--r-- | i386/linux/Makefile.in | 207 |
1 files changed, 207 insertions, 0 deletions
diff --git a/i386/linux/Makefile.in b/i386/linux/Makefile.in new file mode 100644 index 0000000..cdcabb3 --- /dev/null +++ b/i386/linux/Makefile.in @@ -0,0 +1,207 @@ +# Makefile for Linux device drivers and the glue codes. +# Copyright 1998, 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. + + +# Variables from `configure'. +srcdir=@srcdir@ +systype=@systype@ +device_drivers=@device_drivers@ + +sysdep=$(srcdir)/.. +linuxdir=../../linux +linuxsrcdir=$(srcdir)/$(linuxdir) + +# Programs found by configure. +CC = @CC@ +LD = @LD@ + +CFLAGS = @CFLAGS@ + + + +# Files for driver support. +linux-c-files = version.c softirq.c dma.c resource.c printk.c \ + bios32.c irq.c ctype.c vsprintf.c main.c misc.c sched.c \ + kmem.c block.c setup.c + +# `dev' directory contains modified and glue source files. +vpath %.c $(linuxsrcdir)/dev/kernel +vpath %.c $(linuxsrcdir)/dev/init +vpath %.c $(linuxsrcdir)/dev/arch/$(systype)/kernel +vpath %.c $(linuxsrcdir)/dev/glue +vpath %.c $(linuxsrcdir)/dev/lib + +# `src' directory contains original Linux source files. +vpath %.c $(linuxsrcdir)/src/kernel +vpath %.c $(linuxsrcdir)/src/init +vpath %.c $(linuxsrcdir)/src/arch/$(systype)/kernel +vpath %.c $(linuxsrcdir)/src/lib + + +# XXX: Assembly source files must be treated separately... Uggg... +linux-asm-files = delay.S semaphore.S +vpath %.S $(linuxsrcdir)/dev/arch/$(systype)/lib +vpath %.S $(linuxsrcdir)/src/arch/$(systype)/lib + + +# Linux device drivers. +linux-block-files = cmd640.c floppy.c genhd.c ide-cd.c ide.c rz1000.c triton.c +vpath %.c $(linuxsrcdir)/dev/drivers/block +vpath %.c $(linuxsrcdir)/src/drivers/block + +linux-net-files = auto_irq.c 3c501.c 3c503.c 3c505.c 3c507.c 3c509.c \ + 3c59x.c 3c515.c 8390.c Space.c ac3200.c apricot.c at1700.c atp.c \ + de4x5.c de600.c de620.c depca.c dev.c e2100.c eepro.c eepro100.c \ + eexpress.c epic100.c eth16i.c ewrk3.c fmv18x.c hp-plus.c hp.c hp100.c \ + lance.c ne.c ne2k-pci.c net_init.c ni52.c ni65.c pcnet32.c rtl8139.c \ + seeq8005.c sk_g16.c smc-ultra.c smc-ultra32.c tlan.c tulip.c \ + via-rhine.c wavelan.c wd.c yellowfin.c znet.c net.c +vpath %.c $(linuxsrcdir)/dev/drivers/net +vpath %.c $(linuxsrcdir)/dev/net/core +vpath %.c $(linuxsrcdir)/src/drivers/net +vpath %.c $(linuxsrcdir)/src/net/core + +linux-pci-files = pci.c +vpath %.c $(linuxsrcdir)/dev/drivers/pci +vpath %.c $(linuxsrcdir)/src/drivers/pci + +linux-scsi-files = 53c78xx.c AM53C974.c BusLogic.c NCR53c406a.c advansys.c \ + aha152x.c aha1542.c aha1740.c aic7xxx.c constants.c dtc.c eata.c \ + eata_dma.c eata_pio.c fdomain.c g_NCR5380.c gdth.c hosts.c in2000.c \ + ncr53c8xx.c pas16.c ppa.c qlogicfas.c qlogicisp.c scsi.c scsi_ioctl.c \ + scsi_proc.c scsicam.c sd.c sd_ioctl.c seagate.c sr.c sr_ioctl.c \ + t128.c tmscsim.c tmscsiw.c u14-34f.c ultrastor.c wd7000.c +vpath %.c $(linuxsrcdir)/dev/drivers/scsi +vpath %.c $(linuxsrcdir)/src/drivers/scsi + + +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)) + +# 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 \ + -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 + +# These flags are: +# Instead of Mach's KERNEL, Linux uses __KERNEL__. Whee. +# Arrange for special include directories too. +# Because of the use of `extern inline' in some Linux header files without +# corresponding text-segment definitions, we must always optimize. +linux-gen-flags = -D__KERNEL__ -O2 \ + -Idev/include -I$(srcdir)/dev/include \ + -I$(linuxdir)/dev/include -I$(linuxdir)/src/include \ + -I$(linuxsrcdir)/dev/include -I$(linuxsrcdir)/src/include +linux-block-flags = -I$(linuxsrcdir)/dev/drivers/block \ + -I$(linuxsrcdir)/src/drivers/block +linux-net-flags = -I$(linuxsrcdir)/dev/drivers/net \ + -I$(linuxsrcdir)/src/drivers/net +linux-pci-flags = -I$(linuxsrcdir)/dev/drivers/pci \ + -I$(linuxsrcdir)/src/drivers/pci +linux-scsi-flags = -I$(linuxsrcdir)/dev/drivers/scsi \ + -I$(linuxsrcdir)/src/drivers/scsi +linux-asm-spec-flags = -D__KERNEL__ -D__ASSEMBLY__ -traditional \ + -Idev/include -I$(linuxdir)/dev/include -I$(linuxdir)/src/include \ + -I$(srcdir)/dev/include -I$(linuxsrcdir)/dev/include \ + -I$(linuxsrcdir)/src/include + + +# Here is where those specs are found. +-include linux-flags + +# How to make this file: + +linux-flags: Makefile + rm -f $@ + for i in $(linux-c-files); do \ + echo $$i-linux-flags '= $$(linux-gen-flags)' >> $@; \ + done + for i in $(linux-block-files); do \ + echo $$i-linux-flags \ + '= $$(linux-gen-flags) $$(linux-block-flags)' >> $@; \ + done + for i in $(linux-net-files); do \ + echo $$i-linux-flags \ + '= $$(linux-gen-flags) $$(linux-net-flags)' >> $@; \ + done + for i in $(linux-pci-files); do \ + echo $$i-linux-flags \ + '= $$(linux-gen-flags) $$(linux-pci-flags)' >> $@; \ + done + for i in $(linux-scsi-files); do \ + echo $$i-linux-flags \ + '= $$(linux-gen-flags) $$(linux-scsi-flags)' >> $@; \ + done + for i in $(linux-asm-files); do \ + echo $$i-linux-flags '= $$(linux-asm-spec-flags)' >> $@; \ + done + echo 'linux-flags-done='$(all-linux-files) $(linux-asm-files) >> $@ + +# If we haven't included `linux-flags' properly, then don't try and build +# .d files. +ifneq ($(linux-flags-done),$(all-linux-files) $(linux-asm-files)) +no_deps=t +endif + +linux-objs += $(sort $(device_drivers)) + + + +# Autoconf support + +$(srcdir)/configure: $(srcdir)/Drivers.in $(srcdir)/../../Drivers.macros + cd $(srcdir) && rm -f configure && autoconf Drivers.in > configure + +device-drivers.h: $(srcdir)/Makefile.in config.status + ./config.status + +config.status: $(srcdir)/configure + ./config.status --recheck + +vpath %.in $(srcdir) +vpath configure $(srcdir) + + + +# Create a linuxdev object file. +all: linux.o + +linux.o: $(linux-objs) $(srcdir)/configure + rm -f $@ + $(LD) -r -o $@ $(linux-objs) + +clean: + rm -f $(linux-objs) linux.o + +distclean: clean + rm -f $(linuxdir)/src/include/asm $(linuxdir)/dev/include/asm + rm -f config.status config.log Makefile device-drivers.h + +mostlyclean: distclean + +maintainer-clean: mostlyclean + rm -f $(srcdir)/configure |