debuggers.hg

view tools/vnet/vnetd/Makefile @ 0:7d21f7218375

Exact replica of unstable on 051908 + README-this
author Mukesh Rathor
date Mon May 19 15:34:57 2008 -0700 (2008-05-19)
parents
children
line source
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 #----------------------------------------------------------------------------
19 VNET_ROOT ?= $(shell cd .. && pwd)
20 include $(VNET_ROOT)/Make.env
22 .PHONY: all
23 all: vnetd
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 #----------------------------------------------------------------------------
37 # GC.
39 INCLUDES += -I$(GC_INCLUDE)
40 #LIBS += -L$(GC_LIB_DIR)
41 CPPFLAGS += -D USE_GC
43 # Sometimes linux/atomic.h is not #ifdef __KERNEL__.
44 CPPFLAGS += -D __ARCH_I386_ATOMIC__
46 #----------------------------------------------------------------------------
47 CFLAGS += -O3
48 CFLAGS += $(INCLUDES) $(LIBS)
50 LDFLAGS += $(LIBS)
52 # Dependencies. Gcc generates them for us.
53 CFLAGS += -Wp,-MD,.$(@F).d
54 PROG_DEP = .*.d
56 vpath %.c $(LIBXUTIL_DIR)
57 vpath %.c $(VNET_MODULE_DIR)
59 IPATHS:=$(INCLUDES:-I=)
60 vpath %.h $(IPATHS)
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
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
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
99 VNETD_SRC+=$(LIB_SRC)
101 VNETD_OBJ := $(VNETD_SRC:.c=.o)
103 #VNETD_LIBS:= $(GC_LIB_SO)
104 #VNETD_LIBS:= -lgc
105 VNETD_LIBS:= $(GC_LIB_A)
107 vnetd: $(VNETD_OBJ)
108 $(CC) $(CFLAGS) -o $@ $^ $(VNETD_LIBS) -ldl -lpthread
110 .PHONY: install
111 install: vnetd
112 $(INSTALL_DIR) $(DESTDIR)$(SBINDIR)
113 $(INSTALL_PROG) vnetd $(DESTDIR)$(SBINDIR)
115 .PHONY: clean
116 clean:
117 -@$(RM) *.a *.o *~
118 -@$(RM) vnetd
119 -@$(RM) $(PROG_DEP)
121 -include $(PROG_DEP)