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