#
|
#
|
# Makefile for the Linux device driver for eCos USB-ethernet
|
# Makefile for the Linux device driver for eCos USB-ethernet
|
# devices. This makefile has been cloned from the one in
|
# devices. This makefile has been cloned from the one in
|
# /usr/src/linux-2.2.16/drivers/usb
|
# /usr/src/linux-2.2.16/drivers/usb
|
#
|
#
|
|
|
# This makefile will chain to the Linux makefile if appropriate.
|
# This makefile will chain to the Linux makefile if appropriate.
|
# The toplevel Linux makefile sets the variable KERNELRELEASE
|
# The toplevel Linux makefile sets the variable KERNELRELEASE
|
ifeq (,$(KERNELRELEASE))
|
ifeq (,$(KERNELRELEASE))
|
|
|
default:
|
default:
|
make -C /usr/src/linux SUBDIRS=$(shell pwd) modules
|
make -C /usr/src/linux SUBDIRS=$(shell pwd) modules
|
|
|
modules: default
|
modules: default
|
|
|
modules_install:
|
modules_install:
|
@echo Support for installing this module not yet implemented.
|
@echo Support for installing this module not yet implemented.
|
|
|
else
|
else
|
|
|
# A recursive invocation of this makefile from the Linux one.
|
# A recursive invocation of this makefile from the Linux one.
|
|
|
# Build this driver as a module.
|
# Build this driver as a module.
|
CONFIG_USB_ECOS_USBETH = m
|
CONFIG_USB_ECOS_USBETH = m
|
|
|
# Subdirs.
|
# Subdirs.
|
|
|
SUB_DIRS :=
|
SUB_DIRS :=
|
MOD_SUB_DIRS := $(SUB_DIRS)
|
MOD_SUB_DIRS := $(SUB_DIRS)
|
MOD_IN_SUB_DIRS := $(SUB_DIRS)
|
MOD_IN_SUB_DIRS := $(SUB_DIRS)
|
ALL_SUB_DIRS := $(SUB_DIRS)
|
ALL_SUB_DIRS := $(SUB_DIRS)
|
|
|
# The target object and module list name.
|
# The target object and module list name.
|
|
|
O_TARGET :=
|
O_TARGET :=
|
M_OBJS :=
|
M_OBJS :=
|
O_OBJS :=
|
O_OBJS :=
|
MOD_LIST_NAME := ECOS_USBETH_MODULE
|
MOD_LIST_NAME := ECOS_USBETH_MODULE
|
|
|
# Objects that export symbols.
|
# Objects that export symbols.
|
|
|
export-objs :=
|
export-objs :=
|
|
|
# Multipart objects.
|
# Multipart objects.
|
|
|
list-multi :=
|
list-multi :=
|
|
|
# Optional parts of multipart objects.
|
# Optional parts of multipart objects.
|
|
|
# Object file lists.
|
# Object file lists.
|
|
|
obj-y :=
|
obj-y :=
|
obj-m :=
|
obj-m :=
|
obj-n :=
|
obj-n :=
|
obj- :=
|
obj- :=
|
|
|
# Object files in subdirectories
|
# Object files in subdirectories
|
|
|
# Each configuration option enables a list of files.
|
# Each configuration option enables a list of files.
|
|
|
obj-$(CONFIG_USB_ECOS_USBETH) += ecos_usbeth.o
|
obj-$(CONFIG_USB_ECOS_USBETH) += ecos_usbeth.o
|
|
|
# Extract lists of the multi-part drivers.
|
# Extract lists of the multi-part drivers.
|
# The 'int-*' lists are the intermediate files used to build the multi's.
|
# The 'int-*' lists are the intermediate files used to build the multi's.
|
|
|
multi-y := $(filter $(list-multi), $(obj-y))
|
multi-y := $(filter $(list-multi), $(obj-y))
|
multi-m := $(filter $(list-multi), $(obj-m))
|
multi-m := $(filter $(list-multi), $(obj-m))
|
int-y := $(sort $(foreach m, $(multi-y), $($(basename $(m))-objs)))
|
int-y := $(sort $(foreach m, $(multi-y), $($(basename $(m))-objs)))
|
int-m := $(sort $(foreach m, $(multi-m), $($(basename $(m))-objs)))
|
int-m := $(sort $(foreach m, $(multi-m), $($(basename $(m))-objs)))
|
|
|
# Files that are both resident and modular: remove from modular.
|
# Files that are both resident and modular: remove from modular.
|
|
|
obj-m := $(filter-out $(obj-y), $(obj-m))
|
obj-m := $(filter-out $(obj-y), $(obj-m))
|
int-m := $(filter-out $(int-y), $(int-m))
|
int-m := $(filter-out $(int-y), $(int-m))
|
|
|
# Take multi-part drivers out of obj-y and put components in.
|
# Take multi-part drivers out of obj-y and put components in.
|
|
|
obj-y := $(filter-out $(list-multi), $(obj-y)) $(int-y)
|
obj-y := $(filter-out $(list-multi), $(obj-y)) $(int-y)
|
|
|
# Translate to Rules.make lists.
|
# Translate to Rules.make lists.
|
|
|
O_OBJS := $(sort $(filter-out $(export-objs), $(obj-y)))
|
O_OBJS := $(sort $(filter-out $(export-objs), $(obj-y)))
|
OX_OBJS := $(sort $(filter $(export-objs), $(obj-y)))
|
OX_OBJS := $(sort $(filter $(export-objs), $(obj-y)))
|
M_OBJS := $(sort $(filter-out $(export-objs), $(obj-m)))
|
M_OBJS := $(sort $(filter-out $(export-objs), $(obj-m)))
|
MX_OBJS := $(sort $(filter $(export-objs), $(obj-m)))
|
MX_OBJS := $(sort $(filter $(export-objs), $(obj-m)))
|
MI_OBJS := $(sort $(filter-out $(export-objs), $(int-m)))
|
MI_OBJS := $(sort $(filter-out $(export-objs), $(int-m)))
|
MIX_OBJS := $(sort $(filter $(export-objs), $(int-m)))
|
MIX_OBJS := $(sort $(filter $(export-objs), $(int-m)))
|
|
|
# The global Rules.make.
|
# The global Rules.make.
|
|
|
include $(TOPDIR)/Rules.make
|
include $(TOPDIR)/Rules.make
|
|
|
# Link rules for multi-part drivers.
|
# Link rules for multi-part drivers.
|
|
|
endif
|
endif
|
|
|