ia64/xen-unstable

view tools/vnet/vnet-module/Makefile @ 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 ifndef VNET_ROOT
22 export VNET_ROOT = $(shell cd .. && pwd)
23 include $(VNET_ROOT)/Make.env
24 endif
26 #============================================================================
27 ifeq ($(src),)
29 include Makefile-$(LINUX_SERIES)
31 #============================================================================
32 else
33 #============================================================================
34 # This section is for the 2.6 kbuild.
36 #$(warning KBUILD_EXTMOD $(KBUILD_EXTMOD))
37 #$(warning src $(src))
38 #$(warning obj $(obj))
40 include $(src)/Makefile.vnet
42 obj-m = vnet_module.o
43 vnet_module-objs = $(VNET_OBJ)
44 vnet_module-objs += $(VNET_LIB_OBJ)
46 #----------------------------------------------------------------------------
47 # The fancy stuff in the kernel build defeats 'vpath %.c' so we can't
48 # use that to get the lib files compiled.
49 # Setup explicit rules for them using the kbuild C compile rule.
51 # File names in the lib dir.
52 remote_srcs = $(foreach file,$(VNET_LIB_SRC),$(LIBXUTIL_DIR)/$(file))
54 # Equivalent file names here.
55 local_srcs = $(foreach file,$(VNET_LIB_SRC),$(src)/$(file))
57 # Objects for the local names.
58 local_objs = $(local_srcs:.c=.o)
60 # Make the local objects depend on compiling the remote sources.
61 $(local_objs): $(src)/%.o: $(LIBXUTIL_DIR)/%.c
62 $(call if_changed_rule,cc_o_c)
63 #----------------------------------------------------------------------------
65 vpath %.h $(LIBXUTIL_DIR)
66 EXTRA_CFLAGS += -I $(LIBXUTIL_DIR)
67 EXTRA_CFLAGS += -I $(src)
69 endif
70 #============================================================================