mtd update for jffs2 rootsystems
[openwrt.git] / package / openwrt / Makefile
1 # $Id$
2
3 include $(TOPDIR)/rules.mk
4
5 SHARED_INCLUDE:=${shell pwd}/include
6
7 libshared-compile libnvram-compile wlc-compile:
8 @$(MAKE) -C $(patsubst %-compile,%,$@) compile
9
10 libshared-install libnvram-install wlc-install:
11 @$(MAKE) -C $(patsubst %-install,%,$@) install
12
13 libshared-clean libnvram-clean wlc-clean:
14 @$(MAKE) -C $(patsubst %-clean,%,$@) clean
15
16 $(TARGET_DIR)/sbin/mtd: mtd.c
17 $(TARGET_CC) -o $@ $<
18 $(STRIP) $@
19
20 $(TARGET_DIR)/sbin/jffs2root: jffs2root.c
21 $(TARGET_CC) -o $@ $<
22 $(STRIP) $@
23
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
30
31 $(DL_DIR)/$(LINKSYS_WLCONF_TGZ):
32 $(SCRIPT_DIR)/download.pl $(DL_DIR) $(LINKSYS_WLCONF_TGZ) $(LINKSYS_TGZ_MD5SUM) $(LINKSYS_TGZ_SITE)
33
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
37
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" \
44 install
45 $(STRIP) $@
46
47 source:
48 prepare:
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
52
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
This page took 0.049673 seconds and 5 git commands to generate.