ia64/xen-unstable

view tools/xfrd/Makefile @ 3498:1d24a5b0b338

bitkeeper revision 1.1159.223.25 (41f2cb9aEKMZkZbvqBE0eXhpljlV4Q)

Description: fix path to python
There is no python2 in debian. Instead, use python.

From: Adam Heath <doogie@brainfood.com>
Signed-off-by: ian.pratt@cl.cam.ac.uk
author iap10@labyrinth.cl.cam.ac.uk
date Sat Jan 22 21:54:34 2005 +0000 (2005-01-22)
parents 77ecf0226c2c
children 78b5439ce414
line source
1 # -*- mode: Makefile; -*-
2 #============================================================================
3 #
4 # Mike Wray <mike.wray@hp.com>
5 #============================================================================
7 INSTALL = install
8 INSTALL_PROG = $(INSTALL) -m0755
9 INSTALL_DIR = $(INSTALL) -d -m0755
11 XEN_ROOT = ../..
12 include $(XEN_ROOT)/tools/Make.defs
14 XFRD_INSTALL_DIR = /usr/sbin
16 vpath %.h $(XEN_LIBXC)
17 INCLUDES += -I $(XEN_LIBXC)
19 vpath %c $(XEN_LIBXUTIL)
20 INCLUDES += -I $(XEN_LIBXUTIL)
22 include Make.xfrd
24 UTIL_LIB_OBJ = $(UTIL_LIB_SRC:.c=.o)
26 XFRD_PROG_OBJ = $(XFRD_PROG_SRC:.c=.o)
27 XFRD_PROG_OBJ += $(UTIL_LIB)
29 # Flag controlling whether to use stubs.
30 # Define to use stubs, undefine to use the real Xen functions.
31 #CPPFLAGS += -D _XEN_XFR_STUB_
33 ifeq ($(SXPR_DEBUG),1)
34 CPPFLAGS += -D _XEN_XFR_STUB_ -D SXPR_PARSER_MAIN
35 endif
37 CC := gcc
39 CFLAGS += -g
40 CFLAGS += -Wall
41 CFLAGS += -Werror
42 CFLAGS += $(INCLUDES)
43 # Make gcc generate dependencies.
44 CFLAGS += -Wp,-MD,.$(@F).d
45 PROG_DEP = .*.d
47 #$(warning XFRD_PROG_OBJ= $(XFRD_PROG_OBJ))
48 #$(warning UTIL_LIB= $(UTIL_LIB))
49 #$(warning UTIL_LIB_OBJ= $(UTIL_LIB_OBJ))
51 # Libraries for xfrd.
52 XFRD_LIBS :=
54 XFRD_LIBS += -L $(XEN_LIBXC) -lxc
55 XFRD_LIBS += -L $(XEN_LIBXUTIL) -lxutil
57 # zlib library.
58 XFRD_LIBS += -lz
60 CURL_FLAGS = $(shell curl-config --cflags)
61 CURL_LIBS = $(shell curl-config --libs)
62 CFLAGS += $(CURL_FLAGS)
63 # libcurl libraries.
64 XFRD_LIBS += $(CURL_LIBS)
66 #$(warning XFRD_LIBS = $(XFRD_LIBS))
68 all: xfrd
70 xfrd: $(XFRD_PROG_OBJ)
71 $(CC) -o $@ $^ $(XFRD_LIBS)
73 .PHONY: install
74 install: xfrd
75 $(INSTALL_DIR) $(prefix)/$(XFRD_INSTALL_DIR)
76 $(INSTALL_PROG) xfrd $(prefix)/$(XFRD_INSTALL_DIR)
78 .PHONY: libutil
79 libutil: $(UTIL_LIB)
81 $(UTIL_LIB): $(UTIL_LIB_OBJ)
82 $(AR) rc $@ $^
84 .PHONY: clean
85 clean:
86 $(RM) *.o *.a *.so *~ xfrd
87 $(RM) $(PROG_DEP)
89 $(XFRD_PROG_OBJ): Makefile
90 -include $(PROG_DEP)