ia64/xen-unstable

view tools/xfrd/Makefile @ 1820:3d4f8eb89670

bitkeeper revision 1.1106.1.2 (40faa780dekT3E5arFwcbQDu1MbX6g)

Cleaned up Xen's instruction emulator.
author kaf24@scramble.cl.cam.ac.uk
date Sun Jul 18 16:38:24 2004 +0000 (2004-07-18)
parents 095e969226c4
children c6f221100673 95fe6d53c5b8 24a435d26a6b 277bd0f6186d
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_HYPERVISOR_IFS)
13 INCLUDES += -I $(XEN_HYPERVISOR_IFS)
15 vpath %h $(XEN_LINUX_INCLUDE)
16 INCLUDES += -I $(XEN_LINUX_INCLUDE)
18 vpath %.h $(XEN_XU)
19 INCLUDES += -I $(XEN_XU)
21 vpath %.h $(XEN_LIBXC)
22 INCLUDES += -I $(XEN_LIBXC)
24 vpath %c $(XEN_LIBXUTIL)
25 INCLUDES += -I $(XEN_LIBXUTIL)
27 include Make.xfrd
29 UTIL_LIB_OBJ = $(UTIL_LIB_SRC:.c=.o)
31 XFRD_PROG_OBJ = $(XFRD_PROG_SRC:.c=.o)
32 XFRD_PROG_OBJ += $(UTIL_LIB)
34 # Flag controlling whether to use stubs.
35 # Define to use stubs, undefine to use the real Xen functions.
36 #CPPFLAGS += -D _XEN_XFR_STUB_
38 CFLAGS += -g
39 CFLAGS += -Wall
40 CFALGS += -Werror
41 CFLAGS += $(INCLUDES)
42 # Make gcc generate dependencies.
43 CFLAGS += -Wp,-MD,.$(@F).d
44 PROG_DEP = .*.d
46 #$(warning XFRD_PROG_OBJ= $(XFRD_PROG_OBJ))
47 #$(warning UTIL_LIB= $(UTIL_LIB))
48 #$(warning UTIL_LIB_OBJ= $(UTIL_LIB_OBJ))
50 # Libraries for xfrd.
51 XFRD_LIBS :=
53 XFRD_LIBS += -L $(XEN_LIBXC) -lxc
54 XFRD_LIBS += -L $(XEN_LIBXUTIL) -lxutil
56 # zlib library.
57 XFRD_LIBS += -lz
59 CURL_FLAGS = $(shell curl-config --cflags)
60 CURL_LIBS = $(shell curl-config --libs)
61 CFLAGS += $(CURL_FLAGS)
62 # libcurl libraries.
63 XFRD_LIBS += $(CURL_LIBS)
65 #$(warning XFRD_LIBS = $(XFRD_LIBS))
67 all: xfrd
69 xfrd: $(XFRD_PROG_OBJ)
70 $(CC) -o $@ $^ $(XFRD_LIBS)
72 .PHONY: install
73 install: xfrd
74 mkdir -p $(prefix)/$(XFRD_INSTALL_DIR)
75 install -m 0755 xfrd $(prefix)/$(XFRD_INSTALL_DIR)
77 .PHONY: libutil
78 libutil: $(UTIL_LIB)
80 $(UTIL_LIB): $(UTIL_LIB_OBJ)
81 $(AR) rc $@ $^
83 .PHONY: clean
84 clean:
85 $(RM) *.o *.a *.so *~ xfrd
86 $(RM) $(PROG_DEP)
88 $(XFRD_PROG_OBJ): Makefile
89 -include $(PROG_DEP)