ia64/xen-unstable

view tools/xfrd/Makefile @ 1921:24ecc060e9d7

bitkeeper revision 1.1108.21.1 (41062740xHG36OEbpVAmVX5N9WCaNw)

make vmlinuz really stripped
author cl349@freefall.cl.cam.ac.uk
date Tue Jul 27 09:58:24 2004 +0000 (2004-07-27)
parents 277bd0f6186d
children 664b8c51ecaa e59c333c2ba0
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 CC := gcc
40 CFLAGS += -g
41 CFLAGS += -Wall
42 CFALGS += -Werror
43 CFLAGS += $(INCLUDES)
44 # Make gcc generate dependencies.
45 CFLAGS += -Wp,-MD,.$(@F).d
46 PROG_DEP = .*.d
48 #$(warning XFRD_PROG_OBJ= $(XFRD_PROG_OBJ))
49 #$(warning UTIL_LIB= $(UTIL_LIB))
50 #$(warning UTIL_LIB_OBJ= $(UTIL_LIB_OBJ))
52 # Libraries for xfrd.
53 XFRD_LIBS :=
55 XFRD_LIBS += -L $(XEN_LIBXC) -lxc
56 XFRD_LIBS += -L $(XEN_LIBXUTIL) -lxutil
58 # zlib library.
59 XFRD_LIBS += -lz
61 CURL_FLAGS = $(shell curl-config --cflags)
62 CURL_LIBS = $(shell curl-config --libs)
63 CFLAGS += $(CURL_FLAGS)
64 # libcurl libraries.
65 XFRD_LIBS += $(CURL_LIBS)
67 #$(warning XFRD_LIBS = $(XFRD_LIBS))
69 all: xfrd
71 xfrd: $(XFRD_PROG_OBJ)
72 $(CC) -shared -o $@ $^ $(XFRD_LIBS)
74 .PHONY: install
75 install: xfrd
76 mkdir -p $(prefix)/$(XFRD_INSTALL_DIR)
77 install -m 0755 xfrd $(prefix)/$(XFRD_INSTALL_DIR)
79 .PHONY: libutil
80 libutil: $(UTIL_LIB)
82 $(UTIL_LIB): $(UTIL_LIB_OBJ)
83 $(AR) rc $@ $^
85 .PHONY: clean
86 clean:
87 $(RM) *.o *.a *.so *~ xfrd
88 $(RM) $(PROG_DEP)
90 $(XFRD_PROG_OBJ): Makefile
91 -include $(PROG_DEP)