mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 18:21:39 +01:00
46 lines
946 B
Makefile
46 lines
946 B
Makefile
#
|
|
# tools/xcutils/Makefile
|
|
#
|
|
# This file is subject to the terms and conditions of the GNU General
|
|
# Public License. See the file "COPYING" in the main directory of
|
|
# this archive for more details.
|
|
#
|
|
# Copyright (C) 2005 by Christian Limpach
|
|
#
|
|
|
|
XEN_ROOT = ../..
|
|
include $(XEN_ROOT)/tools/Rules.mk
|
|
|
|
CFLAGS += -Werror
|
|
CFLAGS += $(CFLAGS_libxenctrl) $(CFLAGS_libxenguest) $(CFLAGS_libxenstore)
|
|
|
|
# Make gcc generate dependencies.
|
|
CFLAGS += -Wp,-MD,.$(@F).d
|
|
PROG_DEP = .*.d
|
|
|
|
PROGRAMS = xc_restore xc_save readnotes lsevtchn
|
|
|
|
LDLIBS = $(LDFLAGS_libxenctrl) $(LDFLAGS_libxenguest) $(LDFLAGS_libxenstore)
|
|
|
|
.PHONY: all
|
|
all: build
|
|
|
|
.PHONY: build
|
|
build: $(PROGRAMS)
|
|
|
|
$(PROGRAMS): %: %.o
|
|
$(CC) $(CFLAGS) $(LDFLAGS) $^ $(LDLIBS) -o $@
|
|
|
|
.PHONY: install
|
|
install: build
|
|
$(INSTALL_DIR) $(DESTDIR)$(PRIVATE_BINDIR)
|
|
$(INSTALL_PROG) $(PROGRAMS) $(DESTDIR)$(PRIVATE_BINDIR)
|
|
|
|
|
|
.PHONY: clean
|
|
clean:
|
|
$(RM) *.o $(PROGRAMS)
|
|
$(RM) $(PROG_DEP)
|
|
|
|
-include $(PROG_DEP)
|