Advertisement
Guest User

Untitled

a guest
Oct 28th, 2012
12
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 2.44 KB | None | 0 0
  1. ################################################################################
  2. #
  3. # r8168 is the Linux device driver released for RealTek RTL8168B/8111B,
  4. # RTL8168C/8111C, RTL8168CP/8111CP, RTL8168D/8111D, and RTL8168DP/8111DP, and
  5. # RTL8168E/8111E Gigabit Ethernet controllers with PCI-Express interface.
  6. #
  7. # Copyright(c) 2012 Realtek Semiconductor Corp. All rights reserved.
  8. #
  9. # This program is free software; you can redistribute it and/or modify it
  10. # under the terms of the GNU General Public License as published by the Free
  11. # Software Foundation; either version 2 of the License, or (at your option)
  12. # any later version.
  13. #
  14. # This program is distributed in the hope that it will be useful, but WITHOUT
  15. # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  16. # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
  17. # more details.
  18. #
  19. # You should have received a copy of the GNU General Public License along with
  20. # this program; if not, see <http://www.gnu.org/licenses/>.
  21. #
  22. # Author:
  23. # Realtek NIC software team <nicfae@realtek.com>
  24. # No. 2, Innovation Road II, Hsinchu Science Park, Hsinchu 300, Taiwan
  25. #
  26. ################################################################################
  27.  
  28. ################################################################################
  29. # This product is covered by one or more of the following patents:
  30. # US5,307,459, US5,434,872, US5,732,094, US6,570,884, US6,115,776, and US6,327,625.
  31. ################################################################################
  32.  
  33. CONFIG_DOWN_SPEED_100 = n
  34.  
  35. ifneq ($(KERNELRELEASE),)
  36.     obj-m := r8168.o
  37.     r8168-objs := r8168_n.o r8168_asf.o rtl_eeprom.o rtltool.o
  38.     EXTRA_CFLAGS += -DCONFIG_R8168_NAPI
  39.     EXTRA_CFLAGS += -DCONFIG_R8168_VLAN
  40.     ifeq ($(CONFIG_DOWN_SPEED_100), y)
  41.         EXTRA_CFLAGS += -DCONFIG_DOWN_SPEED_100
  42.     endif
  43. else
  44.     BASEDIR := /lib/modules/$(shell uname -r)
  45.     KERNELDIR ?= $(BASEDIR)/build
  46.     PWD :=$(shell pwd)
  47.     DRIVERDIR := $(shell find $(BASEDIR)/kernel/drivers/net -name realtek -type d)
  48.     ifeq ($(DRIVERDIR),)
  49.         DRIVERDIR := $(BASEDIR)/kernel/drivers/net
  50.     endif
  51.     RTKDIR := $(subst $(BASEDIR)/,,$(DRIVERDIR))
  52.  
  53. .PHONY: all
  54. all: clean modules install
  55.  
  56. .PHONY:modules
  57. modules:
  58.     $(MAKE) -C $(KERNELDIR) SUBDIRS=$(PWD) modules
  59.  
  60. .PHONY:clean
  61. clean:
  62.     $(MAKE) -C $(KERNELDIR) SUBDIRS=$(PWD) clean
  63.  
  64. .PHONY:install
  65. install:
  66.     $(MAKE) -C $(KERNELDIR) SUBDIRS=$(PWD) INSTALL_MOD_DIR=$(RTKDIR) modules_install
  67.  
  68. endif
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement