3 include $(TOPDIR
)/rules.mk
5 SHARED_INCLUDE
:=${shell pwd
}/include
7 libshared-compile libnvram-compile wlc-compile
:
8 @
$(MAKE
) -C
$(patsubst %-compile
,%,$@
) compile
10 libshared-install libnvram-install wlc-install
:
11 @
$(MAKE
) -C
$(patsubst %-install,%,$@
) install
13 libshared-clean libnvram-clean wlc-clean
:
14 @
$(MAKE
) -C
$(patsubst %-clean,%,$@
) clean
16 $(TARGET_DIR
)/sbin
/mtd
: mtd.c
20 $(TARGET_DIR
)/sbin
/jffs2root
: jffs2root.c
24 # wlconf tool extracted from linksys firmware GPL.unpackedtree
25 # WRT54GS_3_37_2_1109_US
26 LINKSYS_TGZ_SITE
=http
://openwrt.openbsd-geek.de
27 LINKSYS_TGZ_MD5SUM
=1b596e5bf26d2898d1eab5bd200bee58
28 LINKSYS_WLCONF_TGZ
=linksys-wlconf.
tar.gz
29 LINKSYS_WLCONF_DIR
=$(BUILD_DIR
)/linksys-wlconf
31 $(DL_DIR
)/$(LINKSYS_WLCONF_TGZ
):
32 $(SCRIPT_DIR
)/download.pl
$(DL_DIR
) $(LINKSYS_WLCONF_TGZ
) $(LINKSYS_TGZ_MD5SUM
) $(LINKSYS_TGZ_SITE
)
34 $(LINKSYS_WLCONF_DIR
)/.unpacked
: $(DL_DIR
)/$(LINKSYS_WLCONF_TGZ
)
35 zcat
$(DL_DIR
)/$(LINKSYS_WLCONF_TGZ
) |
tar -C
$(BUILD_DIR
) $(TAR_OPTIONS
) -
36 touch
$(LINKSYS_WLCONF_DIR
)/.unpacked
38 $(TARGET_DIR
)/usr
/sbin
/wlconf
: $(LINKSYS_WLCONF_DIR
)/.unpacked
39 $(MAKE
) -C
$(LINKSYS_WLCONF_DIR
) INSTALLDIR
=$(TARGET_DIR
) \
40 CC
=$(TARGET_CC
) LD
=$(TARGET_CROSS
)ld STRIP
="$(STRIP)" \
41 CFLAGS
="$(TARGET_CFLAGS) -I. -I$(SHARED_INCLUDE) \
42 -Wall -DOPENWRT_WLCONF" \
43 LDFLAGS
="-lnvram -lshared" \
49 compile
: libnvram-compile libshared-compile wlc-compile
50 install: libnvram-install libshared-install wlc-install \
51 $(TARGET_DIR
)/sbin
/mtd
$(TARGET_DIR
)/sbin
/jffs2root
$(TARGET_DIR
)/usr
/sbin
/wlconf
53 clean: libnvram-clean libshared-clean wlc-clean
54 rm -rf
$(LINKSYS_WLCONF_DIR
)
55 rm -f
$(TARGET_DIR
)/sbin
/mtd
56 rm -f
$(TARGET_DIR
)/sbin
/jffs2root