[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH 30 of 30] tools: remove pattern matched linking rules
# HG changeset patch # User Ian Campbell <ian.campbell@xxxxxxxxxx> # Date 1300718506 0 # Node ID 26ba6a80310af7c3b360d4b78da8f3ff7188a9e8 # Parent 7a4eb10b336b127e480750969ef03eea04f4b161 tools: remove pattern matched linking rules Most subdirs only build a single tool to start with and those which build multiple tools often have different linkage requirements. Signed-off-by: Ian Campbell <ian.campbell@xxxxxxxxxx> diff -r 7a4eb10b336b -r 26ba6a80310a tools/debugger/xenitp/Makefile --- a/tools/debugger/xenitp/Makefile Mon Mar 21 14:41:46 2011 +0000 +++ b/tools/debugger/xenitp/Makefile Mon Mar 21 14:41:46 2011 +0000 @@ -5,14 +5,7 @@ include $(XEN_ROOT)/tools/Rules.mk CFLAGS += $(CFLAGS_libxenctrl) -HDRS = $(wildcard *.h) -OBJS = $(patsubst %.c,%.o,$(wildcard *.c)) - -BIN = LIBBIN = -SCRIPTS = -MAN1 = $(wildcard *.1) -MAN8 = $(wildcard *.8) ifeq ($(XEN_TARGET_ARCH),ia64) LIBBIN += xenitp @@ -22,32 +15,18 @@ all: build all: build .PHONY: build -build: $(BIN) $(LIBBIN) +build: $(LIBBIN) .PHONY: install install: build - $(INSTALL_DIR) $(DESTDIR)$(BINDIR) [ -z "$(LIBBIN)" ] || $(INSTALL_DIR) $(DESTDIR)$(PRIVATE_BINDIR) - $(INSTALL_DIR) $(DESTDIR)$(MAN1DIR) - $(INSTALL_DIR) $(DESTDIR)$(MAN8DIR) - if [ "x$(SCRIPTS)" != "x" ]; then \ - $(INSTALL_PROG) $(BIN) $(SCRIPTS) $(DESTDIR)$(BINDIR); \ - fi [ -z "$(LIBBIN)" ] || $(INSTALL_PROG) $(LIBBIN) $(DESTDIR)$(PRIVATE_BINDIR) - if [ "x$(MAN1)" != "x" ]; then \ - $(INSTALL_DATA) $(MAN1) $(DESTDIR)$(MAN1DIR); \ - fi - if [ "x$(MAN1)" != "x" ]; then \ - $(INSTALL_DATA) $(MAN8) $(DESTDIR)$(MAN8DIR); \ - fi .PHONY: clean clean: - $(RM) *.a *.so *.o *.rpm $(BIN) $(LIBBIN) - -%: %.c $(HDRS) Makefile - $(CC) $(CFLAGS) -o $@ $< $(LDLIBS_libxenctrl) + $(RM) *.a *.so *.o *.rpm $(LIBBIN) XENITP_OBJS=xenitp.o ia64-dis.o ia64-opc.o cpu-ia64-opc.o + xenitp: $(XENITP_OBJS) $(CC) $(CFLAGS) -o $@ $(XENITP_OBJS) $(LDLIBS_libxenctrl) diff -r 7a4eb10b336b -r 26ba6a80310a tools/flask/utils/Makefile --- a/tools/flask/utils/Makefile Mon Mar 21 14:41:46 2011 +0000 +++ b/tools/flask/utils/Makefile Mon Mar 21 14:41:46 2011 +0000 @@ -18,7 +18,13 @@ CLIENTS_OBJS := $(patsubst flask-%,%.o,$ .PHONY: all all: $(CLIENTS) -$(CLIENTS): flask-%: %.o +flask-loadpolicy: loadpolicy.o + $(CC) $(LDFLAGS) $< $(LDLIBS) -L$(LIBFLASK_ROOT) -lflask $(LDLIBS_libxenctrl) -o $@ + +flask-setenforce: setenforce.o + $(CC) $(LDFLAGS) $< $(LDLIBS) -L$(LIBFLASK_ROOT) -lflask $(LDLIBS_libxenctrl) -o $@ + +flask-getenforce: getenforce.o $(CC) $(LDFLAGS) $< $(LDLIBS) -L$(LIBFLASK_ROOT) -lflask $(LDLIBS_libxenctrl) -o $@ .PHONY: clean @@ -41,6 +47,3 @@ install: all $(INSTALL_PROG) $(CLIENTS) $(DESTDIR)$(SBINDIR) -include $(DEPS) - -# never delete any intermediate files. -.SECONDARY: diff -r 7a4eb10b336b -r 26ba6a80310a tools/misc/Makefile --- a/tools/misc/Makefile Mon Mar 21 14:41:46 2011 +0000 +++ b/tools/misc/Makefile Mon Mar 21 14:41:46 2011 +0000 @@ -12,14 +12,6 @@ TARGETS-$(CONFIG_X86) += xen-detect xen- TARGETS-$(CONFIG_X86) += xen-detect xen-hvmctx xen-hvmcrash TARGETS-$(CONFIG_MIGRATE) += xen-hptool TARGETS := $(TARGETS-y) - -LDLIBS_xenperf := $(LDLIBS_libxenctrl) -LDLIBS_xenpm := $(LDLIBS_libxenctrl) -LDLIBS_xenlockprof := $(LDLIBS_libxenctrl) -LDLIBS_xenwatchdogd := $(LDLIBS_libxenctrl) -LDLIBS_xen-hvmctx := $(LDLIBS_libxenctrl) -LDLIBS_xen-hvmcrash := $(LDLIBS_libxenctrl) -LDLIBS_xen-hptool := $(LDLIBS_libxenctrl) $(LDLIBS_libxenguest) $(LDLIBS_libxenstore) SUBDIRS-$(CONFIG_LOMOUNT) += lomount SUBDIRS-$(CONFIG_MINITERM) += miniterm @@ -54,13 +46,31 @@ clean: $(RM) *.o $(TARGETS) *~ $(DEPS) set -e; for d in $(SUBDIRS); do $(MAKE) -C $$d clean; done -%.o: %.c $(HDRS) Makefile - $(CC) -c $(CFLAGS) -o $@ $< +xen-hvmctx: xen-hvmctx.o + $(CC) $(LDFLAGS) -o $@ $< $(LDLIBS_libxenctrl) -xen-hvmctx xen-hvmcrash xenperf xenpm gtracestat xenlockprof xen-hptool xenwatchdogd: %: %.o Makefile - $(CC) $(LDFLAGS) -o $@ $< $(LDLIBS_$*) +xen-hvmcrash: xen-hvmcrash.o + $(CC) $(LDFLAGS) -o $@ $< $(LDLIBS_libxenctrl) -gtraceview: %: %.o Makefile +xenperf: xenperf.o + $(CC) $(LDFLAGS) -o $@ $< $(LDLIBS_libxenctrl) + +xenpm: xenpm.o + $(CC) $(LDFLAGS) -o $@ $< $(LDLIBS_libxenctrl) + +gtracestat: gtracestat.o + $(CC) $(LDFLAGS) -o $@ $< + +xenlockprof: xenlockprof.o + $(CC) $(LDFLAGS) -o $@ $< $(LDLIBS_libxenctrl) + +xen-hptool: xen-hptool.o + $(CC) $(LDFLAGS) -o $@ $< $(LDLIBS_libxenctrl) $(LDLIBS_libxenguest) $(LDLIBS_libxenstore) + +xenwatchdogd: xenwatchdogd.o + $(CC) $(LDFLAGS) -o $@ $< $(LDLIBS_libxenctrl) + +gtraceview: gtraceview.o $(CC) $(LDFLAGS) -o $@ $< $(CURSES_LIBS) -include $(DEPS) diff -r 7a4eb10b336b -r 26ba6a80310a tools/misc/lomount/Makefile --- a/tools/misc/lomount/Makefile Mon Mar 21 14:41:46 2011 +0000 +++ b/tools/misc/lomount/Makefile Mon Mar 21 14:41:46 2011 +0000 @@ -3,16 +3,11 @@ include $(XEN_ROOT)/tools/Rules.mk CFLAGS += -Werror -HDRS = $(wildcard *.h) -OBJS = $(patsubst %.c,%.o,$(wildcard *.c)) - -BIN = lomount - .PHONY: all all: build .PHONY: build -build: $(BIN) +build: lomount .PHONY: install install install-recurse: build @@ -22,6 +17,7 @@ clean: clean: $(RM) *.a *.so *.o *.rpm $(BIN) -%: %.c $(HDRS) Makefile +lomount: lomount.o $(CC) $(CFLAGS) -o $@ $< +-include $(DEPS) \ No newline at end of file diff -r 7a4eb10b336b -r 26ba6a80310a tools/tests/mce-test/tools/Makefile --- a/tools/tests/mce-test/tools/Makefile Mon Mar 21 14:41:46 2011 +0000 +++ b/tools/tests/mce-test/tools/Makefile Mon Mar 21 14:41:46 2011 +0000 @@ -2,21 +2,20 @@ include $(XEN_ROOT)/tools/Rules.mk include $(XEN_ROOT)/tools/Rules.mk CFLAGS += -Werror - CFLAGS += $(CFLAGS_libxenctrl) +CFLAGS += $(CFLAGS_libxenguest) +CFLAGS += $(CFLAGS_libxenstore) CFLAGS += $(CFLAGS_xeninclude) - -HDRS = $(wildcard *.h) .PHONY: all all: xen-mceinj install: - cp xen-mceinj /usr/sbin/ + $(INSTALL_PROG) xen-mceinj $(DESTDIR)$(SBINDIR) .PHONY: clean clean: $(RM) *.o xen-mceinj -xen-mceinj: %: %.o Makefile +xen-mceinj: xen-mceinj.o Makefile $(CC) -o $@ $< $(LDFLAGS) $(LDLIBS_libxenctrl) $(LDLIBS_libxenguest) $(LDLIBS_libxenstore) diff -r 7a4eb10b336b -r 26ba6a80310a tools/tests/xen-access/Makefile --- a/tools/tests/xen-access/Makefile Mon Mar 21 14:41:46 2011 +0000 +++ b/tools/tests/xen-access/Makefile Mon Mar 21 14:41:46 2011 +0000 @@ -4,28 +4,24 @@ CFLAGS += -Werror CFLAGS += -Werror CFLAGS += $(CFLAGS_libxenctrl) +CFLAGS += $(CFLAGS_libxenguest) CFLAGS += $(CFLAGS_xeninclude) TARGETS-y := TARGETS-$(CONFIG_X86) += xen-access TARGETS := $(TARGETS-y) -SUBDIRS-y := -SUBDIRS := $(SUBDIRS-y) - .PHONY: all all: build .PHONY: build build: $(TARGETS) - set -e; for d in $(SUBDIRS); do $(MAKE) -C $$d; done .PHONY: clean clean: $(RM) *.o $(TARGETS) *~ $(DEPS) - set -e; for d in $(SUBDIRS); do $(MAKE) -C $$d clean; done -xen-access: %: %.o Makefile - $(CC) -o $@ $< $(LDFLAGS) $(LDLIBS_libxenctrl) +xen-access: xen-access.o Makefile + $(CC) -o $@ $< $(LDFLAGS) $(LDLIBS_libxenctrl) $(LDLIBS_libxenguest) -include $(DEPS) diff -r 7a4eb10b336b -r 26ba6a80310a tools/xcutils/Makefile --- a/tools/xcutils/Makefile Mon Mar 21 14:41:46 2011 +0000 +++ b/tools/xcutils/Makefile Mon Mar 21 14:41:46 2011 +0000 @@ -20,19 +20,23 @@ CFLAGS_readnotes.o := $(CFLAGS_libxenct CFLAGS_readnotes.o := $(CFLAGS_libxenctrl) $(CFLAGS_libxenguest) CFLAGS_lsevtchn.o := $(CFLAGS_libxenctrl) -LDLIBS_xc_restore := $(LDLIBS_libxenctrl) $(LDLIBS_libxenguest) -LDLIBS_xc_save := $(LDLIBS_libxenctrl) $(LDLIBS_libxenguest) $(LDLIBS_libxenstore) -LDLIBS_readnotes := $(LDLIBS_libxenctrl) $(LDLIBS_libxenguest) -LDLIBS_lsevtchn := $(LDLIBS_libxenctrl) - .PHONY: all all: build .PHONY: build build: $(PROGRAMS) -$(PROGRAMS): %: %.o - $(CC) $(LDFLAGS) $^ $(LDLIBS) $(LDLIBS_$*) -o $@ +xc_restore: xc_restore.o + $(CC) $(LDFLAGS) $^ -o $@ $(LDLIBS_libxenctrl) $(LDLIBS_libxenguest) + +xc_save: xc_save.o + $(CC) $(LDFLAGS) $^ -o $@ $(LDLIBS_libxenctrl) $(LDLIBS_libxenguest) $(LDLIBS_libxenstore) + +readnotes: readnotes.o + $(CC) $(LDFLAGS) $^ -o $@ $(LDLIBS_libxenctrl) $(LDLIBS_libxenguest) + +lsevtchn: lsevtchn.o + $(CC) $(LDFLAGS) $^ -o $@ $(LDLIBS_libxenctrl) .PHONY: install install: build diff -r 7a4eb10b336b -r 26ba6a80310a tools/xenbackendd/Makefile --- a/tools/xenbackendd/Makefile Mon Mar 21 14:41:46 2011 +0000 +++ b/tools/xenbackendd/Makefile Mon Mar 21 14:41:46 2011 +0000 @@ -17,13 +17,11 @@ CPPFLAGS += -DXEN_SCRIPT_DIR="\"$(XEN_SC CPPFLAGS += -DXEN_SCRIPT_DIR="\"$(XEN_SCRIPT_DIR)\"" LDLIBS += $(LDLIBS_libxenstore) -SBIN = xenbackendd - .PHONY: all all: build .PHONY: build -build: $(SBIN) +build: xenbackendd .PHONY: install install: build @@ -32,10 +30,9 @@ install: build .PHONY: clean clean: - rm -f $(SBIN) $(DEPS) + rm -f $(DEPS) - -%: %.o Makefile +xenbackendd: xenbackendd.o $(CC) $(LDFLAGS) $< -o $@ $(LDLIBS) -include $(DEPS) diff -r 7a4eb10b336b -r 26ba6a80310a tools/xenmon/Makefile --- a/tools/xenmon/Makefile Mon Mar 21 14:41:46 2011 +0000 +++ b/tools/xenmon/Makefile Mon Mar 21 14:41:46 2011 +0000 @@ -17,14 +17,13 @@ CFLAGS += $(CFLAGS_libxenctrl) CFLAGS += $(CFLAGS_libxenctrl) LDLIBS += $(LDLIBS_libxenctrl) -BIN = xentrace_setmask xenbaked SCRIPTS = xenmon.py .PHONY: all all: build .PHONY: build -build: $(BIN) +build: xentrace_setmask xenbaked .PHONY: install install: build @@ -37,13 +36,12 @@ install: build .PHONY: clean clean: - rm -f $(BIN) $(DEPS) + rm -f $(DEPS) - -%: %.o Makefile +xenbaked: xenbaked.o Makefile $(CC) $(LDFLAGS) $< -o $@ $(LDLIBS) -xentrace_%: %.o Makefile +xentrace_setmask: setmask.o Makefile $(CC) $(LDFLAGS) $< -o $@ $(LDLIBS) -include $(DEPS) diff -r 7a4eb10b336b -r 26ba6a80310a tools/xenpmd/Makefile --- a/tools/xenpmd/Makefile Mon Mar 21 14:41:46 2011 +0000 +++ b/tools/xenpmd/Makefile Mon Mar 21 14:41:46 2011 +0000 @@ -6,21 +6,19 @@ CFLAGS += $(CFLAGS_libxenstore) LDLIBS += $(LDLIBS_libxenstore) -BIN = xenpmd - .PHONY: all -all: $(BIN) +all: xenpmd .PHONY: install install: all $(INSTALL_DIR) $(DESTDIR)$(SBINDIR) - $(INSTALL_PROG) $(BIN) $(DESTDIR)$(SBINDIR) + $(INSTALL_PROG) xenpmd $(DESTDIR)$(SBINDIR) .PHONY: clean clean: - $(RM) -f $(BIN) $(DEPS) + $(RM) -f xenpmd $(DEPS) -%: %.o Makefile +xenpmd: xenpmd.o Makefile $(CC) $(LDFLAGS) $< -o $@ $(LDLIBS) -include $(DEPS) diff -r 7a4eb10b336b -r 26ba6a80310a tools/xentrace/Makefile --- a/tools/xentrace/Makefile Mon Mar 21 14:41:46 2011 +0000 +++ b/tools/xentrace/Makefile Mon Mar 21 14:41:46 2011 +0000 @@ -6,26 +6,11 @@ CFLAGS += $(CFLAGS_libxenctrl) CFLAGS += $(CFLAGS_libxenctrl) LDLIBS += $(LDLIBS_libxenctrl) -HDRS = $(wildcard *.h) -OBJS = $(patsubst %.c,%.o,$(wildcard *.c)) - BIN = xentrace xentrace_setsize -LIBBIN = +LIBBIN = xenctx SCRIPTS = xentrace_format MAN1 = $(wildcard *.1) MAN8 = $(wildcard *.8) - -ifeq ($(XEN_TARGET_ARCH),x86_32) -LIBBIN += xenctx -endif - -ifeq ($(XEN_TARGET_ARCH),x86_64) -LIBBIN += xenctx -endif - -ifeq ($(XEN_TARGET_ARCH),ia64) -LIBBIN += xenctx -endif .PHONY: all all: build @@ -49,9 +34,13 @@ clean: clean: $(RM) *.a *.so *.o *.rpm $(BIN) $(LIBBIN) $(DEPS) -%: %.o $(HDRS) Makefile +xentrace: xentrace.o $(CC) $(LDFLAGS) -o $@ $< $(LDLIBS) -xentrace_%: %.o $(HDRS) Makefile + +xenctx: xenctx.o + $(CC) $(LDFLAGS) -o $@ $< $(LDLIBS) + +xentrace_setsize: setsize.o $(CC) $(LDFLAGS) -o $@ $< $(LDLIBS) -include $(DEPS) _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |