revert between 56095 -> 55830 in arch
[AROS.git] / workbench / network / WirelessManager / wpa_supplicant / dbus / Makefile
blob4cc01763754c9d0f57dcd06c371b3e191be0cb7f
1 all: libwpadbus.a
3 clean:
4 rm -f *.o *.d
5 rm -f libwpadbus.a
7 install:
8 @echo Nothing to be made.
10 ifndef CC
11 CC=gcc
12 endif
14 ifndef CFLAGS
15 CFLAGS = -MMD -O2 -Wall -g
16 endif
18 CFLAGS += -I../../src -I../../src/utils
21 Q=@
22 E=echo
23 ifeq ($(V), 1)
25 E=true
26 endif
28 %.o: %.c
29 $(Q)$(CC) -c -o $@ $(CFLAGS) $<
30 @$(E) " CC " $<
33 ifdef CONFIG_WPS
34 CFLAGS += -DCONFIG_WPS
35 endif
37 CFLAGS += -DCONFIG_CTRL_IFACE_DBUS_NEW
38 CFLAGS += -DCONFIG_CTRL_IFACE_DBUS
40 ifndef DBUS_LIBS
41 DBUS_LIBS := $(shell pkg-config --libs dbus-1)
42 endif
43 ifndef DBUS_INCLUDE
44 DBUS_INCLUDE := $(shell pkg-config --cflags dbus-1)
45 endif
46 ifdef CONFIG_CTRL_IFACE_DBUS_INTRO
47 CFLAGS += -DCONFIG_CTRL_IFACE_DBUS_INTRO
48 DBUS_INCLUDE += $(shell xml2-config --cflags)
49 DBUS_LIBS += $(shell xml2-config --libs)
50 endif
52 dbus_version=$(subst ., ,$(shell pkg-config --modversion dbus-1))
53 DBUS_VERSION_MAJOR=$(word 1,$(dbus_version))
54 DBUS_VERSION_MINOR=$(word 2,$(dbus_version))
55 ifeq ($(DBUS_VERSION_MAJOR),)
56 DBUS_VERSION_MAJOR=0
57 endif
58 ifeq ($(DBUS_VERSION_MINOR),)
59 DBUS_VERSION_MINOR=0
60 endif
61 DBUS_INCLUDE += -DDBUS_VERSION_MAJOR=$(DBUS_VERSION_MAJOR)
62 DBUS_INCLUDE += -DDBUS_VERSION_MINOR=$(DBUS_VERSION_MINOR)
64 CFLAGS += $(DBUS_INCLUDE)
66 LIB_OBJS= \
67 dbus_common.o \
68 dbus_old.o \
69 dbus_old_handlers.o \
70 dbus_new.o \
71 dbus_new_handlers.o \
72 dbus_new_helpers.o \
73 dbus_new_introspect.o \
74 dbus_dict_helpers.o
76 ifdef CONFIG_WPS
77 LIB_OBJS += dbus_old_handlers_wps.o
78 LIB_OBJS += dbus_new_handlers_wps.o
79 endif
81 libwpadbus.a: $(LIB_OBJS)
82 $(AR) crT $@ $?
84 -include $(OBJS:%.o=%.d)