Home | History | Annotate | Line # | Download | only in dbus
Makefile revision 1.1
      1  1.1  christos all: libwpadbus.a
      2  1.1  christos 
      3  1.1  christos clean:
      4  1.1  christos 	rm -f *~ *.o *.d
      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  christos CFLAGS += -I../../src -I../../src/utils
     19  1.1  christos 
     20  1.1  christos 
     21  1.1  christos Q=@
     22  1.1  christos E=echo
     23  1.1  christos ifeq ($(V), 1)
     24  1.1  christos Q=
     25  1.1  christos E=true
     26  1.1  christos endif
     27  1.1  christos 
     28  1.1  christos %.o: %.c
     29  1.1  christos 	$(Q)$(CC) -c -o $@ $(CFLAGS) $<
     30  1.1  christos 	@$(E) "  CC " $<
     31  1.1  christos 
     32  1.1  christos 
     33  1.1  christos ifdef CONFIG_WPS
     34  1.1  christos CFLAGS += -DCONFIG_WPS
     35  1.1  christos endif
     36  1.1  christos 
     37  1.1  christos CFLAGS += -DCONFIG_CTRL_IFACE_DBUS_NEW
     38  1.1  christos CFLAGS += -DCONFIG_CTRL_IFACE_DBUS
     39  1.1  christos 
     40  1.1  christos ifndef DBUS_LIBS
     41  1.1  christos DBUS_LIBS := $(shell pkg-config --libs dbus-1)
     42  1.1  christos endif
     43  1.1  christos ifndef DBUS_INCLUDE
     44  1.1  christos DBUS_INCLUDE := $(shell pkg-config --cflags dbus-1)
     45  1.1  christos endif
     46  1.1  christos ifdef CONFIG_CTRL_IFACE_DBUS_INTRO
     47  1.1  christos CFLAGS += -DCONFIG_CTRL_IFACE_DBUS_INTRO
     48  1.1  christos DBUS_INCLUDE += $(shell xml2-config --cflags)
     49  1.1  christos DBUS_LIBS += $(shell xml2-config --libs)
     50  1.1  christos endif
     51  1.1  christos 
     52  1.1  christos dbus_version=$(subst ., ,$(shell pkg-config --modversion dbus-1))
     53  1.1  christos DBUS_VERSION_MAJOR=$(word 1,$(dbus_version))
     54  1.1  christos DBUS_VERSION_MINOR=$(word 2,$(dbus_version))
     55  1.1  christos ifeq ($(DBUS_VERSION_MAJOR),)
     56  1.1  christos DBUS_VERSION_MAJOR=0
     57  1.1  christos endif
     58  1.1  christos ifeq ($(DBUS_VERSION_MINOR),)
     59  1.1  christos DBUS_VERSION_MINOR=0
     60  1.1  christos endif
     61  1.1  christos DBUS_INCLUDE += -DDBUS_VERSION_MAJOR=$(DBUS_VERSION_MAJOR)
     62  1.1  christos DBUS_INCLUDE += -DDBUS_VERSION_MINOR=$(DBUS_VERSION_MINOR)
     63  1.1  christos 
     64  1.1  christos CFLAGS += $(DBUS_INCLUDE)
     65  1.1  christos 
     66  1.1  christos LIB_OBJS= \
     67  1.1  christos 	dbus_common.o \
     68  1.1  christos 	dbus_old.o \
     69  1.1  christos 	dbus_old_handlers.o \
     70  1.1  christos 	dbus_new.o \
     71  1.1  christos 	dbus_new_handlers.o \
     72  1.1  christos 	dbus_new_helpers.o \
     73  1.1  christos 	dbus_new_introspect.o \
     74  1.1  christos 	dbus_dict_helpers.o
     75  1.1  christos 
     76  1.1  christos ifdef CONFIG_WPS
     77  1.1  christos LIB_OBJS += dbus_old_handlers_wps.o
     78  1.1  christos LIB_OBJS += dbus_new_handlers_wps.o
     79  1.1  christos endif
     80  1.1  christos 
     81  1.1  christos libwpadbus.a: $(LIB_OBJS)
     82  1.1  christos 	$(AR) crT $@ $?
     83  1.1  christos 
     84  1.1  christos -include $(OBJS:%.o=%.d)
     85