debuggers.hg

view tools/xfrd/Makefile @ 3601:25f3f22927e9

bitkeeper revision 1.1159.1.539 (41f925edsOM-7RHXmwoPRFfYwoxtEw)

Merge tempest.cl.cam.ac.uk:/auto/groups/xeno-xenod/BK/xeno.bk
into tempest.cl.cam.ac.uk:/local/scratch/smh22/xen-unstable.bk
author smh22@tempest.cl.cam.ac.uk
date Thu Jan 27 17:33:33 2005 +0000 (2005-01-27)
parents d8ba911dce48 a26c121cabd0
children bc0fbb38cb25
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/Rules.mk
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 += -Wall -Werror -O3 -fno-strict-aliasing
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 $(INSTALL_DIR) $(DESTDIR)$(XFRD_INSTALL_DIR)
74 $(INSTALL_PROG) xfrd $(DESTDIR)$(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)