direct-io.hg

view tools/xfrd/Makefile @ 2821:724449a888fe

bitkeeper revision 1.1159.1.332 (41874e954CLIDA2J3phVFD2RnzVTpA)

Clean up public XenLinux header files. Now accessible from userspace as
#include <xen/linux...>
Got rid of the linux-xen-sparse symlink as it's no longer needed.
author kaf24@freefall.cl.cam.ac.uk
date Tue Nov 02 09:08:37 2004 +0000 (2004-11-02)
parents 3f929065a1d1
children 4b6b3f4ac66d d6216cd62518 42bdac6c8985
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_LIBXC)
13 INCLUDES += -I $(XEN_LIBXC)
15 vpath %c $(XEN_LIBXUTIL)
16 INCLUDES += -I $(XEN_LIBXUTIL)
18 include Make.xfrd
20 UTIL_LIB_OBJ = $(UTIL_LIB_SRC:.c=.o)
22 XFRD_PROG_OBJ = $(XFRD_PROG_SRC:.c=.o)
23 XFRD_PROG_OBJ += $(UTIL_LIB)
25 # Flag controlling whether to use stubs.
26 # Define to use stubs, undefine to use the real Xen functions.
27 #CPPFLAGS += -D _XEN_XFR_STUB_
29 CC := gcc
31 CFLAGS += -g
32 CFLAGS += -Wall
33 CFALGS += -Werror
34 CFLAGS += $(INCLUDES)
35 # Make gcc generate dependencies.
36 CFLAGS += -Wp,-MD,.$(@F).d
37 PROG_DEP = .*.d
39 #$(warning XFRD_PROG_OBJ= $(XFRD_PROG_OBJ))
40 #$(warning UTIL_LIB= $(UTIL_LIB))
41 #$(warning UTIL_LIB_OBJ= $(UTIL_LIB_OBJ))
43 # Libraries for xfrd.
44 XFRD_LIBS :=
46 XFRD_LIBS += -L $(XEN_LIBXC) -lxc
47 XFRD_LIBS += -L $(XEN_LIBXUTIL) -lxutil
49 # zlib library.
50 XFRD_LIBS += -lz
52 CURL_FLAGS = $(shell curl-config --cflags)
53 CURL_LIBS = $(shell curl-config --libs)
54 CFLAGS += $(CURL_FLAGS)
55 # libcurl libraries.
56 XFRD_LIBS += $(CURL_LIBS)
58 #$(warning XFRD_LIBS = $(XFRD_LIBS))
60 all: xfrd
62 xfrd: $(XFRD_PROG_OBJ)
63 $(CC) -o $@ $^ $(XFRD_LIBS)
65 .PHONY: install
66 install: xfrd
67 mkdir -p $(prefix)/$(XFRD_INSTALL_DIR)
68 install -m 0755 xfrd $(prefix)/$(XFRD_INSTALL_DIR)
70 .PHONY: libutil
71 libutil: $(UTIL_LIB)
73 $(UTIL_LIB): $(UTIL_LIB_OBJ)
74 $(AR) rc $@ $^
76 .PHONY: clean
77 clean:
78 $(RM) *.o *.a *.so *~ xfrd
79 $(RM) $(PROG_DEP)
81 $(XFRD_PROG_OBJ): Makefile
82 -include $(PROG_DEP)