1 #############################################################
5 #############################################################
7 OPENWRT_SITE
=http
://openwrt.openbsd-geek.de
10 OPENWRT_SHARED_SOURCE
=openwrt-shared.
tar.gz
11 OPENWRT_SHARED_DIR
=$(BUILD_DIR
)/openwrt-shared
12 OPENWRT_SHARED_TARGET_BINARY
:=usr
/lib
/libshared.so
14 $(DL_DIR
)/$(OPENWRT_SHARED_SOURCE
):
15 $(WGET
) -P
$(DL_DIR
) $(OPENWRT_SITE
)/$(OPENWRT_SHARED_SOURCE
)
17 $(OPENWRT_SHARED_DIR
)/.source
: $(DL_DIR
)/$(OPENWRT_SHARED_SOURCE
)
18 zcat
$(DL_DIR
)/$(OPENWRT_SHARED_SOURCE
) |
tar -C
$(BUILD_DIR
) $(TAR_OPTIONS
) -
19 touch
$(OPENWRT_SHARED_DIR
)/.source
21 $(TARGET_DIR
)/$(OPENWRT_SHARED_TARGET_BINARY
): $(OPENWRT_SHARED_DIR
)/.source
22 $(MAKE
) -C
$(OPENWRT_SHARED_DIR
) -f Makefile-openwrt \
23 INSTALLDIR
=$(TARGET_DIR
) \
24 CC
=$(TARGET_CC
) LD
=$(TARGET_CROSS
)ld STRIP
="$(STRIP)" \
25 CFLAGS
="$(TARGET_CFLAGS) -I. -I../binary/include -Wall -I$(OPENWRT_SRCBASE)/" \
28 openwrt-shared
: $(TARGET_DIR
)/$(OPENWRT_SHARED_TARGET_BINARY
)
31 -$(MAKE
) -C
$(OPENWRT_SHARED_DIR
) clean
35 OPENWRT_NVRAM_SOURCE
=openwrt-nvram.
tar.gz
36 OPENWRT_NVRAM_DIR
=$(BUILD_DIR
)/openwrt-nvram
37 OPENWRT_NVRAM_TARGET_BINARY
:=usr
/sbin
/nvram
39 $(DL_DIR
)/$(OPENWRT_NVRAM_SOURCE
):
40 $(WGET
) -P
$(DL_DIR
) $(OPENWRT_SITE
)/$(OPENWRT_NVRAM_SOURCE
)
42 $(OPENWRT_NVRAM_DIR
)/.source
: $(DL_DIR
)/$(OPENWRT_NVRAM_SOURCE
)
43 zcat
$(DL_DIR
)/$(OPENWRT_NVRAM_SOURCE
) |
tar -C
$(BUILD_DIR
) $(TAR_OPTIONS
) -
44 touch
$(OPENWRT_NVRAM_DIR
)/.source
46 $(TARGET_DIR
)/$(OPENWRT_NVRAM_TARGET_BINARY
): $(OPENWRT_NVRAM_DIR
)/.source
47 $(MAKE
) -C
$(OPENWRT_NVRAM_DIR
) INSTALLDIR
=$(TARGET_DIR
) \
48 CC
=$(TARGET_CC
) LD
=$(TARGET_CROSS
)ld STRIP
="$(STRIP)" \
49 CFLAGS
="$(TARGET_CFLAGS) -I. -I../binary/include -Wall -DOPENWRT_NVRAM" \
52 openwrt-nvram
: $(TARGET_DIR
)/$(OPENWRT_NVRAM_TARGET_BINARY
)
55 -$(MAKE
) -C
$(OPENWRT_NVRAM_BUILD_DIR
) clean
58 OPENWRT_MTD_SOURCE
=package
/openwrt
/mtd.c
59 OPENWRT_MTD_TARGET_BINARY
:=sbin
/mtd
61 $(TARGET_DIR
)/$(OPENWRT_MTD_TARGET_BINARY
):
62 $(TARGET_CC
) -o
$(TARGET_DIR
)/$(OPENWRT_MTD_TARGET_BINARY
) $(OPENWRT_MTD_SOURCE
)
64 openwrt-mtd
: $(TARGET_DIR
)/$(OPENWRT_MTD_TARGET_BINARY
)
67 OPENWRT_WLCONF_SOURCE
=openwrt-wlconf.
tar.gz
68 OPENWRT_WLCONF_DIR
=$(BUILD_DIR
)/openwrt-wlconf
69 OPENWRT_WLCONF_TARGET_BINARY
:=usr
/sbin
/wlconf
71 $(DL_DIR
)/$(OPENWRT_WLCONF_SOURCE
):
72 $(WGET
) -P
$(DL_DIR
) $(OPENWRT_SITE
)/$(OPENWRT_WLCONF_SOURCE
)
74 $(OPENWRT_WLCONF_DIR
)/.source
: $(DL_DIR
)/$(OPENWRT_WLCONF_SOURCE
)
75 zcat
$(DL_DIR
)/$(OPENWRT_WLCONF_SOURCE
) |
tar -C
$(BUILD_DIR
) $(TAR_OPTIONS
) -
76 touch
$(OPENWRT_WLCONF_DIR
)/.source
78 $(TARGET_DIR
)/$(OPENWRT_WLCONF_TARGET_BINARY
): $(OPENWRT_WLCONF_DIR
)/.source
79 $(MAKE
) -C
$(OPENWRT_WLCONF_DIR
) INSTALLDIR
=$(TARGET_DIR
) \
80 CC
=$(TARGET_CC
) LD
=$(TARGET_CROSS
)ld STRIP
="$(STRIP)" \
81 CFLAGS
="$(TARGET_CFLAGS) -I. -I../binary/include -I$(BUILD_DIR)/openwrt-shared \
82 -I$(BUILD_DIR)/openwrt-nvram -Wall -DOPENWRT_WLCONF" \
83 LDFLAGS
="-lnvram -lshared -L$(BUILD_DIR)/openwrt-shared -L$(BUILD_DIR)/openwrt-nvram" \
86 openwrt-wlconf
: $(TARGET_DIR
)/$(OPENWRT_WLCONF_TARGET_BINARY
)
89 -$(MAKE
) -C
$(OPENWRT_WLCONF_BUILD_DIR
) clean
92 openwrt
: openwrt-shared openwrt-nvram openwrt-mtd openwrt-wlconf