2013-03-20 05:27:32 +00:00
|
|
|
CC=gcc
|
2015-03-20 11:17:32 +00:00
|
|
|
CFLAGS+=-I. -g -O2 -Wall -Wextra -Werror -pie -fPIC `pkg-config --cflags vchan-$(BACKEND_VMM)`
|
2013-03-20 05:27:32 +00:00
|
|
|
COMMONIOALL=ioall.o
|
2015-10-24 18:33:58 +00:00
|
|
|
SO_VER=2
|
2014-02-07 04:29:59 +00:00
|
|
|
LDFLAGS=-shared
|
2015-10-24 18:21:11 +00:00
|
|
|
VCHANLIBS = `pkg-config --libs vchan-$(BACKEND_VMM)`
|
2013-03-20 05:27:32 +00:00
|
|
|
|
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-02-07 04:29:59 +00:00
|
|
|
all: libqrexec-utils.so.$(SO_VER) libqubes-rpc-filecopy.so.$(SO_VER)
|
2015-10-24 18:22:24 +00:00
|
|
|
libqrexec-utils.so.$(SO_VER): unix-server.o ioall.o buffer.o exec.o txrx-vchan.o write-stdin.o
|
2015-10-24 18:21:11 +00:00
|
|
|
$(CC) $(LDFLAGS) -Wl,-soname,$@ -o $@ $^ $(VCHANLIBS)
|
2015-11-03 02:42:49 +00:00
|
|
|
libqubes-rpc-filecopy.so.$(SO_VER): ioall.o copy-file.o crc32.o unpack.o pack.o
|
2014-02-07 04:29:59 +00:00
|
|
|
$(CC) $(LDFLAGS) -Wl,-soname,$@ -o $@ $^
|
2013-03-20 05:27:32 +00:00
|
|
|
|
|
|
|
%.a:
|
|
|
|
$(AR) rcs $@ $^
|
|
|
|
clean:
|
2014-02-07 04:29:59 +00:00
|
|
|
rm -f *.o *~ *.a *.so.*
|
2013-03-20 05:27:32 +00:00
|
|
|
|
|
|
|
install:
|
|
|
|
mkdir -p $(DESTDIR)$(LIBDIR)
|
2014-02-07 04:29:59 +00:00
|
|
|
cp libqrexec-utils.so.$(SO_VER) $(DESTDIR)$(LIBDIR)
|
|
|
|
ln -s libqrexec-utils.so.$(SO_VER) $(DESTDIR)$(LIBDIR)/libqrexec-utils.so
|
|
|
|
cp libqubes-rpc-filecopy.so.$(SO_VER) $(DESTDIR)$(LIBDIR)
|
|
|
|
ln -s libqubes-rpc-filecopy.so.$(SO_VER) $(DESTDIR)$(LIBDIR)/libqubes-rpc-filecopy.so
|
2013-03-20 05:27:32 +00:00
|
|
|
mkdir -p $(DESTDIR)$(INCLUDEDIR)
|
|
|
|
cp libqrexec-utils.h $(DESTDIR)$(INCLUDEDIR)
|
|
|
|
cp libqubes-rpc-filecopy.h $(DESTDIR)$(INCLUDEDIR)
|
|
|
|
cp qrexec.h $(DESTDIR)$(INCLUDEDIR)
|
|
|
|
|