2 # Copyright (C) 2006 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
7 # $Id: Makefile 8444 2007-08-20 16:12:24Z nbd $
9 include $(TOPDIR
)/rules.mk
15 PKG_BUILD_DEPENDS
:=libjson
17 include $(INCLUDE_DIR
)/package.mk
19 define Package
/fonera-mp3d
22 DEPENDS
:=@TARGET_ATHEROS
23 TITLE
:=Daemon for fonera-mp3
26 define Package
/fonera-mp3d
/description
27 Daemon to drive a vs1011X mp3 decoder attached to the
31 mkdir
-p
$(PKG_BUILD_DIR
)
32 $(CP
) .
/src
/* $(PKG_BUILD_DIR
)/
36 $(MAKE
) -C
$(PKG_BUILD_DIR
) \
37 $(TARGET_CONFIGURE_OPTS
) \
38 CFLAGS
="$(TARGET_CFLAGS)"
39 $(MAKE
) -C
$(PKG_BUILD_DIR
)/cgi \
40 $(TARGET_CONFIGURE_OPTS
) \
41 CFLAGS
="$(TARGET_CFLAGS) -I $(STAGING_DIR)/usr/include/json" \
42 LDLIBS
="$(STAGING_DIR)/usr/lib/libjson.a"
43 $(MAKE
) -C
$(PKG_BUILD_DIR
)/cli \
44 $(TARGET_CONFIGURE_OPTS
) \
45 CFLAGS
="$(TARGET_CFLAGS)"
48 define Package
/fonera-mp3d
/install
49 $(INSTALL_DIR
) $(1)/usr
/bin
50 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/mp3d
$(1)/usr
/bin
/
51 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/cli
/mplay
$(1)/usr
/bin
/
52 $(INSTALL_DIR
) $(1)/www
/cgi-bin
53 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/cgi
/mp3.cgi
$(1)/www
/cgi-bin
/
54 ln
-sf mp3.cgi
$(1)/www
/cgi-bin
/mp3_cmd.cgi
55 ln
-sf mp3.cgi
$(1)/www
/cgi-bin
/mp3_json.cgi
56 ln
-sf mp3.cgi
$(1)/www
/cgi-bin
/mp3_remote.cgi
57 $(INSTALL_DIR
) $(1)/www
/local
58 $(INSTALL_DATA
) $(PKG_BUILD_DIR
)/cgi
/{stylesheet.css
,json.js
} $(1)/www
/local
/
61 $(eval
$(call BuildPackage
,fonera-mp3d
))