debuggers.hg

view tools/vnet/vnet-module/Makefile-2.4 @ 3601:25f3f22927e9

bitkeeper revision 1.1159.1.539 (41f925edsOM-7RHXmwoPRFfYwoxtEw)

Merge tempest.cl.cam.ac.uk:/auto/groups/xeno-xenod/BK/xeno.bk
into tempest.cl.cam.ac.uk:/local/scratch/smh22/xen-unstable.bk
author smh22@tempest.cl.cam.ac.uk
date Thu Jan 27 17:33:33 2005 +0000 (2005-01-27)
parents d8ba911dce48 1b6a9577c36d
children 0a4b76b6b5a0
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 $(LIB_DIR)
41 vpath %.c $(LIB_DIR)
42 INCLUDES += -I $(LIB_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 += -O2
65 CFLAGS += -fno-strict-aliasing
66 CFLAGS += -fno-common
67 #CFLAGS += -fomit-frame-pointer
69 # Dependencies. Gcc generates them for us.
70 CFLAGS += -Wp,-MD,.$(@F).d
71 VNET_DEP = .*.d
72 #----------------------------------------------------------------------------
74 .PHONY: all
75 all: module
77 .PHONY: module modules
78 module modules: $(KERNEL_MODULE)
80 $(KERNEL_MODULE): $(VNET_OBJ)
81 $(LD) -r -o $@ $^
83 .PHONY: install install-module modules_install
84 install install-module modules_install: module
85 install -m 0755 -d $(DESTDIR)$(KERNEL_MODULE_DIR)
86 install -m 0554 $(KERNEL_MODULE) $(DESTDIR)$(KERNEL_MODULE_DIR)
88 TAGS:
89 etags *.c *.h
91 .PHONY: clean
92 clean:
93 @rm -f *.a *.o *.ko *~
94 @rm -f $(VNET_DEP) .*.cmd *.mod.?
95 @rm -rf .tmp_versions
97 -include $(VNET_DEP)