1XEN_ROOT = $(CURDIR)/../../..
2include ./Rules.mk
3
4.PHONY: all
5all:
6	$(MAKE) -C gx
7	$(MAKE) -C xg
8	$(MAKE) gdbsx
9
10.PHONY: clean
11clean:
12	rm -f xg_all.a gx_all.a gdbsx
13	set -e; for d in xg gx; do $(MAKE) -C $$d clean; done
14
15.PHONY: distclean
16distclean: clean
17	set -e; for d in xg gx; do $(MAKE) -c $$d distclean; done
18
19.PHONY: install
20install: all
21	[ -d $(DESTDIR)$(sbindir) ] || $(INSTALL_DIR) $(DESTDIR)$(sbindir)
22	$(INSTALL_PROG) gdbsx $(DESTDIR)$(sbindir)/gdbsx
23
24.PHONY: uninstall
25uninstall:
26	rm -f $(DESTDIR)$(sbindir)/gdbsx
27
28gdbsx: gx/gx_all.a xg/xg_all.a
29	$(CC) -o $@ $^
30
31xg/xg_all.a:
32	$(MAKE) -C xg
33gx/gx_all.a:
34	$(MAKE) -C gx
35