diff options
Diffstat (limited to 'usbredirserver')
-rw-r--r-- | usbredirserver/Makefile | 20 | ||||
-rw-r--r-- | usbredirserver/Makefile.am | 8 | ||||
-rw-r--r-- | usbredirserver/usbredirserver.c | 7 |
3 files changed, 13 insertions, 22 deletions
diff --git a/usbredirserver/Makefile b/usbredirserver/Makefile deleted file mode 100644 index 889b839..0000000 --- a/usbredirserver/Makefile +++ /dev/null @@ -1,20 +0,0 @@ -override CPPFLAGS += $(shell pkg-config --cflags libusb-1.0) -LIBS = $(shell pkg-config --libs libusb-1.0) - -USBREDIRSERVER_OBJS = usbredirserver.o -TARGETS = usbredirserver - -all: $(TARGETS) - --include *.d - -usbredirserver: $(USBREDIRSERVER_OBJS) -# rpath-link so that usbredirparser (needed by usbredirhost) can be found -# when building without having a previous version installed - $(CC) $(LDFLAGS) -Wl,-rpath-link,../usbredirparser -o $@ $^ $(LIBS) -lusbredirhost - -install: all - mkdir -p $(DESTDIR)$(SBINDIR) - install -m 755 usbredirserver $(DESTDIR)$(SBINDIR) - -include ../Make.rules diff --git a/usbredirserver/Makefile.am b/usbredirserver/Makefile.am new file mode 100644 index 0000000..6d059f5 --- /dev/null +++ b/usbredirserver/Makefile.am @@ -0,0 +1,8 @@ +sbin_PROGRAMS = usbredirserver + +usbredirserver_SOURCES = usbredirserver.c +usbredirserver_LDADD = $(LIBUSB_LIBS) \ + $(top_builddir)/usbredirhost/libusbredirhost.la +usbredirserver_CFLAGS = $(LIBUSB_CFLAGS) \ + -I$(top_srcdir)/usbredirhost \ + -I$(top_srcdir)/usbredirparser diff --git a/usbredirserver/usbredirserver.c b/usbredirserver/usbredirserver.c index 33fa231..5ba3e04 100644 --- a/usbredirserver/usbredirserver.c +++ b/usbredirserver/usbredirserver.c @@ -19,6 +19,8 @@ along with this library; if not, see <http://www.gnu.org/licenses/>. */ +#include "config.h" + #include <stdio.h> #include <stdlib.h> #include <stdarg.h> @@ -35,7 +37,8 @@ #include <netdb.h> #include "usbredirhost.h" -#define VERSION "usbredirserver " USBREDIR_VERSION + +#define SERVER_VERSION "usbredirserver " PACKAGE_VERSION static int verbose = usbredirparser_info; static int client_fd, running = 1; @@ -350,7 +353,7 @@ int main(int argc, char *argv[]) host = usbredirhost_open(ctx, handle, usbredirserver_log, usbredirserver_read, usbredirserver_write, - NULL, VERSION, verbose, 0); + NULL, SERVER_VERSION, verbose, 0); if (!host) exit(1); run_main_loop(); |