Makefile 690 B

12345678910111213141516171819202122232425262728293031
  1. CC=gcc
  2. CFLAGS=-Wall -Wextra -Werror -g -O3
  3. _XENSTORE_H=$(wildcard /usr/include/xenstore.h)
  4. ifneq "$(_XENSTORE_H)" ""
  5. CFLAGS+= -DUSE_XENSTORE_H
  6. endif
  7. all: xenstore-watch python close-window
  8. xenstore-watch: xenstore-watch.o
  9. $(CC) -o xenstore-watch xenstore-watch.o -lxenstore
  10. close-window: close-window.c
  11. $(CC) -o $@ $< -lX11
  12. python: python2 python3
  13. python2:
  14. rm -rf py2
  15. mkdir -p py2
  16. cp *.py py2/
  17. python2 -m compileall py2
  18. python2 -O -m compileall py2
  19. # Only some scripts does support python3 for now
  20. python3:
  21. rm -rf py3
  22. mkdir -p py3
  23. cp dnf-qubes-hooks.py qubesxdg.py py3/
  24. python3 -m compileall py3
  25. python3 -O -m compileall py3
  26. clean:
  27. rm -f xenstore-watch *.o *~ *.pyc *.pyo