1
# -*- mode: Makefile; -*-
2
#----------------------------------------------------------------------------
3
# Copyright (C) 2004 Mike Wray <mike.wray@hp.com>.
5
# This library is free software; you can redistribute it and/or modify
6
# it under the terms of the GNU Lesser General Public License as
7
# published by the Free Software Foundation; either version 2.1 of the
8
# License, or (at your option) any later version. This library is
9
# distributed in the hope that it will be useful, but WITHOUT ANY
10
# WARRANTY; without even the implied warranty of MERCHANTABILITY or
11
# FITNESS FOR A PARTICULAR PURPOSE.
12
# See the GNU Lesser General Public License for more details.
14
# You should have received a copy of the GNU Lesser General Public License
15
# along with this library; if not, write to the Free Software Foundation,
16
# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17
#----------------------------------------------------------------------------
19
VNET_ROOT ?= $(shell cd .. && pwd)
20
include $(VNET_ROOT)/Make.env
25
#----------------------------------------------------------------------------
27
# Comment out when outside xen.
28
#include $(XEN_ROOT)/tools/Rules.mk
30
INSTALL_PROG ?= $(INSTALL) -m0755 -p
32
INCLUDES += -I$(LIBXUTIL_DIR)
33
INCLUDES += -I$(VNET_MODULE_DIR)
34
INCLUDES += -I$(shell pwd)
36
#----------------------------------------------------------------------------
39
INCLUDES += -I$(GC_INCLUDE)
40
#LIBS += -L$(GC_LIB_DIR)
43
# Sometimes linux/atomic.h is not #ifdef __KERNEL__.
44
CPPFLAGS += -D __ARCH_I386_ATOMIC__
46
#----------------------------------------------------------------------------
48
CFLAGS += $(INCLUDES) $(LIBS)
52
# Dependencies. Gcc generates them for us.
53
CFLAGS += -Wp,-MD,.$(@F).d
56
vpath %.c $(LIBXUTIL_DIR)
57
vpath %.c $(VNET_MODULE_DIR)
59
IPATHS:=$(INCLUDES:-I=)
62
#----------------------------------------------------------------------------
64
VNETD_SRC+= connection.c
67
VNETD_SRC+= spinlock.c
71
VNETD_SRC+= skb_util.c
72
VNETD_SRC+= sxpr_util.c
73
VNETD_SRC+= timer_util.c
76
VNETD_SRC+= vnet_eval.c
77
VNETD_SRC+= vnet_forward.c
83
#----------------------------------------------------------------------------
87
LIB_SRC+= file_stream.c
88
LIB_SRC+= hash_table.c
91
LIB_SRC+= socket_stream.c
92
LIB_SRC+= string_stream.c
94
LIB_SRC+= sxpr_parser.c
96
LIB_SRC+= sys_string.c
101
VNETD_OBJ := $(VNETD_SRC:.c=.o)
103
#VNETD_LIBS:= $(GC_LIB_SO)
105
VNETD_LIBS:= $(GC_LIB_A)
108
$(CC) $(CFLAGS) -o $@ $^ $(VNETD_LIBS) -ldl -lpthread
112
$(INSTALL_DIR) $(DESTDIR)$(SBINDIR)
113
$(INSTALL_PROG) vnetd $(DESTDIR)$(SBINDIR)