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
:=@LINUX_2_6_ATHEROS
23 TITLE
:=Daemon for fonera-mp3
24 DESCRIPTION
:=Daemon to drive a vs1011X mp3 decoder attached to the \
29 mkdir
-p
$(PKG_BUILD_DIR
)
30 $(CP
) .
/src
/* $(PKG_BUILD_DIR
)/
34 $(MAKE
) -C
$(PKG_BUILD_DIR
) \
35 $(TARGET_CONFIGURE_OPTS
) \
36 CFLAGS
="$(TARGET_CFLAGS)"
37 $(MAKE
) -C
$(PKG_BUILD_DIR
)/cgi \
38 $(TARGET_CONFIGURE_OPTS
) \
39 CFLAGS
="$(TARGET_CFLAGS) -I $(STAGING_DIR)/usr/include/json" \
40 LDLIBS
="$(STAGING_DIR)/usr/lib/libjson.a"
41 $(MAKE
) -C
$(PKG_BUILD_DIR
)/cli \
42 $(TARGET_CONFIGURE_OPTS
) \
43 CFLAGS
="$(TARGET_CFLAGS)"
46 define Package
/fonera-mp3d
/install
47 $(INSTALL_DIR
) $(1)/usr
/bin
48 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/mp3d
$(1)/usr
/bin
/
49 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/cli
/mplay
$(1)/usr
/bin
/
50 $(INSTALL_DIR
) $(1)/www
/cgi-bin
51 $(INSTALL_DIR
) $(1)/www
/local
52 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/cgi
/{stylesheet.css
,json.js
} $(1)/www
/local
53 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/cgi
/mp3.cgi
$(1)/www
/cgi-bin
54 ln
-s mp3.cgi
$(1)/www
/cgi-bin
/mp3_cmd.cgi
55 ln
-s mp3.cgi
$(1)/www
/cgi-bin
/mp3_json.cgi
56 ln
-s mp3.cgi
$(1)/www
/cgi-bin
/mp3_remote.cgi
59 $(eval
$(call BuildPackage
,fonera-mp3d
))