makefile-2.4

来自「xen虚拟机源代码安装包」· 4 代码 · 共 99 行

4
99
字号
# -*- mode: Makefile; -*-#============================================================================## Copyright (C) 2004 Mike Wray <mike.wray@hp.com>## This program is free software; you can redistribute it and/or modify# it under the terms of the GNU General Public License as published by the# Free Software Foundation; either version 2 of the License, or (at your# option) any later version.## This program is distributed in the hope that it will be useful, but# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License# for more details.## You should have received a copy of the GNU General Public License along# with this program; if not, write to the Free software Foundation, Inc.,# 59 Temple Place, suite 330, Boston, MA 02111-1307 USA#============================================================================#============================================================================# Vnet module makefile for 2.4 series kernels.LINUX_SERIES =2.4include Makefile.verKERNEL_MODULE := vnet_module.oCONFIG_MODVERSIONS := $(shell grep 'CONFIG_MODVERSIONS=y' $(KERNEL_SRC)/.config && echo 1 || echo 0)include Makefile.vnetVNET_OBJ += $(VNET_LIB_OBJ)#----------------------------------------------------------------------------vpath %.h $(KERNEL_SRC)/includeINCLUDES+= -I $(KERNEL_SRC)/includevpath %.h $(LIBXUTIL_DIR)vpath %.c $(LIBXUTIL_DIR)INCLUDES += -I $(LIBXUTIL_DIR)INCLUDES+= -I .#----------------------------------------------------------------------------CPPFLAGS += -D__KERNEL__CPPFLAGS += -DMODULEifeq ($(CONFIG_MODVERSIONS), 1)CPPFLAGS += -DMODVERSIONSCPPFLAGS += -include $(KERNEL_SRC)/include/linux/modversions.hendifCPPFLAGS += $(INCLUDES)CFLAGS += -WallCFLAGS += -Wstrict-prototypesCFLAGS += -Wno-trigraphsCFLAGS += -Wno-unused-functionCFLAGS += -Wno-unused-parameter CFLAGS += -gCFLAGS += -O2CFLAGS += -fno-strict-aliasing CFLAGS += -fno-common #CFLAGS += -fomit-frame-pointer# Dependencies. Gcc generates them for us.CFLAGS += -Wp,-MD,.$(@F).dVNET_DEP = .*.d#----------------------------------------------------------------------------.PHONY: allall: module.PHONY: module modulesmodule modules: $(KERNEL_MODULE)$(KERNEL_MODULE): $(VNET_OBJ)	$(LD) -r -o $@ $^.PHONY: install install-module modules_installinstall install-module modules_install: module	install -m 0755 -d $(DESTDIR)$(KERNEL_MODULE_DIR)	install -m 0554 $(KERNEL_MODULE) $(DESTDIR)$(KERNEL_MODULE_DIR)TAGS:	etags *.c *.h.PHONY: cleanclean:	-@$(RM) *.a *.o *.ko *~	-@$(RM) $(VNET_DEP) .*.cmd *.mod.?	-@$(RM) -r .tmp_versions-include $(VNET_DEP)

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?