Rev | Line | |
---|
[34] | 1 | XEN_ROOT=../.. |
---|
| 2 | include $(XEN_ROOT)/tools/Rules.mk |
---|
| 3 | |
---|
| 4 | CFLAGS += -Werror |
---|
| 5 | |
---|
| 6 | INCLUDES += -I $(XEN_XC) |
---|
| 7 | INCLUDES += -I $(XEN_LIBXC) |
---|
| 8 | CFLAGS += $(INCLUDES) |
---|
| 9 | |
---|
| 10 | HDRS = $(wildcard *.h) |
---|
| 11 | |
---|
| 12 | TARGETS-y := xenperf |
---|
| 13 | TARGETS-$(CONFIG_X86) += xen-detect |
---|
| 14 | TARGETS := $(TARGETS-y) |
---|
| 15 | |
---|
| 16 | INSTALL_BIN = $(TARGETS) xencons |
---|
| 17 | INSTALL_SBIN = netfix xm xen-bugtool xen-python-path xend xenperf |
---|
| 18 | |
---|
| 19 | .PHONY: all |
---|
| 20 | all: build |
---|
| 21 | |
---|
| 22 | .PHONY: build |
---|
| 23 | build: $(TARGETS) |
---|
| 24 | $(MAKE) -C miniterm |
---|
| 25 | $(MAKE) -C lomount |
---|
| 26 | |
---|
| 27 | .PHONY: install |
---|
| 28 | install: build |
---|
| 29 | [ -d $(DESTDIR)/usr/bin ] || $(INSTALL_DIR) $(DESTDIR)/usr/bin |
---|
| 30 | [ -d $(DESTDIR)/usr/sbin ] || $(INSTALL_DIR) $(DESTDIR)/usr/sbin |
---|
| 31 | $(INSTALL_PROG) $(INSTALL_BIN) $(DESTDIR)/usr/bin |
---|
| 32 | $(INSTALL_PROG) $(INSTALL_SBIN) $(DESTDIR)/usr/sbin |
---|
| 33 | $(MAKE) -C lomount install |
---|
| 34 | # No sense in installing miniterm on the Xen box. |
---|
| 35 | # $(MAKE) -C miniterm install |
---|
| 36 | |
---|
| 37 | .PHONY: clean |
---|
| 38 | clean: |
---|
| 39 | $(RM) *.o $(TARGETS) *~ |
---|
| 40 | $(MAKE) -C miniterm clean |
---|
| 41 | $(MAKE) -C lomount clean |
---|
| 42 | |
---|
| 43 | %.o: %.c $(HDRS) Makefile |
---|
| 44 | $(CC) -c $(CFLAGS) -o $@ $< |
---|
| 45 | |
---|
| 46 | xenperf: %: %.o Makefile |
---|
| 47 | $(CC) $(CFLAGS) -o $@ $< -L$(XEN_LIBXC) -lxenctrl |
---|
Note: See
TracBrowser
for help on using the repository browser.