ia64/xen-unstable

changeset 16910:ddf454872de4

Define CFLAGS and LDFLAGS for libxenctrl.

Signed-off-by: Bastian Blank <waldi@debian.org>
author Keir Fraser <keir.fraser@citrix.com>
date Sun Jan 27 12:57:14 2008 +0000 (2008-01-27)
parents 7e5bae3586ee
children 4bac220563b1
files tools/Rules.mk tools/blktap/drivers/Makefile tools/console/Makefile tools/debugger/xenitp/Makefile tools/flask/loadpolicy/Makefile tools/fs-back/Makefile tools/misc/Makefile tools/security/Makefile tools/xcutils/Makefile tools/xenmon/Makefile tools/xenstore/Makefile tools/xentrace/Makefile
line diff
     1.1 --- a/tools/Rules.mk	Sun Jan 27 12:53:56 2008 +0000
     1.2 +++ b/tools/Rules.mk	Sun Jan 27 12:57:14 2008 +0000
     1.3 @@ -11,6 +11,11 @@ XEN_LIBXC          = $(XEN_ROOT)/tools/l
     1.4  XEN_XENSTORE       = $(XEN_ROOT)/tools/xenstore
     1.5  XEN_LIBXENSTAT     = $(XEN_ROOT)/tools/xenstat/libxenstat/src
     1.6  
     1.7 +CFLAGS_include = -I$(XEN_INCLUDE)
     1.8 +
     1.9 +CFLAGS_libxenctrl = -I$(XEN_LIBXC) $(CFLAGS_include)
    1.10 +LDFLAGS_libxenctrl = -L$(XEN_LIBXC) -lxenctrl
    1.11 +
    1.12  X11_LDPATH = -L/usr/X11R6/$(LIBDIR)
    1.13  
    1.14  CFLAGS += -D__XEN_TOOLS__
     2.1 --- a/tools/blktap/drivers/Makefile	Sun Jan 27 12:53:56 2008 +0000
     2.2 +++ b/tools/blktap/drivers/Makefile	Sun Jan 27 12:57:14 2008 +0000
     2.3 @@ -9,7 +9,7 @@ LIBAIO_DIR   = ../../libaio/src
     2.4  
     2.5  CFLAGS   += -Werror
     2.6  CFLAGS   += -Wno-unused
     2.7 -CFLAGS   += -I $(XEN_LIBXC) -I $(LIBAIO_DIR)
     2.8 +CFLAGS   += $(CFLAGS_libxenctrl) -I $(LIBAIO_DIR)
     2.9  CFLAGS   += $(INCLUDES) -I. -I../../xenstore 
    2.10  CFLAGS   += -D_GNU_SOURCE
    2.11  
    2.12 @@ -18,7 +18,6 @@ CFLAGS   += -Wp,-MD,.$(@F).d
    2.13  DEPS      = .*.d
    2.14  
    2.15  LIBS      := -L. -L.. -L../lib
    2.16 -LIBS      += -L$(XEN_LIBXC)
    2.17  LIBS      += -Wl,-rpath-link,$(XEN_XENSTORE)
    2.18  
    2.19  LIBS_IMG  := $(LIBAIO_DIR)/libaio.a -lcrypto -lpthread -lz
    2.20 @@ -35,7 +34,7 @@ BLK-OBJS-$(CONFIG_Linux) += blk_linux.c
    2.21  all: $(IBIN) qcow-util
    2.22  
    2.23  blktapctrl: blktapctrl.c
    2.24 -	$(CC) $(CFLAGS) -o $@ $^ $(LDFLAGS) $(LIBS) -lblktap -lxenctrl
    2.25 +	$(CC) $(CFLAGS) -o $@ $^ $(LDFLAGS) $(LIBS) -lblktap $(LDFLAGS_libxenctrl)
    2.26  
    2.27  tapdisk: tapdisk.c $(BLK-OBJS-y) tapdisk.c
    2.28  	$(CC) $(CFLAGS) -o $@ $^ $(LDFLAGS) $(LIBS) $(LIBS_IMG)
     3.1 --- a/tools/console/Makefile	Sun Jan 27 12:53:56 2008 +0000
     3.2 +++ b/tools/console/Makefile	Sun Jan 27 12:57:14 2008 +0000
     3.3 @@ -4,9 +4,9 @@ include $(XEN_ROOT)/tools/Rules.mk
     3.4  
     3.5  CFLAGS  += -Werror
     3.6  
     3.7 -CFLAGS  += -I $(XEN_LIBXC)
     3.8 +CFLAGS  += $(CFLAGS_libxenctrl)
     3.9  CFLAGS  += -I $(XEN_XENSTORE)
    3.10 -CFLAGS  += -I $(XEN_INCLUDE)
    3.11 +LDFLAGS += $(LDFLAGS_libxenctrl)
    3.12  
    3.13  BIN      = xenconsoled xenconsole
    3.14  
    3.15 @@ -19,12 +19,12 @@ clean:
    3.16  	$(RM) client/*.o daemon/*.o
    3.17  
    3.18  xenconsoled: $(patsubst %.c,%.o,$(wildcard daemon/*.c))
    3.19 -	$(CC) $(CFLAGS) $^ -o $@ $(LDFLAGS) -L$(XEN_LIBXC) -L$(XEN_XENSTORE) \
    3.20 -              $(UTIL_LIBS) $(SOCKET_LIBS) -lxenctrl -lxenstore
    3.21 +	$(CC) $(CFLAGS) $^ -o $@ $(LDFLAGS) -L$(XEN_XENSTORE) \
    3.22 +              $(UTIL_LIBS) $(SOCKET_LIBS) -lxenstore
    3.23  
    3.24  xenconsole: $(patsubst %.c,%.o,$(wildcard client/*.c))
    3.25 -	$(CC) $(CFLAGS) $^ -o $@ $(LDFLAGS) -L$(XEN_LIBXC) -L$(XEN_XENSTORE) \
    3.26 -	      $(UTIL_LIBS) $(SOCKET_LIBS) -lxenctrl -lxenstore
    3.27 +	$(CC) $(CFLAGS) $^ -o $@ $(LDFLAGS) -L$(XEN_XENSTORE) \
    3.28 +	      $(UTIL_LIBS) $(SOCKET_LIBS) -lxenstore
    3.29  
    3.30  .PHONY: install
    3.31  install: $(BIN)
     4.1 --- a/tools/debugger/xenitp/Makefile	Sun Jan 27 12:53:56 2008 +0000
     4.2 +++ b/tools/debugger/xenitp/Makefile	Sun Jan 27 12:57:14 2008 +0000
     4.3 @@ -3,7 +3,7 @@ include $(XEN_ROOT)/tools/Rules.mk
     4.4  
     4.5  #CFLAGS  += -Werror -g -O0
     4.6  
     4.7 -CFLAGS  += -I $(XEN_LIBXC)
     4.8 +CFLAGS  += $(CFLAGS_libxenctrl)
     4.9  
    4.10  HDRS     = $(wildcard *.h)
    4.11  OBJS     = $(patsubst %.c,%.o,$(wildcard *.c))
    4.12 @@ -40,8 +40,8 @@ clean:
    4.13  	$(RM) *.a *.so *.o *.rpm $(BIN) $(LIBBIN)
    4.14  
    4.15  %: %.c $(HDRS) Makefile
    4.16 -	$(CC) $(CFLAGS) -o $@ $< -L$(XEN_LIBXC) -lxenctrl
    4.17 +	$(CC) $(CFLAGS) -o $@ $< $(LDFLAGS_libxenctrl)
    4.18  
    4.19  XENITP_OBJS=xenitp.o ia64-dis.o ia64-opc.o cpu-ia64-opc.o
    4.20  xenitp: $(XENITP_OBJS)
    4.21 -	$(CC) $(CFLAGS) -o $@ $(XENITP_OBJS) -L$(XEN_LIBXC) -lxenctrl
    4.22 +	$(CC) $(CFLAGS) -o $@ $(XENITP_OBJS) $(LDFLAGS_libxenctrl)
     5.1 --- a/tools/flask/loadpolicy/Makefile	Sun Jan 27 12:53:56 2008 +0000
     5.2 +++ b/tools/flask/loadpolicy/Makefile	Sun Jan 27 12:57:14 2008 +0000
     5.3 @@ -12,10 +12,9 @@ BASECFLAGS += -Wp,-MD,.$(@F).d
     5.4  PROG_DEP = .*.d
     5.5  BASECFLAGS+= $(PROFILE)
     5.6  #BASECFLAGS+= -I$(XEN_ROOT)/tools
     5.7 -BASECFLAGS+= -I$(LIBXC_ROOT)
     5.8 +BASECFLAGS+= $(CFLAGS_libxenctrl)
     5.9  BASECFLAGS+= -I$(LIBFLASK_ROOT)/include
    5.10  BASECFLAGS+= -I.
    5.11 -BASECFLAGS+= -I$(XEN_INCLUDE)
    5.12  
    5.13  CFLAGS  += $(BASECFLAGS)
    5.14  LDFLAGS += $(PROFILE) -L$(XEN_LIBXC) -L$(LIBFLASK_ROOT)
    5.15 @@ -31,7 +30,7 @@ CLIENTS_OBJS := $(patsubst flask-%,%.o,$
    5.16  all: $(CLIENTS)
    5.17  
    5.18  $(CLIENTS): flask-%: %.o
    5.19 -	$(CC) $(CFLAGS) $(LDFLAGS) $< $(LOADLIBES) $(LDLIBS) -L. -lflask -lxenctrl -o $@
    5.20 +	$(CC) $(CFLAGS) $(LDFLAGS) $< $(LOADLIBES) $(LDLIBS) -L. -lflask $(LDFLAGS_libxenctrl) -o $@
    5.21  
    5.22  $(CLIENTS_OBJS): $(CLIENTS_SRCS)
    5.23  	$(COMPILE.c) -o $@ $<
     6.1 --- a/tools/fs-back/Makefile	Sun Jan 27 12:53:56 2008 +0000
     6.2 +++ b/tools/fs-back/Makefile	Sun Jan 27 12:57:14 2008 +0000
     6.3 @@ -8,7 +8,7 @@ IBIN         = fs-backend
     6.4  CFLAGS   += -Werror
     6.5  CFLAGS   += -Wno-unused
     6.6  CFLAGS   += -fno-strict-aliasing
     6.7 -CFLAGS   += -I $(XEN_LIBXC)
     6.8 +CFLAGS   += $(CFLAGS_libxenctrl)
     6.9  CFLAGS   += $(INCLUDES) -I. -I../xenstore 
    6.10  CFLAGS   += -D_GNU_SOURCE
    6.11  
    6.12 @@ -17,8 +17,8 @@ CFLAGS   += -Wp,-MD,.$(@F).d
    6.13  DEPS      = .*.d
    6.14  
    6.15  LIBS      := -L. -L.. -L../lib
    6.16 -LIBS      += -L$(XEN_LIBXC)
    6.17 -LIBS      += -lxenctrl -lpthread -lrt 
    6.18 +LIBS      += $(LDFLAGS_libxenctrl)
    6.19 +LIBS      += -lpthread -lrt 
    6.20  LIBS      += -L$(XEN_XENSTORE) -lxenstore
    6.21  
    6.22  OBJS	  := fs-xenbus.o fs-ops.o
     7.1 --- a/tools/misc/Makefile	Sun Jan 27 12:53:56 2008 +0000
     7.2 +++ b/tools/misc/Makefile	Sun Jan 27 12:57:14 2008 +0000
     7.3 @@ -45,4 +45,4 @@ clean:
     7.4  	$(CC) -c $(CFLAGS) -o $@ $<
     7.5  
     7.6  xenperf: %: %.o Makefile
     7.7 -	$(CC) $(CFLAGS) -o $@ $< $(LDFLAGS) -L$(XEN_LIBXC) -lxenctrl
     7.8 +	$(CC) $(CFLAGS) -o $@ $< $(LDFLAGS) $(LDFLAGS_libxenctrl)
     8.1 --- a/tools/security/Makefile	Sun Jan 27 12:53:56 2008 +0000
     8.2 +++ b/tools/security/Makefile	Sun Jan 27 12:57:14 2008 +0000
     8.3 @@ -3,7 +3,7 @@ include $(XEN_ROOT)/tools/Rules.mk
     8.4  
     8.5  CFLAGS   += -Werror
     8.6  CFLAGS   += -fno-strict-aliasing
     8.7 -CFLAGS   += -I. -I $(XEN_LIBXC)
     8.8 +CFLAGS   += -I. $(CFLAGS_libxenctrl)
     8.9  
    8.10  CPPFLAGS += -MMD -MF .$*.d
    8.11  PROG_DEPS = .*.d
    8.12 @@ -82,7 +82,7 @@ build: $(ACM_INST_TOOLS) $(ACM_NOINST_TO
    8.13  	chmod 700 $(ACM_SCRIPTS)
    8.14  
    8.15  xensec_tool: $(OBJS_TOOL)
    8.16 -	$(CC) -g $(CFLAGS) $(LDFLAGS) -O0 -o $@ $^ -L$(XEN_LIBXC) -lxenctrl
    8.17 +	$(CC) -g $(CFLAGS) $(LDFLAGS) -O0 -o $@ $^ $(LDFLAGS_libxenctrl)
    8.18  
    8.19  xensec_gen: xensec_gen.py
    8.20  	cp -f $^ $@
     9.1 --- a/tools/xcutils/Makefile	Sun Jan 27 12:53:56 2008 +0000
     9.2 +++ b/tools/xcutils/Makefile	Sun Jan 27 12:57:14 2008 +0000
     9.3 @@ -11,7 +11,7 @@
     9.4  XEN_ROOT	= ../..
     9.5  include $(XEN_ROOT)/tools/Rules.mk
     9.6  
     9.7 -INCLUDES += -I $(XEN_LIBXC) -I $(XEN_XENSTORE) -I$(XEN_INCLUDE)
     9.8 +INCLUDES += $(CFLAGS_libxenctrl) -I $(XEN_XENSTORE) -I$(XEN_INCLUDE)
     9.9  
    9.10  CFLAGS += -Werror
    9.11  CFLAGS += $(INCLUDES)
    9.12 @@ -22,7 +22,7 @@ PROG_DEP = .*.d
    9.13  
    9.14  PROGRAMS = xc_restore xc_save readnotes
    9.15  
    9.16 -LDLIBS   = -L$(XEN_LIBXC) -L$(XEN_XENSTORE) -lxenguest -lxenctrl -lxenstore
    9.17 +LDLIBS   = $(LDFLAGS_libxenctrl) -L$(XEN_XENSTORE) -lxenguest -lxenstore
    9.18  
    9.19  .PHONY: all
    9.20  all: build
    10.1 --- a/tools/xenmon/Makefile	Sun Jan 27 12:53:56 2008 +0000
    10.2 +++ b/tools/xenmon/Makefile	Sun Jan 27 12:57:14 2008 +0000
    10.3 @@ -15,9 +15,8 @@ include $(XEN_ROOT)/tools/Rules.mk
    10.4  
    10.5  CFLAGS  += -Werror
    10.6  CFLAGS  += -I $(XEN_XC)
    10.7 -CFLAGS  += -I $(XEN_LIBXC)
    10.8 -CFLAGS  += -I $(XEN_INCLUDE)
    10.9 -LDFLAGS += -L $(XEN_LIBXC)
   10.10 +CFLAGS  += $(CFLAGS_libxenctrl)
   10.11 +LDFLAGS += $(LDFLAGS_libxenctrl)
   10.12  
   10.13  BIN = xentrace_setmask xenbaked
   10.14  SCRIPTS = xenmon.py
   10.15 @@ -41,6 +40,6 @@ clean:
   10.16  
   10.17  
   10.18  %: %.c Makefile
   10.19 -	$(CC) $(CFLAGS) $(LDFLAGS) -lxenctrl -o $@ $<
   10.20 +	$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $<
   10.21  xentrace_%: %.c Makefile
   10.22 -	$(CC) $(CFLAGS) $(LDFLAGS) -lxenctrl -o $@ $<
   10.23 +	$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $<
    11.1 --- a/tools/xenstore/Makefile	Sun Jan 27 12:53:56 2008 +0000
    11.2 +++ b/tools/xenstore/Makefile	Sun Jan 27 12:57:14 2008 +0000
    11.3 @@ -11,12 +11,11 @@ BASECFLAGS=-Werror
    11.4  BASECFLAGS += -Wp,-MD,.$(@F).d
    11.5  PROG_DEP = .*.d
    11.6  BASECFLAGS+= $(PROFILE)
    11.7 -BASECFLAGS+= -I$(XEN_ROOT)/tools/libxc
    11.8 +BASECFLAGS+= $(CFLAGS_libxenctrl)
    11.9  BASECFLAGS+= -I.
   11.10 -BASECFLAGS+= -I$(XEN_INCLUDE)
   11.11  
   11.12  CFLAGS  += $(BASECFLAGS)
   11.13 -LDFLAGS += $(PROFILE) -L$(XEN_LIBXC)
   11.14 +LDFLAGS += $(PROFILE)
   11.15  
   11.16  CLIENTS := xenstore-exists xenstore-list xenstore-read xenstore-rm xenstore-chmod
   11.17  CLIENTS += xenstore-write
   11.18 @@ -34,7 +33,7 @@ XENSTORED_OBJS += $(XENSTORED_OBJS_y)
   11.19  all: libxenstore.so libxenstore.a xenstored $(CLIENTS) xs_tdb_dump xenstore-control xenstore-ls
   11.20  
   11.21  xenstored: $(XENSTORED_OBJS)
   11.22 -	$(CC) $(CFLAGS) $(LDFLAGS) $^ $(LOADLIBES) $(LDLIBS) -lxenctrl $(SOCKET_LIBS) -o $@
   11.23 +	$(CC) $(CFLAGS) $(LDFLAGS) $^ $(LOADLIBES) $(LDLIBS) $(LDFLAGS_libxenctrl) $(SOCKET_LIBS) -o $@
   11.24  
   11.25  $(CLIENTS): xenstore-%: xenstore_%.o libxenstore.so
   11.26  	$(CC) $(CFLAGS) $(LDFLAGS) $< $(LOADLIBES) $(LDLIBS) -L. -lxenstore $(SOCKET_LIBS) -o $@
    12.1 --- a/tools/xentrace/Makefile	Sun Jan 27 12:53:56 2008 +0000
    12.2 +++ b/tools/xentrace/Makefile	Sun Jan 27 12:57:14 2008 +0000
    12.3 @@ -3,9 +3,8 @@ include $(XEN_ROOT)/tools/Rules.mk
    12.4  
    12.5  CFLAGS  += -Werror
    12.6  
    12.7 -CFLAGS  += -I $(XEN_XC)
    12.8 -CFLAGS  += -I $(XEN_LIBXC)
    12.9 -CFLAGS  += -I $(XEN_INCLUDE)
   12.10 +CFLAGS  += $(CFLAGS_libxenctrl)
   12.11 +LDFLAGS += $(LDFLAGS_libxenctrl)
   12.12  
   12.13  HDRS     = $(wildcard *.h)
   12.14  OBJS     = $(patsubst %.c,%.o,$(wildcard *.c))
   12.15 @@ -50,6 +49,6 @@ clean:
   12.16  	$(RM) *.a *.so *.o *.rpm $(BIN) $(LIBBIN)
   12.17  
   12.18  %: %.c $(HDRS) Makefile
   12.19 -	$(CC) $(CFLAGS) -o $@ $< -L$(XEN_LIBXC) $(LDFLAGS) -lxenctrl
   12.20 +	$(CC) $(CFLAGS) -o $@ $< $(LDFLAGS)
   12.21  xentrace_%: %.c $(HDRS) Makefile
   12.22 -	$(CC) $(CFLAGS) -o $@ $< -L$(XEN_LIBXC) $(LDFLAGS) -lxenctrl
   12.23 +	$(CC) $(CFLAGS) -o $@ $< $(LDFLAGS)