3 include $(TOPDIR
)/rules.mk
5 PKG_NAME
:= openwrt-utils
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
11 SHARED_INCLUDE
:=${shell pwd
}/include
13 libshared-compile libnvram-compile
:
14 @
$(MAKE
) -C
$(patsubst %-compile
,%,$@
) compile
16 libshared-install libnvram-install
: libshared-compile libnvram-compile
17 @
$(MAKE
) -C
$(patsubst %-install,%,$@
) install
19 libshared-clean libnvram-clean
:
20 @
$(MAKE
) -C
$(patsubst %-clean,%,$@
) clean
22 $(PKG_IPK_DIR
)/sbin
/mtd
: mtd.c
23 mkdir
-p
$(PKG_IPK_DIR
)/sbin
26 $(PKG_IPK_DIR
)/sbin
/jffs2root
: jffs2root.c
27 mkdir
-p
$(PKG_IPK_DIR
)/sbin
30 $(PKG_IPK
): $(PKG_IPK_DIR
)/sbin
/mtd
$(PKG_IPK_DIR
)/sbin
/jffs2root
31 $(SCRIPT_DIR
)/make-ipkg-dir.sh
$(PKG_IPK_DIR
) $(PKG_NAME
).control
$(PKG_RELEASE
) $(ARCH
)
32 $(STRIP
) $(PKG_IPK_DIR
)/sbin
/*
33 mkdir
-p
$(PACKAGE_DIR
)
34 $(IPKG_BUILD
) $(PKG_IPK_DIR
) $(PACKAGE_DIR
)
36 $(IPKG_STATE_DIR
)/info/$(PKG_NAME
).list
: $(PKG_IPK
)
41 compile
: prepare libnvram-compile libshared-compile
$(PKG_IPK
) $(PKG_WLCOMPAT
)
42 mkdir
-p
$(STAGING_DIR
)/usr
/include
43 cp
-a .
/include/* $(STAGING_DIR
)/usr
/include/
44 install: libnvram-install libshared-install \
45 $(IPKG_STATE_DIR
)/info/$(PKG_NAME
).list \
47 clean: libshared-clean libnvram-clean
48 rm -rf
$(PKG_BUILD_DIR
)