Interworking: Define control interface message prefixes in wpa_ctrl.h
[mech_eap.git] / wpa_supplicant / dbus / Makefile
index ef540da..f355ebe 100644 (file)
@@ -1,7 +1,7 @@
 all: libwpadbus.a
 
 clean:
-       rm -f *~ *.o *.d
+       rm -f *~ *.o *.d *.gcno *.gcda *.gcov
        rm -f libwpadbus.a
 
 install:
@@ -15,6 +15,7 @@ ifndef CFLAGS
 CFLAGS = -MMD -O2 -Wall -g
 endif
 
+PKG_CONFIG ?= pkg-config
 CFLAGS += -I../../src -I../../src/utils
 
 
@@ -30,15 +31,18 @@ endif
        @$(E) "  CC " $<
 
 
-#CFLAGS += -DCONFIG_WPS
+ifdef CONFIG_WPS
+CFLAGS += -DCONFIG_WPS
+endif
+
 CFLAGS += -DCONFIG_CTRL_IFACE_DBUS_NEW
 CFLAGS += -DCONFIG_CTRL_IFACE_DBUS
 
 ifndef DBUS_LIBS
-DBUS_LIBS := $(shell pkg-config --libs dbus-1)
+DBUS_LIBS := $(shell $(PKG_CONFIG) --libs dbus-1)
 endif
 ifndef DBUS_INCLUDE
-DBUS_INCLUDE := $(shell pkg-config --cflags dbus-1)
+DBUS_INCLUDE := $(shell $(PKG_CONFIG) --cflags dbus-1)
 endif
 ifdef CONFIG_CTRL_IFACE_DBUS_INTRO
 CFLAGS += -DCONFIG_CTRL_IFACE_DBUS_INTRO
@@ -46,28 +50,23 @@ DBUS_INCLUDE += $(shell xml2-config --cflags)
 DBUS_LIBS += $(shell xml2-config --libs)
 endif
 
-dbus_version=$(subst ., ,$(shell pkg-config --modversion dbus-1))
-DBUS_VERSION_MAJOR=$(word 1,$(dbus_version))
-DBUS_VERSION_MINOR=$(word 2,$(dbus_version))
-ifeq ($(DBUS_VERSION_MAJOR),)
-DBUS_VERSION_MAJOR=0
-endif
-ifeq ($(DBUS_VERSION_MINOR),)
-DBUS_VERSION_MINOR=0
-endif
-DBUS_INCLUDE += -DDBUS_VERSION_MAJOR=$(DBUS_VERSION_MAJOR)
-DBUS_INCLUDE += -DDBUS_VERSION_MINOR=$(DBUS_VERSION_MINOR)
-
 CFLAGS += $(DBUS_INCLUDE)
 
 LIB_OBJS= \
-       ctrl_iface_dbus.o \
-       ctrl_iface_dbus_handlers.o \
-       ctrl_iface_dbus_new.o \
-       ctrl_iface_dbus_new_handlers.o \
-       ctrl_iface_dbus_new_helpers.o \
+       dbus_common.o \
+       dbus_old.o \
+       dbus_old_handlers.o \
+       dbus_new.o \
+       dbus_new_handlers.o \
+       dbus_new_helpers.o \
+       dbus_new_introspect.o \
        dbus_dict_helpers.o
 
+ifdef CONFIG_WPS
+LIB_OBJS += dbus_old_handlers_wps.o
+LIB_OBJS += dbus_new_handlers_wps.o
+endif
+
 libwpadbus.a: $(LIB_OBJS)
        $(AR) crT $@ $?