ia64/xen-unstable

view tools/vnet/vnet-module/Makefile-2.4 @ 8740:3d7ea7972b39

Update patches for linux 2.6.15.

Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
author cl349@firebug.cl.cam.ac.uk
date Thu Feb 02 17:16:00 2006 +0000 (2006-02-02)
parents 06d84bf87159
children
line source
1 # -*- mode: Makefile; -*-
2 #============================================================================
3 #
4 # Copyright (C) 2004 Mike Wray <mike.wray@hp.com>
5 #
6 # This program is free software; you can redistribute it and/or modify
7 # it under the terms of the GNU General Public License as published by the
8 # Free Software Foundation; either version 2 of the License, or (at your
9 # option) any later version.
10 #
11 # This program is distributed in the hope that it will be useful, but
12 # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
13 # or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14 # for more details.
15 #
16 # You should have received a copy of the GNU General Public License along
17 # with this program; if not, write to the Free software Foundation, Inc.,
18 # 59 Temple Place, suite 330, Boston, MA 02111-1307 USA
19 #============================================================================
21 #============================================================================
22 # Vnet module makefile for 2.4 series kernels.
24 LINUX_SERIES =2.4
25 include Makefile.ver
27 KERNEL_MODULE := vnet_module.o
29 CONFIG_MODVERSIONS := $(shell grep 'CONFIG_MODVERSIONS=y' $(KERNEL_SRC)/.config && echo 1 || echo 0)
31 include Makefile.vnet
33 VNET_OBJ += $(VNET_LIB_OBJ)
35 #----------------------------------------------------------------------------
37 vpath %.h $(KERNEL_SRC)/include
38 INCLUDES+= -I $(KERNEL_SRC)/include
40 vpath %.h $(LIBXUTIL_DIR)
41 vpath %.c $(LIBXUTIL_DIR)
42 INCLUDES += -I $(LIBXUTIL_DIR)
44 INCLUDES+= -I .
46 #----------------------------------------------------------------------------
48 CPPFLAGS += -D__KERNEL__
49 CPPFLAGS += -DMODULE
51 ifeq ($(CONFIG_MODVERSIONS), 1)
52 CPPFLAGS += -DMODVERSIONS
53 CPPFLAGS += -include $(KERNEL_SRC)/include/linux/modversions.h
54 endif
56 CPPFLAGS += $(INCLUDES)
58 CFLAGS += -Wall
59 CFLAGS += -Wstrict-prototypes
60 CFLAGS += -Wno-trigraphs
61 CFLAGS += -Wno-unused-function
62 CFLAGS += -Wno-unused-parameter
64 CFLAGS += -g
65 CFLAGS += -O2
66 CFLAGS += -fno-strict-aliasing
67 CFLAGS += -fno-common
68 #CFLAGS += -fomit-frame-pointer
70 # Dependencies. Gcc generates them for us.
71 CFLAGS += -Wp,-MD,.$(@F).d
72 VNET_DEP = .*.d
73 #----------------------------------------------------------------------------
75 .PHONY: all
76 all: module
78 .PHONY: module modules
79 module modules: $(KERNEL_MODULE)
81 $(KERNEL_MODULE): $(VNET_OBJ)
82 $(LD) -r -o $@ $^
84 .PHONY: install install-module modules_install
85 install install-module modules_install: module
86 install -m 0755 -d $(DESTDIR)$(KERNEL_MODULE_DIR)
87 install -m 0554 $(KERNEL_MODULE) $(DESTDIR)$(KERNEL_MODULE_DIR)
89 TAGS:
90 etags *.c *.h
92 .PHONY: clean
93 clean:
94 -@$(RM) *.a *.o *.ko *~
95 -@$(RM) $(VNET_DEP) .*.cmd *.mod.?
96 -@$(RM) -r .tmp_versions
98 -include $(VNET_DEP)