Files
xen/tools/console/Makefile
T
Keir Fraser b2ac1c4e50 xenconsoled: portability fixes:
- Use openpty(), which does the same as the sequence
   of open(), grantpt(), unlockpt(), ptsname(), tcgetattr()
   simplifies code
 - Check return code from tcsetattr()
 - sprintf() -> snprintf()
 - OpenBSD lacks POSIX grantpt() and unlockpt()
   requires use of openpty()
 - Solaris lacks POSIX openpty() via feedback from SUN (John Levon)
   implement openpty() for Solaris, tested and ok'd by SUN (John
   Levon)

Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
2007-10-08 10:55:50 +01:00

37 lines
957 B
Makefile

XEN_ROOT=../..
include $(XEN_ROOT)/tools/Rules.mk
DAEMON_INSTALL_DIR = /usr/sbin
CLIENT_INSTALL_DIR = /usr/$(LIBDIR)/xen/bin
CFLAGS += -Werror
CFLAGS += -I $(XEN_LIBXC)
CFLAGS += -I $(XEN_XENSTORE)
BIN = xenconsoled xenconsole
.PHONY: all
all: $(BIN)
.PHONY: clean
clean:
$(RM) *.a *.so *.o *.rpm $(BIN)
$(RM) client/*.o daemon/*.o
xenconsoled: $(patsubst %.c,%.o,$(wildcard daemon/*.c))
$(CC) $(CFLAGS) $^ -o $@ -L$(XEN_LIBXC) -L$(XEN_XENSTORE) \
$(UTIL_LIBS) $(SOCKET_LIBS) -lxenctrl -lxenstore
xenconsole: $(patsubst %.c,%.o,$(wildcard client/*.c))
$(CC) $(CFLAGS) $^ -o $@ -L$(XEN_LIBXC) -L$(XEN_XENSTORE) \
$(UTIL_LIBS) $(SOCKET_LIBS) -lxenctrl -lxenstore
.PHONY: install
install: $(BIN)
$(INSTALL_DIR) $(DESTDIR)/$(DAEMON_INSTALL_DIR)
$(INSTALL_PROG) xenconsoled $(DESTDIR)/$(DAEMON_INSTALL_DIR)
$(INSTALL_DIR) $(DESTDIR)/$(CLIENT_INSTALL_DIR)
$(INSTALL_PROG) xenconsole $(DESTDIR)/$(CLIENT_INSTALL_DIR)