Packet tunneling over UDP, multiple channels
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

66 lines
1.5 KiB

  1. SBINDIR = $(DESTDIR)/usr/sbin
  2. ETCDIR = $(DESTDIR)/etc/rrqnet
  3. MAN1DIR = $(DESTDIR)/usr/share/man/man1
  4. MAN8DIR = $(DESTDIR)/usr/share/man/man8
  5. SBINCFILES = rrqnet
  6. SBINFILES = rrqnet-cron $(SBINCFILES)
  7. ETCFILES = set-source-route.sh ifupdown.sh
  8. MAN1FILES =
  9. MAN8FILES = rrqnet.8 rrqnet-cron.8 rrqnet-ifupdown.sh.8
  10. HTMLDOC = $(MAN8FILES:%=%.html)
  11. .PHONY: ifupdown.sh
  12. all: $(SBINFILES) $(ETCFILES) $(MAN1FILES) $(MAN8FILES) $(HTMLDOC)
  13. squeezetest: squeeze.c squeezetest.c
  14. $(HTMLDOC): %.html: %.adoc
  15. asciidoc -bhtml $^
  16. $(MAN8FILES): %: %.adoc
  17. a2x -d manpage -f manpage $^
  18. rrqnet: LDFLAGS += -lpthread
  19. rrqnet: rrqnet.c htable.h htable.c sockaddr.h queue.h queue.c
  20. rrqnet.E: rrqnet.c htable.c
  21. $(CC) -W -Wall $^ > $@
  22. COMPILEOPTS = -g -W -Wall
  23. #COMPILEOPTS = -pg -no-pie -g -DGPROF
  24. #STATIC = -static
  25. $(filter-out %.sh,$(SBINCFILES)): %: %.c
  26. $(CC) $(COMPILEOPTS) $(STATIC) -o $@ $^ $(LDFLAGS)
  27. .PHONY: clean
  28. clean:
  29. rm -f $(filter-out %.sh,$(SBINCFILES))
  30. # Installation targets
  31. INSTALLTARGETS = $(addprefix $(SBINDIR)/,$(SBINFILES))
  32. INSTALLTARGETS += $(addprefix $(ETCDIR)/,$(ETCFILES))
  33. INSTALLTARGETS += $(addprefix $(MAN1DIR)/,$(MAN1FILES))
  34. INSTALLTARGETS += $(addprefix $(MAN8DIR)/,$(MAN8FILES))
  35. #INSTALL = install -b -S orig
  36. INSTALL = install
  37. $(addprefix $(ETCDIR)/,conf.d keys):
  38. mkdir -p $@
  39. $(ETCDIR)/ifupdown.sh: rrqnet-ifupdown.sh
  40. $(INSTALL) -D -T $< $@
  41. $(SBINDIR)/% $(ETCDIR)/% $(MAN1DIR)/% $(MAN8DIR)/%: %
  42. $(INSTALL) -D -T $< $@
  43. install: $(INSTALLTARGETS)
  44. BUILDPACKAGE = -us -uc --build=full
  45. deb:
  46. PREFIX= INCLUDE_PREFIX=/usr dpkg-buildpackage $(BUILDPACKAGE)