debuggers.hg

view tools/console/Makefile @ 22018:d3de6f484610

split LDLIBS from LDFLAGS to fix link errors in recent toolchains

Linker command lines are order-sensitive.
Move linker options -Lfoo -lfoo from LDFLAGS to LDLIBS and place this new
variable after the objects to link. This resolves build errors in xenpagin
and blktap with recent toolchains.

rename SHLIB_CFLAGS to SHLIB_LDFLAGS
rename LDFLAGS_* to LDLIBS_*
move LDFLAGS usage after CFLAGS in CC calls
remove stale comments in xenpaging Makefile

Signed-off-by: Olaf Hering <olaf@aepfle.de>
Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
author Stefano Stabellini <sstabellini@xensource.com>
date Wed Aug 11 18:02:32 2010 +0100 (2010-08-11)
parents bd78714b8594
children
line source
2 XEN_ROOT=../..
3 include $(XEN_ROOT)/tools/Rules.mk
5 CFLAGS += -Werror
7 CFLAGS += $(CFLAGS_libxenctrl)
8 CFLAGS += $(CFLAGS_libxenstore)
9 LDLIBS += $(LDLIBS_libxenctrl)
10 LDLIBS += $(LDLIBS_libxenstore)
11 LDLIBS += $(UTIL_LIBS)
12 LDLIBS += $(SOCKET_LIBS)
13 LDLIBS += -lrt
15 BIN = xenconsoled xenconsole
17 .PHONY: all
18 all: $(BIN)
20 .PHONY: clean
21 clean:
22 $(RM) *.a *.so *.o *.rpm $(BIN) $(DEPS)
23 $(RM) client/*.o daemon/*.o
25 xenconsoled: $(patsubst %.c,%.o,$(wildcard daemon/*.c))
26 $(CC) $(CFLAGS) $^ -o $@ $(LDFLAGS) $(LDLIBS)
28 xenconsole: $(patsubst %.c,%.o,$(wildcard client/*.c))
29 $(CC) $(CFLAGS) $^ -o $@ $(LDFLAGS) $(LDLIBS)
31 .PHONY: install
32 install: $(BIN)
33 $(INSTALL_DIR) $(DESTDIR)/$(SBINDIR)
34 $(INSTALL_PROG) xenconsoled $(DESTDIR)/$(SBINDIR)
35 $(INSTALL_DIR) $(DESTDIR)$(PRIVATE_BINDIR)
36 $(INSTALL_PROG) xenconsole $(DESTDIR)$(PRIVATE_BINDIR)
38 -include $(DEPS)