adding network sample
[libicd-wpa] / Makefile
1 LIBTOOL=libtool
2
3 CFLAGS += -Wall -O2 -DDEBUG -DOSSOLOG_STDERR -shared
4 LDFLAGS += -shared -module
5
6 # Library flags
7 PKG_CFLAGS := $(shell pkg-config --cflags glib-2.0 gconf-2.0 dbus-1 dbus-glib-1 osso-ic)
8 PKG_LDFLAGS := $(shell pkg-config --libs glib-2.0 gconf-2.0 dbus-1 dbus-glib-1)
9 CFLAGS   += $(PKG_CFLAGS)
10 LDFLAGS  += $(PKG_LDFLAGS)
11
12 LTFLAGS = -shared
13
14 BINARY = libicd_network_wpa.so
15 OBJS = icd.o wlan.o networks.o gconf.o \
16         dbus.o dbus-helper.o dbus-handler.o supp.o
17
18 all: $(BINARY)
19
20 $(BINARY): $(OBJS)
21         $(LIBTOOL) --mode=link $(CC) $(LDFLAGS) -o $@ $^
22         
23 %.o: %.c
24         $(LIBTOOL) --mode=compile $(CC) $(CFLAGS) -c $< -o $@
25
26 clean:
27         $(LIBTOOL) --mode=clean $(RM) libicd_network_wpa.so *.o
28         
29 install: $(BINARY)
30         $(LIBTOOL) --mode=install install -c --strip --mode=644 \
31                 $(BINARY) $(DESTDIR)/usr/lib/icd2/
32         $(LIBTOOL) --mode=finish $(DESTDIR)/usr/lib/icd2/
33         
34
35 .PHONY: all clean install
36