~ubuntu-branches/ubuntu/utopic/xen/utopic

« back to all changes in this revision

Viewing changes to tools/vnet/vnetd/Makefile

  • Committer: Bazaar Package Importer
  • Author(s): Bastian Blank
  • Date: 2010-05-06 15:47:38 UTC
  • mto: (1.3.1) (15.1.1 sid) (4.1.1 experimental)
  • mto: This revision was merged to the branch mainline in revision 3.
  • Revision ID: james.westby@ubuntu.com-20100506154738-agoz0rlafrh1fnq7
Tags: upstream-4.0.0
ImportĀ upstreamĀ versionĀ 4.0.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# -*- mode: Makefile; -*-
 
2
#----------------------------------------------------------------------------
 
3
# Copyright (C) 2004 Mike Wray <mike.wray@hp.com>.
 
4
#
 
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.
 
13
#
 
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
#----------------------------------------------------------------------------
 
18
 
 
19
VNET_ROOT ?= $(shell cd .. && pwd)
 
20
include $(VNET_ROOT)/Make.env
 
21
 
 
22
.PHONY: all
 
23
all: vnetd
 
24
 
 
25
#----------------------------------------------------------------------------
 
26
 
 
27
# Comment out when outside xen.
 
28
#include $(XEN_ROOT)/tools/Rules.mk
 
29
 
 
30
INSTALL_PROG ?= $(INSTALL) -m0755 -p
 
31
 
 
32
INCLUDES += -I$(LIBXUTIL_DIR)
 
33
INCLUDES += -I$(VNET_MODULE_DIR)
 
34
INCLUDES += -I$(shell pwd)
 
35
 
 
36
#----------------------------------------------------------------------------
 
37
# GC.
 
38
 
 
39
INCLUDES += -I$(GC_INCLUDE)
 
40
#LIBS += -L$(GC_LIB_DIR)
 
41
CPPFLAGS += -D USE_GC
 
42
 
 
43
# Sometimes linux/atomic.h is not #ifdef __KERNEL__.
 
44
CPPFLAGS += -D __ARCH_I386_ATOMIC__
 
45
 
 
46
#----------------------------------------------------------------------------
 
47
CFLAGS += -O3
 
48
CFLAGS += $(INCLUDES) $(LIBS)
 
49
 
 
50
LDFLAGS += $(LIBS)
 
51
 
 
52
# Dependencies. Gcc generates them for us.
 
53
CFLAGS += -Wp,-MD,.$(@F).d
 
54
PROG_DEP = .*.d
 
55
 
 
56
vpath %.c $(LIBXUTIL_DIR)
 
57
vpath %.c $(VNET_MODULE_DIR)
 
58
 
 
59
IPATHS:=$(INCLUDES:-I=)
 
60
vpath %.h $(IPATHS)
 
61
 
 
62
#----------------------------------------------------------------------------
 
63
VNETD_SRC:=
 
64
VNETD_SRC+= connection.c
 
65
VNETD_SRC+= select.c
 
66
VNETD_SRC+= timer.c
 
67
VNETD_SRC+= spinlock.c
 
68
VNETD_SRC+= skbuff.c
 
69
VNETD_SRC+= vnetd.c
 
70
 
 
71
VNETD_SRC+= skb_util.c
 
72
VNETD_SRC+= sxpr_util.c
 
73
VNETD_SRC+= timer_util.c
 
74
VNETD_SRC+= etherip.c
 
75
VNETD_SRC+= vnet.c
 
76
VNETD_SRC+= vnet_eval.c
 
77
VNETD_SRC+= vnet_forward.c
 
78
VNETD_SRC+= vif.c
 
79
VNETD_SRC+= tunnel.c
 
80
VNETD_SRC+= sa.c
 
81
VNETD_SRC+= varp.c
 
82
 
 
83
#----------------------------------------------------------------------------
 
84
LIB_SRC:=
 
85
LIB_SRC+= allocate.c
 
86
LIB_SRC+= enum.c
 
87
LIB_SRC+= file_stream.c
 
88
LIB_SRC+= hash_table.c
 
89
LIB_SRC+= iostream.c
 
90
LIB_SRC+= lexis.c
 
91
LIB_SRC+= socket_stream.c
 
92
LIB_SRC+= string_stream.c
 
93
LIB_SRC+= sxpr.c
 
94
LIB_SRC+= sxpr_parser.c
 
95
LIB_SRC+= sys_net.c
 
96
LIB_SRC+= sys_string.c
 
97
LIB_SRC+= util.c
 
98
 
 
99
VNETD_SRC+=$(LIB_SRC)
 
100
 
 
101
VNETD_OBJ := $(VNETD_SRC:.c=.o)
 
102
 
 
103
#VNETD_LIBS:= $(GC_LIB_SO)
 
104
#VNETD_LIBS:= -lgc
 
105
VNETD_LIBS:= $(GC_LIB_A)
 
106
 
 
107
vnetd: $(VNETD_OBJ)
 
108
        $(CC) $(CFLAGS) -o $@ $^ $(VNETD_LIBS) -ldl -lpthread
 
109
 
 
110
.PHONY: install
 
111
install: vnetd
 
112
        $(INSTALL_DIR) $(DESTDIR)$(SBINDIR)
 
113
        $(INSTALL_PROG) vnetd $(DESTDIR)$(SBINDIR)
 
114
 
 
115
.PHONY: clean
 
116
clean:
 
117
        -@$(RM) *.a *.o *~
 
118
        -@$(RM) vnetd
 
119
        -@$(RM) $(PROG_DEP)
 
120
 
 
121
-include $(PROG_DEP)