add wificonf (wlconf,/sbin/wifi replacement)
[openwrt.git] / openwrt / package / openwrt / Makefile
1 # $Id$
2
3 include $(TOPDIR)/rules.mk
4
5 PKG_NAME := openwrt-utils
6 PKG_RELEASE := 1
7 PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME)
8 PKG_IPK:=$(PACKAGE_DIR)/$(PKG_NAME)_$(PKG_RELEASE)_$(ARCH).ipk
9 PKG_IPK_DIR:=$(PKG_BUILD_DIR)/ipkg
10
11 SHARED_INCLUDE:=${shell pwd}/include
12
13 libshared-compile libnvram-compile:
14 @$(MAKE) -C $(patsubst %-compile,%,$@) compile
15
16 libshared-install libnvram-install: libshared-compile libnvram-compile
17 @$(MAKE) -C $(patsubst %-install,%,$@) install
18
19 libshared-clean libnvram-clean wlc-clean:
20 @$(MAKE) -C $(patsubst %-clean,%,$@) clean
21
22 $(PKG_IPK_DIR)/sbin/mtd: mtd.c
23 mkdir -p $(PKG_IPK_DIR)/sbin
24 $(TARGET_CC) -o $@ $<
25
26 $(PKG_IPK_DIR)/sbin/jffs2root: jffs2root.c
27 mkdir -p $(PKG_IPK_DIR)/sbin
28 $(TARGET_CC) -o $@ $<
29
30 $(PKG_IPK_DIR)/usr/sbin/wlc: wlc.c libshared-install
31 mkdir -p $(PKG_IPK_DIR)/usr/sbin
32 $(TARGET_CC) -o $@ $< -lshared -L./libshared -I$(SHARED_INCLUDE)
33
34 $(PKG_IPK_DIR)/usr/sbin/wlconf: wlconf.c libshared-install libnvram-install
35 mkdir -p $(PKG_IPK_DIR)/usr/sbin
36 $(TARGET_CC) -o $@ $< -lshared -L./libshared -lnvram -L./libnvram -I$(SHARED_INCLUDE)
37
38 $(PKG_IPK): $(PKG_IPK_DIR)/sbin/mtd $(PKG_IPK_DIR)/sbin/jffs2root $(PKG_IPK_DIR)/usr/sbin/wlc $(PKG_IPK_DIR)/usr/sbin/wlconf
39 $(SCRIPT_DIR)/make-ipkg-dir.sh $(PKG_IPK_DIR) $(PKG_NAME).control $(PKG_RELEASE) $(ARCH)
40 $(STRIP) $(PKG_IPK_DIR)/usr/sbin/*
41 $(STRIP) $(PKG_IPK_DIR)/sbin/*
42 mkdir -p $(PACKAGE_DIR)
43 $(IPKG_BUILD) $(PKG_IPK_DIR) $(PACKAGE_DIR)
44
45 $(IPKG_STATE_DIR)/info/$(PKG_NAME).list: $(PKG_IPK)
46 $(IPKG) install $<
47
48 source:
49 prepare:
50 compile: prepare libnvram-compile libshared-compile $(PKG_IPK) $(PKG_WLCOMPAT)
51 mkdir -p $(STAGING_DIR)/usr/include
52 cp -a ./include/* $(STAGING_DIR)/usr/include/
53 install: libnvram-install libshared-install \
54 $(IPKG_STATE_DIR)/info/$(PKG_NAME).list \
55
56 clean: libshared-clean libnvram-clean
57 rm -rf $(PKG_BUILD_DIR)
58 rm -f $(PKG_IPK)
This page took 0.049781 seconds and 5 git commands to generate.