Makefile 872 Bytes
Newer Older
1

2
XEN_ROOT=$(CURDIR)/../..
3 4
include $(XEN_ROOT)/tools/Rules.mk

5
CFLAGS  += -Werror
6

7
CFLAGS  += $(CFLAGS_libxenctrl)
8
CFLAGS  += $(CFLAGS_libxenstore)
9 10 11 12 13
LDLIBS += $(LDLIBS_libxenctrl)
LDLIBS += $(LDLIBS_libxenstore)
LDLIBS += $(UTIL_LIBS)
LDLIBS += $(SOCKET_LIBS)
LDLIBS += -lrt
14 15 16

BIN      = xenconsoled xenconsole

kaf24's avatar
kaf24 committed
17
.PHONY: all
18 19
all: $(BIN)

kaf24's avatar
kaf24 committed
20
.PHONY: clean
21
clean:
22
	$(RM) *.a *.so *.o *.rpm $(BIN) $(DEPS)
23 24 25
	$(RM) client/*.o daemon/*.o

xenconsoled: $(patsubst %.c,%.o,$(wildcard daemon/*.c))
26
	$(CC) $(CFLAGS) $^ -o $@ $(LDFLAGS) $(LDLIBS)
27 28

xenconsole: $(patsubst %.c,%.o,$(wildcard client/*.c))
29
	$(CC) $(CFLAGS) $^ -o $@ $(LDFLAGS) $(LDLIBS)
30

kaf24's avatar
kaf24 committed
31
.PHONY: install
32
install: $(BIN)
33 34
	$(INSTALL_DIR) $(DESTDIR)/$(SBINDIR)
	$(INSTALL_PROG) xenconsoled $(DESTDIR)/$(SBINDIR)
35 36
	$(INSTALL_DIR) $(DESTDIR)$(PRIVATE_BINDIR)
	$(INSTALL_PROG) xenconsole $(DESTDIR)$(PRIVATE_BINDIR)
37 38

-include $(DEPS)