Ovislink 1600GL: Turn on/off "Connected" led when WAN connection is up/down
[tomato.git] / release / src / router / shared / Makefile
blob26df3dbb287e565362365c8212013b4f64abe874
1 include ../common.mak
3 CFLAGS = -Os -Wall $(EXTRACFLAGS) -fPIC
4 CFLAGS += -I. -I$(SRCBASE)/include -I$(SRCBASE)/
6 LDFLAGS =
8 OBJS = shutils.o wl.o wl_linux.o linux_timer.o defaults.o id.o
9 OBJS += misc.o led.o version.o base64.o files.o strings.o process.o
11 ifeq ($(TCONFIG_USB),y)
12 OBJS += usb.o
13 OBJS += $(TOP)/busybox/util-linux/volume_id/ext.o
14 OBJS += $(TOP)/busybox/util-linux/volume_id/util2.o
15 OBJS += $(TOP)/busybox/util-linux/volume_id/fat.o
16 OBJS += $(TOP)/busybox/util-linux/volume_id/ntfs.o
17 OBJS += $(TOP)/busybox/util-linux/volume_id/linux_swap.o
18 endif
20 all: libshared.so libshared.a
22 ifeq ($(CONFIG_BCMWL5),y)
23 OBJS += wlif_utils.o UdpLib.o
24 endif
26 libshared.so: $(OBJS)
27 @echo " [shared] LD $@"
28 @$(LD) $(LDFLAGS) -shared -o $@ $^
30 $(SIZECHECK)
31 $(CPTMP)
33 libshared.a: $(OBJS)
34 @echo " [shared] AR $@"
35 @rm -f $@
36 @$(AR) cruv $@ $^
39 install: all
40 @echo " [shared] Installing as $(INSTALLDIR)/usr/lib/libshared.so"
41 @install -d $(INSTALLDIR)/usr/lib
42 @install -m 755 libshared.so $(INSTALLDIR)/usr/lib
43 @$(STRIP) $(INSTALLDIR)/usr/lib/libshared.so
46 clean:
47 rm -f *.o *.so *.a .*.depend
49 %.o: %.c .%.depend
50 @echo " [shared] CC $@"
51 @$(CC) $(CFLAGS) -o $@ -c $<
53 .depend: $(OBJS:%.o=%.c)
54 @$(CC) $(CFLAGS) -M $^ > .depend
56 .%.depend: %.c
57 @$(CC) $(CFLAGS) -M $< > $@
59 -include $(OBJS:%.o=.%.depend)