direct-io.hg

view tools/xfrd/Makefile @ 2787:a5c335665fd6

bitkeeper revision 1.1159.142.2 (41849fadYlUYMwSy6tcq8Y-Yi8NMZA)

Clean up libxc by allowing direct use of Xen headers from userland:
#include <xen/...>
author kaf24@freefall.cl.cam.ac.uk
date Sun Oct 31 08:17:49 2004 +0000 (2004-10-31)
parents dae98734f12e
children 3f929065a1d1
line source
1 # -*- mode: Makefile; -*-
2 #============================================================================
3 #
4 # Mike Wray <mike.wray@hp.com>
5 #============================================================================
7 XEN_ROOT = ../..
8 include $(XEN_ROOT)/tools/Make.defs
10 XFRD_INSTALL_DIR = /usr/sbin
12 vpath %h $(XEN_LINUX_INCLUDE)
13 INCLUDES += -I $(XEN_LINUX_INCLUDE)
15 vpath %.h $(XEN_LIBXC)
16 INCLUDES += -I $(XEN_LIBXC)
18 vpath %c $(XEN_LIBXUTIL)
19 INCLUDES += -I $(XEN_LIBXUTIL)
21 include Make.xfrd
23 UTIL_LIB_OBJ = $(UTIL_LIB_SRC:.c=.o)
25 XFRD_PROG_OBJ = $(XFRD_PROG_SRC:.c=.o)
26 XFRD_PROG_OBJ += $(UTIL_LIB)
28 # Flag controlling whether to use stubs.
29 # Define to use stubs, undefine to use the real Xen functions.
30 #CPPFLAGS += -D _XEN_XFR_STUB_
32 CC := gcc
34 CFLAGS += -g
35 CFLAGS += -Wall
36 CFALGS += -Werror
37 CFLAGS += $(INCLUDES)
38 # Make gcc generate dependencies.
39 CFLAGS += -Wp,-MD,.$(@F).d
40 PROG_DEP = .*.d
42 #$(warning XFRD_PROG_OBJ= $(XFRD_PROG_OBJ))
43 #$(warning UTIL_LIB= $(UTIL_LIB))
44 #$(warning UTIL_LIB_OBJ= $(UTIL_LIB_OBJ))
46 # Libraries for xfrd.
47 XFRD_LIBS :=
49 XFRD_LIBS += -L $(XEN_LIBXC) -lxc
50 XFRD_LIBS += -L $(XEN_LIBXUTIL) -lxutil
52 # zlib library.
53 XFRD_LIBS += -lz
55 CURL_FLAGS = $(shell curl-config --cflags)
56 CURL_LIBS = $(shell curl-config --libs)
57 CFLAGS += $(CURL_FLAGS)
58 # libcurl libraries.
59 XFRD_LIBS += $(CURL_LIBS)
61 #$(warning XFRD_LIBS = $(XFRD_LIBS))
63 all: xfrd
65 xfrd: $(XFRD_PROG_OBJ)
66 $(CC) -o $@ $^ $(XFRD_LIBS)
68 .PHONY: install
69 install: xfrd
70 mkdir -p $(prefix)/$(XFRD_INSTALL_DIR)
71 install -m 0755 xfrd $(prefix)/$(XFRD_INSTALL_DIR)
73 .PHONY: libutil
74 libutil: $(UTIL_LIB)
76 $(UTIL_LIB): $(UTIL_LIB_OBJ)
77 $(AR) rc $@ $^
79 .PHONY: clean
80 clean:
81 $(RM) *.o *.a *.so *~ xfrd
82 $(RM) $(PROG_DEP)
84 $(XFRD_PROG_OBJ): Makefile
85 -include $(PROG_DEP)