1 # Copyright (C) HP Labs, Palo Alto and Fort Collins, 2005 2 # Author: Diwaker Gupta <diwaker.gupta@hp.com> 3 # 4 # This program is free software; you can redistribute it and/or modify 5 # it under the terms of the GNU General Public License as published by 6 # the Free Software Foundation; under version 2 of the License. 7 # 8 # This program is distributed in the hope that it will be useful, 9 # but WITHOUT ANY WARRANTY; without even the implied warranty of 10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 # GNU General Public License for more details. 12 13 XEN_ROOT=$(CURDIR)/../.. 14 include $(XEN_ROOT)/tools/Rules.mk 15 16 CFLAGS += -Werror 17 CFLAGS += $(CFLAGS_libxenevtchn) 18 CFLAGS += $(CFLAGS_libxenctrl) 19 LDLIBS += $(LDLIBS_libxenctrl) 20 LDLIBS += $(LDLIBS_libxenevtchn) 21 22 SCRIPTS = xenmon.py 23 24 .PHONY: all 25 all: build 26 27 .PHONY: build 28 build: xentrace_setmask xenbaked 29 30 .PHONY: install 31 install: build 32 $(INSTALL_DIR) $(DESTDIR)$(sbindir) 33 $(INSTALL_PROG) xenbaked $(DESTDIR)$(sbindir)/xenbaked 34 $(INSTALL_PROG) xentrace_setmask $(DESTDIR)$(sbindir)/xentrace_setmask 35 $(INSTALL_PYTHON_PROG) xenmon.py $(DESTDIR)$(sbindir)/xenmon 36 37 .PHONY: uninstall 38 uninstall: 39 rm -f $(DESTDIR)$(sbindir)/xenbaked 40 rm -f $(DESTDIR)$(sbindir)/xentrace_setmask 41 rm -f $(DESTDIR)$(sbindir)/xenmon 42 43 .PHONY: clean 44 clean: 45 $(RM) -f $(DEPS_RM) 46 $(RM) -f xenbaked xenbaked.o 47 $(RM) -f xentrace_setmask setmask.o 48 49 .PHONY: distclean 50 distclean: clean 51 52 xenbaked: xenbaked.o Makefile 53 $(CC) $(LDFLAGS) $< -o $@ $(LDLIBS) $(APPEND_LDFLAGS) 54 55 xentrace_setmask: setmask.o Makefile 56 $(CC) $(LDFLAGS) $< -o $@ $(LDLIBS) $(APPEND_LDFLAGS) 57 58 -include $(DEPS_INCLUDE) 59