Makefile 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  1. all: hs20-osu-client
  2. ifndef CC
  3. CC=gcc
  4. endif
  5. ifndef LDO
  6. LDO=$(CC)
  7. endif
  8. Q=@
  9. E=echo
  10. ifeq ($(V), 1)
  11. Q=
  12. E=true
  13. endif
  14. ifndef CFLAGS
  15. CFLAGS = -MMD -O2 -Wall -g
  16. endif
  17. CFLAGS += -I../../src/utils
  18. CFLAGS += -I../../src/common
  19. CFLAGS += -I../../src
  20. ifndef CONFIG_NO_BROWSER
  21. ifndef CONFIG_BROWSER_SYSTEM
  22. GTKCFLAGS := $(shell pkg-config --cflags gtk+-3.0 webkitgtk-3.0)
  23. GTKLIBS := $(shell pkg-config --libs gtk+-3.0 webkitgtk-3.0)
  24. CFLAGS += $(GTKCFLAGS)
  25. LIBS += $(GTKLIBS)
  26. endif
  27. endif
  28. OBJS=spp_client.o
  29. OBJS += oma_dm_client.o
  30. OBJS += osu_client.o
  31. OBJS += est.o
  32. OBJS += ../../src/utils/xml-utils.o
  33. CFLAGS += -DCONFIG_CTRL_IFACE
  34. CFLAGS += -DCONFIG_CTRL_IFACE_UNIX
  35. OBJS += ../../src/common/wpa_ctrl.o ../../src/common/wpa_helpers.o
  36. ifdef CONFIG_NO_BROWSER
  37. CFLAGS += -DCONFIG_NO_BROWSER
  38. else
  39. ifdef CONFIG_BROWSER_SYSTEM
  40. OBJS += ../../src/utils/eloop.o
  41. OBJS += ../../src/utils/wpabuf.o
  42. OBJS += ../../src/wps/httpread.o
  43. OBJS += ../../src/wps/http_server.o
  44. OBJS += ../../src/utils/browser-system.o
  45. else
  46. OBJS += ../../src/utils/browser.o
  47. endif
  48. endif
  49. OBJS += ../../src/utils/xml_libxml2.o
  50. OBJS += ../../src/utils/http_curl.o
  51. OBJS += ../../src/utils/base64.o
  52. OBJS += ../../src/utils/os_unix.o
  53. CFLAGS += -DCONFIG_DEBUG_FILE
  54. OBJS += ../../src/utils/wpa_debug.o
  55. OBJS += ../../src/utils/common.o
  56. OBJS += ../../src/crypto/crypto_internal.o
  57. OBJS += ../../src/crypto/md5-internal.o
  58. OBJS += ../../src/crypto/sha1-internal.o
  59. OBJS += ../../src/crypto/sha256-internal.o
  60. CFLAGS += $(shell xml2-config --cflags)
  61. LIBS += $(shell xml2-config --libs)
  62. # Allow static/custom linking of libcurl.
  63. ifdef CUST_CURL_LINKAGE
  64. LIBS += ${CUST_CURL_LINKAGE}
  65. else
  66. LIBS += -lcurl
  67. endif
  68. CFLAGS += -DEAP_TLS_OPENSSL
  69. OBJS += ../../src/crypto/tls_openssl_ocsp.o
  70. LIBS += -lssl -lcrypto
  71. hs20-osu-client: $(OBJS)
  72. $(Q)$(LDO) $(LDFLAGS) -o hs20-osu-client $(OBJS) $(LIBS)
  73. @$(E) " LD " $@
  74. %.o: %.c
  75. $(Q)$(CC) -c -o $@ $(CFLAGS) $<
  76. @$(E) " CC " $<
  77. clean:
  78. rm -f core *~ *.o *.d hs20-osu-client
  79. rm -f ../../src/utils/*.o
  80. rm -f ../../src/utils/*.d
  81. rm -f ../../src/common/*.o
  82. rm -f ../../src/common/*.d
  83. rm -f ../../src/crypto/*.o
  84. rm -f ../../src/crypto/*.d
  85. rm -f ../../src/wps/*.o
  86. rm -f ../../src/wps/*.d
  87. -include $(OBJS:%.o=%.d)