Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.

Makefile 1.5KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. all: libwpadbus.a
  2. clean:
  3. rm -f *~ *.o *.d
  4. rm -f libwpadbus.a
  5. install:
  6. @echo Nothing to be made.
  7. ifndef CC
  8. CC=gcc
  9. endif
  10. ifndef CFLAGS
  11. CFLAGS = -MMD -O2 -Wall -g
  12. endif
  13. CFLAGS += -I../../src -I../../src/utils
  14. Q=@
  15. E=echo
  16. ifeq ($(V), 1)
  17. Q=
  18. E=true
  19. endif
  20. %.o: %.c
  21. $(Q)$(CC) -c -o $@ $(CFLAGS) $<
  22. @$(E) " CC " $<
  23. ifdef CONFIG_WPS
  24. CFLAGS += -DCONFIG_WPS
  25. endif
  26. CFLAGS += -DCONFIG_CTRL_IFACE_DBUS_NEW
  27. CFLAGS += -DCONFIG_CTRL_IFACE_DBUS
  28. ifndef DBUS_LIBS
  29. DBUS_LIBS := $(shell pkg-config --libs dbus-1)
  30. endif
  31. ifndef DBUS_INCLUDE
  32. DBUS_INCLUDE := $(shell pkg-config --cflags dbus-1)
  33. endif
  34. ifdef CONFIG_CTRL_IFACE_DBUS_INTRO
  35. CFLAGS += -DCONFIG_CTRL_IFACE_DBUS_INTRO
  36. DBUS_INCLUDE += $(shell xml2-config --cflags)
  37. DBUS_LIBS += $(shell xml2-config --libs)
  38. endif
  39. dbus_version=$(subst ., ,$(shell pkg-config --modversion dbus-1))
  40. DBUS_VERSION_MAJOR=$(word 1,$(dbus_version))
  41. DBUS_VERSION_MINOR=$(word 2,$(dbus_version))
  42. ifeq ($(DBUS_VERSION_MAJOR),)
  43. DBUS_VERSION_MAJOR=0
  44. endif
  45. ifeq ($(DBUS_VERSION_MINOR),)
  46. DBUS_VERSION_MINOR=0
  47. endif
  48. DBUS_INCLUDE += -DDBUS_VERSION_MAJOR=$(DBUS_VERSION_MAJOR)
  49. DBUS_INCLUDE += -DDBUS_VERSION_MINOR=$(DBUS_VERSION_MINOR)
  50. CFLAGS += $(DBUS_INCLUDE)
  51. LIB_OBJS= \
  52. dbus_common.o \
  53. dbus_old.o \
  54. dbus_old_handlers.o \
  55. dbus_new.o \
  56. dbus_new_handlers.o \
  57. dbus_new_helpers.o \
  58. dbus_new_introspect.o \
  59. dbus_dict_helpers.o
  60. ifdef CONFIG_WPS
  61. LIB_OBJS += dbus_old_handlers_wps.o
  62. LIB_OBJS += dbus_new_handlers_wps.o
  63. endif
  64. libwpadbus.a: $(LIB_OBJS)
  65. $(AR) crT $@ $?
  66. -include $(OBJS:%.o=%.d)