ia64/xen-unstable

changeset 17214:e534d7c9029c

Clean up xenstore Makefile.

Signed-off-by: Bastian Blank <waldi@debian.org>
author Keir Fraser <keir.fraser@citrix.com>
date Mon Mar 17 10:58:12 2008 +0000 (2008-03-17)
parents fea44c1d3e41
children f71f2bcb6cd6
files tools/xenstore/Makefile
line diff
     1.1 --- a/tools/xenstore/Makefile	Mon Mar 17 10:57:59 2008 +0000
     1.2 +++ b/tools/xenstore/Makefile	Mon Mar 17 10:58:12 2008 +0000
     1.3 @@ -1,21 +1,16 @@
     1.4  XEN_ROOT=../..
     1.5  include $(XEN_ROOT)/tools/Rules.mk
     1.6 -XEN_LIBXC          = $(XEN_ROOT)/tools/libxc
     1.7  
     1.8  MAJOR = 3.0
     1.9  MINOR = 0
    1.10  
    1.11 -PROFILE=#-pg
    1.12 -BASECFLAGS=-Werror
    1.13 +CFLAGS += -Werror
    1.14 +CFLAGS += -I.
    1.15 +CFLAGS += $(CFLAGS_libxenctrl)
    1.16 +
    1.17  # Make gcc generate dependencies.
    1.18 -BASECFLAGS += -Wp,-MD,.$(@F).d
    1.19 -PROG_DEP = .*.d
    1.20 -BASECFLAGS+= $(PROFILE)
    1.21 -BASECFLAGS+= $(CFLAGS_libxenctrl)
    1.22 -BASECFLAGS+= -I.
    1.23 -
    1.24 -CFLAGS  += $(BASECFLAGS)
    1.25 -LDFLAGS += $(PROFILE)
    1.26 +CFLAGS += -Wp,-MD,.$(@F).d
    1.27 +DEP    = .*.d
    1.28  
    1.29  CLIENTS := xenstore-exists xenstore-list xenstore-read xenstore-rm xenstore-chmod
    1.30  CLIENTS += xenstore-write
    1.31 @@ -45,22 +40,22 @@ CFLAGS += -DHAVE_DTRACE=1
    1.32  endif
    1.33   
    1.34  xenstored: $(XENSTORED_OBJS)
    1.35 -	$(CC) $(CFLAGS) $(LDFLAGS) $^ $(LOADLIBES) $(LDLIBS) $(LDFLAGS_libxenctrl) $(SOCKET_LIBS) -o $@
    1.36 +	$(CC) $(CFLAGS) $(LDFLAGS) $^ $(LDFLAGS_libxenctrl) $(SOCKET_LIBS) -o $@
    1.37  
    1.38  $(CLIENTS): xenstore-%: xenstore_%.o libxenstore.so
    1.39 -	$(CC) $(CFLAGS) $(LDFLAGS) $< $(LOADLIBES) $(LDLIBS) -L. -lxenstore $(SOCKET_LIBS) -o $@
    1.40 +	$(CC) $(CFLAGS) $(LDFLAGS) $< -L. -lxenstore $(SOCKET_LIBS) -o $@
    1.41  
    1.42  $(CLIENTS_OBJS): xenstore_%.o: xenstore_client.c
    1.43  	$(COMPILE.c) -DCLIENT_$(*F) -o $@ $<
    1.44  
    1.45  xenstore-control: xenstore_control.o libxenstore.so
    1.46 -	$(CC) $(CFLAGS) $(LDFLAGS) $< $(LOADLIBES) $(LDLIBS) -L. -lxenstore $(SOCKET_LIBS) -o $@
    1.47 +	$(CC) $(CFLAGS) $(LDFLAGS) $< -L. -lxenstore $(SOCKET_LIBS) -o $@
    1.48  
    1.49  xenstore-ls: xsls.o libxenstore.so
    1.50 -	$(CC) $(CFLAGS) $(LDFLAGS) $< $(LOADLIBES) $(LDLIBS) -L. -lxenstore $(SOCKET_LIBS) -o $@
    1.51 +	$(CC) $(CFLAGS) $(LDFLAGS) $< -L. -lxenstore $(SOCKET_LIBS) -o $@
    1.52  
    1.53  xs_tdb_dump: xs_tdb_dump.o utils.o tdb.o talloc.o
    1.54 -	$(CC) $(CFLAGS) $(LDFLAGS) $^ $(LOADLIBES) $(LDLIBS) -o $@
    1.55 +	$(CC) $(CFLAGS) $(LDFLAGS) $^ -o $@
    1.56  
    1.57  libxenstore.so: libxenstore.so.$(MAJOR)
    1.58  	ln -sf $< $@
    1.59 @@ -71,7 +66,7 @@ libxenstore.so.$(MAJOR).$(MINOR): xs.opi
    1.60  	$(CC) $(CFLAGS) $(LDFLAGS) -Wl,$(SONAME_LDFLAG) -Wl,libxenstore.so.$(MAJOR) $(SHLIB_CFLAGS) -o $@ $^ $(SOCKET_LIBS) -lpthread
    1.61  
    1.62  libxenstore.a: xs.o xs_lib.o
    1.63 -	$(AR) rcs libxenstore.a $^
    1.64 +	$(AR) rcs $@ $^
    1.65  
    1.66  .PHONY: clean
    1.67  clean:
    1.68 @@ -79,7 +74,7 @@ clean:
    1.69  	rm -f xenstored xs_random xs_stress xs_crashme
    1.70  	rm -f xs_tdb_dump xenstore-control xenstore-ls
    1.71  	rm -f $(CLIENTS)
    1.72 -	$(RM) $(PROG_DEP)
    1.73 +	$(RM) $(DEP)
    1.74  
    1.75  .PHONY: TAGS
    1.76  TAGS:
    1.77 @@ -108,7 +103,7 @@ install: all
    1.78  	$(INSTALL_DATA) xs.h $(DESTDIR)$(INCLUDEDIR)
    1.79  	$(INSTALL_DATA) xs_lib.h $(DESTDIR)$(INCLUDEDIR)
    1.80  
    1.81 --include $(PROG_DEP)
    1.82 +-include $(DEP)
    1.83  
    1.84  # never delete any intermediate files.
    1.85  .SECONDARY: