Makefile.static 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. PREFIX = /usr/local
  2. MANDIR = $(PREFIX)/share/man
  3. CDEBUGFLAGS = -Os -g -Wall -Idecrypt-lib/
  4. DEFINES = $(PLATFORM_DEFINES)
  5. CFLAGS = $(CDEBUGFLAGS) $(DEFINES) $(EXTRA_DEFINES)
  6. LDLIBS = -lrt
  7. LDLIBS += -D_FILE_OFFSET_BITS=64 \
  8. -Ldecrypt-lib/ \
  9. decrypt-lib/libmbedcrypto.a \
  10. decrypt-lib/libmbedx509.a \
  11. decrypt-lib/libmbedtls.a
  12. SRCS = babeld.c net.c kernel.c util.c interface.c source.c neighbour.c \
  13. route.c xroute.c message.c resend.c configuration.c local.c \
  14. disambiguation.c rule.c \
  15. decrypt.c \
  16. lorauth.c
  17. OBJS = babeld.o net.o kernel.o util.o interface.o source.o neighbour.o \
  18. route.o xroute.o message.o resend.o configuration.o local.o \
  19. disambiguation.o rule.o \
  20. decrypt.o \
  21. lorauth.o
  22. babeld: decrypt-lib $(OBJS)
  23. $(CC) $(CFLAGS) $(LDFLAGS) -o babeld $(OBJS) $(LDLIBS)
  24. babeld.o: babeld.c version.h
  25. local.o: local.c version.h
  26. kernel.o: kernel_netlink.c kernel_socket.c
  27. version.h:
  28. ./generate-version.sh > version.h
  29. # decrypt.o: decrypt.c
  30. # @echo "-- decrypt utils"
  31. # $(CC) -Idecrypt-lib/ -D_FILE_OFFSET_BITS=64 -O2 decrypt.c \
  32. # -Ldecrypt-lib/ \
  33. # decrypt-lib/libmbedcrypto.a \
  34. # decrypt-lib/libmbedx509.a \
  35. # decrypt-lib/libmbedtls.a
  36. .SUFFIXES: .man .html
  37. .man.html:
  38. mandoc -Thtml $< > $@
  39. babeld.html: babeld.man
  40. decrypt-lib:
  41. @echo "Building decryption libraries..."
  42. $(MAKE) -C decrypt-lib all
  43. decrypt_tests: decrypt-lib
  44. @echo "... building decrypt_tests "
  45. $(CC) -o decrypt_tests -Idecrypt-lib/ -D_FILE_OFFSET_BITS=64 -O2 decrypt_tests.c -L./decrypt-lib ./decrypt-lib/libmbedcrypto.a decrypt-lib/libmbedx509.a decrypt-lib/libmbedtls.a
  46. .PHONY: all install install.minimal uninstall clean decrypt-lib
  47. all: babeld babeld.man decrypt-lib \
  48. decrypt_tests # pruebas de descifrado
  49. install.minimal: babeld
  50. -rm -f $(TARGET)$(PREFIX)/bin/babeld
  51. mkdir -p $(TARGET)$(PREFIX)/bin
  52. cp -f babeld $(TARGET)$(PREFIX)/bin
  53. install: install.minimal all
  54. mkdir -p $(TARGET)$(MANDIR)/man8
  55. cp -f babeld.man $(TARGET)$(MANDIR)/man8/babeld.8
  56. uninstall:
  57. -rm -f $(TARGET)$(PREFIX)/bin/babeld
  58. -rm -f $(TARGET)$(MANDIR)/man8/babeld.8
  59. clean:
  60. $(MAKE) -C decrypt-lib clean
  61. -rm -f decrypt_tests
  62. -rm -f babeld babeld.html version.h *.o *~ core TAGS gmon.out