2014-01-05 04:32:57 +00:00
|
|
|
CC=gcc
|
2014-02-16 09:43:17 +00:00
|
|
|
CFLAGS=-Wall -Wextra -Werror -g -O3
|
2014-01-05 04:32:57 +00:00
|
|
|
all: meminfo-writer
|
2014-04-21 01:14:32 +00:00
|
|
|
|
|
|
|
_XENSTORE_H=$(shell ls /usr/include/xenstore.h)
|
|
|
|
ifneq "$(_XENSTORE_H)" ""
|
|
|
|
CFLAGS+= -DUSE_XENSTORE_H
|
|
|
|
endif
|
|
|
|
|
2014-01-05 04:32:57 +00:00
|
|
|
meminfo-writer: meminfo-writer.o
|
|
|
|
$(CC) -g -o meminfo-writer meminfo-writer.o -lxenstore
|
|
|
|
install:
|
|
|
|
install -D meminfo-writer $(DESTDIR)/usr/sbin/meminfo-writer
|
|
|
|
install -d $(DESTDIR)/usr/lib/systemd/system/
|
|
|
|
install qubes-meminfo-writer*service $(DESTDIR)/usr/lib/systemd/system/
|
|
|
|
clean:
|
|
|
|
rm -f meminfo-writer xenstore-watch *.o
|