nbd, why you use copyright notice from broadcom, for your own makefiles?! something...
[openwrt.git] / package / openwrt / Makefile
1 include $(TOPDIR)/rules.mk
2
3 SHARED_INCLUDE:=${shell pwd}/include
4
5 libshared-compile libnvram-compile wlc-compile:
6 @$(MAKE) -C $(patsubst %-compile,%,$@) compile
7
8 libshared-install libnvram-install wlc-install:
9 @$(MAKE) -C $(patsubst %-install,%,$@) install
10
11 libshared-clean libnvram-clean wlc-clean:
12 @$(MAKE) -C $(patsubst %-clean,%,$@) clean
13
14 $(TARGET_DIR)/sbin/mtd: mtd.c
15 $(TARGET_CC) -o $@ $<
16 $(STRIP) $@
17
18 $(TARGET_DIR)/sbin/jffs2root: jffs2root.c
19 $(TARGET_CC) -o $@ $<
20 $(STRIP) $@
21
22 # wlconf tool extracted from linksys firmware GPL.unpackedtree
23 # WRT54GS_3_37_2_1109_US
24 LINKSYS_TGZ_SITE=http://openwrt.openbsd-geek.de
25 LINKSYS_WLCONF_TGZ=linksys-wlconf.tar.gz
26 LINKSYS_WLCONF_DIR=$(BUILD_DIR)/linksys-wlconf
27
28 $(DL_DIR)/$(LINKSYS_WLCONF_TGZ):
29 $(WGET) -P $(DL_DIR) $(LINKSYS_TGZ_SITE)/$(LINKSYS_WLCONF_TGZ)
30
31 $(LINKSYS_WLCONF_DIR)/.unpacked: $(DL_DIR)/$(LINKSYS_WLCONF_TGZ)
32 zcat $(DL_DIR)/$(LINKSYS_WLCONF_TGZ) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
33 touch $(LINKSYS_WLCONF_DIR)/.unpacked
34
35 $(TARGET_DIR)/usr/sbin/wlconf: $(LINKSYS_WLCONF_DIR)/.unpacked
36 $(MAKE) -C $(LINKSYS_WLCONF_DIR) INSTALLDIR=$(TARGET_DIR) \
37 CC=$(TARGET_CC) LD=$(TARGET_CROSS)ld STRIP="$(STRIP)" \
38 CFLAGS="$(TARGET_CFLAGS) -I. -I$(SHARED_INCLUDE) \
39 -Wall -DOPENWRT_WLCONF" \
40 LDFLAGS="-lnvram -lshared" \
41 install
42 $(STRIP) $@
43
44 source:
45 prepare:
46 compile: libnvram-compile libshared-compile wlc-compile
47 install: libnvram-install libshared-install wlc-install \
48 $(TARGET_DIR)/sbin/mtd $(TARGET_DIR)/sbin/jffs2root $(TARGET_DIR)/usr/sbin/wlconf
49
50 clean: libnvram-clean libshared-clean wlc-clean
51 rm -rf $(LINKSYS_WLCONF_DIR)
52 rm -f $(TARGET_DIR)/sbin/mtd
53 rm -f $(TARGET_DIR)/sbin/jffs2root
This page took 0.045952 seconds and 5 git commands to generate.