From 9163062a39392405ddb306bad0f9425ab7c0002c Mon Sep 17 00:00:00 2001 From: Roger Pau Monne Date: Mon, 14 Nov 2011 18:14:07 +0000 Subject: tools/build: Introduce {PREPEND,APPEND}_{LIB,INCLUDES} Create two new variables called APPEND_ and PREPEND_ to add compile flags at the beginning or at the end of the search path. Added a new semantic for user defined compile flags, here is the list of possible options: PREPEND_LIB: add libraries to the search path before xen (before xen installation folders). PREPEND_INCLUDES: add headers to the search path before xen (before xen installation folders). APPEND_LIB: add libraries to the search path at the end (after all xen installation folders have been added). APPEND_INCLUDES: add libraries to the search path at the end (after all xen installation folders have been added). EXTRA_INCLUDES and EXTRA_LIB can still be used, and they will have the same effect as PREPEND_INCLUDES and PREPEND_LIB. Signed-off-by: Roger Pau Monne Committed-by: Ian Jackson --- tools/libvchan/Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'tools/libvchan') diff --git a/tools/libvchan/Makefile b/tools/libvchan/Makefile index daf3593930..3896ac1bd5 100644 --- a/tools/libvchan/Makefile +++ b/tools/libvchan/Makefile @@ -29,16 +29,16 @@ libxenvchan.so.$(MAJOR): libxenvchan.so.$(MAJOR).$(MINOR) ln -sf $< $@ libxenvchan.so.$(MAJOR).$(MINOR): $(LIBVCHAN_PIC_OBJS) - $(CC) $(LDFLAGS) -Wl,$(SONAME_LDFLAG) -Wl,libxenvchan.so.$(MAJOR) $(SHLIB_LDFLAGS) -o $@ $^ $(LIBVCHAN_LIBS) + $(CC) $(LDFLAGS) -Wl,$(SONAME_LDFLAG) -Wl,libxenvchan.so.$(MAJOR) $(SHLIB_LDFLAGS) -o $@ $^ $(LIBVCHAN_LIBS) $(APPEND_LDFLAGS) libxenvchan.a: $(LIBVCHAN_OBJS) $(AR) rcs libxenvchan.a $^ vchan-node1: $(NODE_OBJS) libxenvchan.so - $(CC) $(LDFLAGS) -o $@ $(NODE_OBJS) $(LDLIBS_libxenvchan) + $(CC) $(LDFLAGS) -o $@ $(NODE_OBJS) $(LDLIBS_libxenvchan) $(APPEND_LDFLAGS) vchan-node2: $(NODE2_OBJS) libxenvchan.so - $(CC) $(LDFLAGS) -o $@ $(NODE2_OBJS) $(LDLIBS_libxenvchan) + $(CC) $(LDFLAGS) -o $@ $(NODE2_OBJS) $(LDLIBS_libxenvchan) $(APPEND_LDFLAGS) .PHONY: install install: all -- cgit v1.2.3