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