ia64/xen-unstable

view tools/xfrd/Makefile @ 2422:2274a0386cc9

bitkeeper revision 1.1159.69.5 (4138e882jA1YaR_OfTfNHe_uT4PDIg)

trivial
author iap10@labyrinth.cl.cam.ac.uk
date Fri Sep 03 21:56:18 2004 +0000 (2004-09-03)
parents dae98734f12e
children a5c335665fd6 3f929065a1d1 0a4b76b6b5a0
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_LIBXC)
19 INCLUDES += -I $(XEN_LIBXC)
21 vpath %c $(XEN_LIBXUTIL)
22 INCLUDES += -I $(XEN_LIBXUTIL)
24 include Make.xfrd
26 UTIL_LIB_OBJ = $(UTIL_LIB_SRC:.c=.o)
28 XFRD_PROG_OBJ = $(XFRD_PROG_SRC:.c=.o)
29 XFRD_PROG_OBJ += $(UTIL_LIB)
31 # Flag controlling whether to use stubs.
32 # Define to use stubs, undefine to use the real Xen functions.
33 #CPPFLAGS += -D _XEN_XFR_STUB_
35 CC := gcc
37 CFLAGS += -g
38 CFLAGS += -Wall
39 CFALGS += -Werror
40 CFLAGS += $(INCLUDES)
41 # Make gcc generate dependencies.
42 CFLAGS += -Wp,-MD,.$(@F).d
43 PROG_DEP = .*.d
45 #$(warning XFRD_PROG_OBJ= $(XFRD_PROG_OBJ))
46 #$(warning UTIL_LIB= $(UTIL_LIB))
47 #$(warning UTIL_LIB_OBJ= $(UTIL_LIB_OBJ))
49 # Libraries for xfrd.
50 XFRD_LIBS :=
52 XFRD_LIBS += -L $(XEN_LIBXC) -lxc
53 XFRD_LIBS += -L $(XEN_LIBXUTIL) -lxutil
55 # zlib library.
56 XFRD_LIBS += -lz
58 CURL_FLAGS = $(shell curl-config --cflags)
59 CURL_LIBS = $(shell curl-config --libs)
60 CFLAGS += $(CURL_FLAGS)
61 # libcurl libraries.
62 XFRD_LIBS += $(CURL_LIBS)
64 #$(warning XFRD_LIBS = $(XFRD_LIBS))
66 all: xfrd
68 xfrd: $(XFRD_PROG_OBJ)
69 $(CC) -o $@ $^ $(XFRD_LIBS)
71 .PHONY: install
72 install: xfrd
73 mkdir -p $(prefix)/$(XFRD_INSTALL_DIR)
74 install -m 0755 xfrd $(prefix)/$(XFRD_INSTALL_DIR)
76 .PHONY: libutil
77 libutil: $(UTIL_LIB)
79 $(UTIL_LIB): $(UTIL_LIB_OBJ)
80 $(AR) rc $@ $^
82 .PHONY: clean
83 clean:
84 $(RM) *.o *.a *.so *~ xfrd
85 $(RM) $(PROG_DEP)
87 $(XFRD_PROG_OBJ): Makefile
88 -include $(PROG_DEP)