]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
dbus: Clean dbus build files on wpa_supplicant 'make clean'
authorJouni Malinen <j@w1.fi>
Sun, 20 Dec 2009 18:29:09 +0000 (20:29 +0200)
committerJouni Malinen <j@w1.fi>
Sun, 20 Dec 2009 18:29:09 +0000 (20:29 +0200)
In addition, add preliminary build rules for build libwpadbus.a.

wpa_supplicant/Makefile
wpa_supplicant/dbus/.gitignore [new file with mode: 0644]
wpa_supplicant/dbus/Makefile [new file with mode: 0644]

index d852e26567010a38d7dd789714660aebb24360d9..72a6f8cc074957a53e3677d27c30b6d9e2223372 100644 (file)
@@ -1336,6 +1336,7 @@ tests: test-eap_sim_common
 
 clean:
        $(MAKE) -C ../src clean
+       $(MAKE) -C dbus clean
        rm -f core *~ *.o *.d eap_*.so $(ALL) $(WINALL) eapol_test preauth_test
        rm -f wpa_priv
 
diff --git a/wpa_supplicant/dbus/.gitignore b/wpa_supplicant/dbus/.gitignore
new file mode 100644 (file)
index 0000000..6db2468
--- /dev/null
@@ -0,0 +1 @@
+libwpadbus.a
diff --git a/wpa_supplicant/dbus/Makefile b/wpa_supplicant/dbus/Makefile
new file mode 100644 (file)
index 0000000..ef540da
--- /dev/null
@@ -0,0 +1,74 @@
+all: libwpadbus.a
+
+clean:
+       rm -f *~ *.o *.d
+       rm -f libwpadbus.a
+
+install:
+       @echo Nothing to be made.
+
+ifndef CC
+CC=gcc
+endif
+
+ifndef CFLAGS
+CFLAGS = -MMD -O2 -Wall -g
+endif
+
+CFLAGS += -I../../src -I../../src/utils
+
+
+Q=@
+E=echo
+ifeq ($(V), 1)
+Q=
+E=true
+endif
+
+%.o: %.c
+       $(Q)$(CC) -c -o $@ $(CFLAGS) $<
+       @$(E) "  CC " $<
+
+
+#CFLAGS += -DCONFIG_WPS
+CFLAGS += -DCONFIG_CTRL_IFACE_DBUS_NEW
+CFLAGS += -DCONFIG_CTRL_IFACE_DBUS
+
+ifndef DBUS_LIBS
+DBUS_LIBS := $(shell pkg-config --libs dbus-1)
+endif
+ifndef DBUS_INCLUDE
+DBUS_INCLUDE := $(shell pkg-config --cflags dbus-1)
+endif
+ifdef CONFIG_CTRL_IFACE_DBUS_INTRO
+CFLAGS += -DCONFIG_CTRL_IFACE_DBUS_INTRO
+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_dict_helpers.o
+
+libwpadbus.a: $(LIB_OBJS)
+       $(AR) crT $@ $?
+
+-include $(OBJS:%.o=%.d)