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 13XEN_ROOT=$(CURDIR)/../.. 14include $(XEN_ROOT)/tools/Rules.mk 15 16CFLAGS += -Werror 17CFLAGS += $(CFLAGS_libxenevtchn) 18CFLAGS += $(CFLAGS_libxenctrl) 19LDLIBS += $(LDLIBS_libxenctrl) 20LDLIBS += $(LDLIBS_libxenevtchn) 21 22SCRIPTS = xenmon.py 23 24.PHONY: all 25all: build 26 27.PHONY: build 28build: xentrace_setmask xenbaked 29 30.PHONY: install 31install: build 32 $(INSTALL_DIR) $(DESTDIR)$(sbindir) 33 $(INSTALL_PROG) xenbaked $(DESTDIR)$(sbindir)/xenbaked 34 $(INSTALL_PROG) xentrace_setmask $(DESTDIR)$(sbindir)/xentrace_setmask 35 $(INSTALL_PROG) xenmon.py $(DESTDIR)$(sbindir)/xenmon.py 36 37.PHONY: uninstall 38uninstall: 39 rm -f $(DESTDIR)$(sbindir)/xenbaked 40 rm -f $(DESTDIR)$(sbindir)/xentrace_setmask 41 rm -f $(DESTDIR)$(sbindir)/xenmon.py 42 43.PHONY: clean 44clean: 45 $(RM) -f $(DEPS_RM) 46 $(RM) -f xenbaked xenbaked.o 47 $(RM) -f xentrace_setmask setmask.o 48 49.PHONY: distclean 50distclean: clean 51 52xenbaked: xenbaked.o Makefile 53 $(CC) $(LDFLAGS) $< -o $@ $(LDLIBS) $(APPEND_LDFLAGS) 54 55xentrace_setmask: setmask.o Makefile 56 $(CC) $(LDFLAGS) $< -o $@ $(LDLIBS) $(APPEND_LDFLAGS) 57 58-include $(DEPS_INCLUDE) 59