Hi Matthias, Le dimanche 2 mai 2010 13:54:15, Matthias Buecher / Germany a écrit : > Tried to create an OpenWrt of a small VoIP proxy for a friend. > Unfortunately the source itself does not have a Makefile. > It just says "Use: gcc -o mjproxy md5.c mjproxy.c". > > How must the "Build/Compile" section look like for such a case?
It should look like this: $(TARGET_CC) -c $(PKG_BUILD_DIR)/mjproxy.c $(TARGET_CC) -c $(PKG_BUILD_DIR)/md5.c $(TARGET_CC) -o $(PKG_BUILD_DIR)/mjproxy $(PKG_BUILD_DIR)/mjproxy.o $(PKG_BUILD_DIR)/md5.o Have a look at how it is done for ifenslave for instance. > Looked at wiki and forum, but couldn't find any fitting information. > If I missed a link then please tell me. > Thanks in advance. > > Following is the current result of the OpenWrt Package Makefile. > > [packages] > net/magicjack-proxy/Makefile > # > # Copyright (C) 2010 OpenWrt.org > # > # This is free software, licensed under the GNU General Public License v2. > # See /LICENSE for more information. > # > > include $(TOPDIR)/rules.mk > > PKG_NAME:=magicjack-proxy > PKG_VERSION:=1 > PKG_RELEASE:=1 > > PKG_SOURCE:=mjproxy.c.tar.gz > PKG_SOURCE_URL:=http://www.mediafire.com/file/yzwmjzotmyy > PKG_MD5SUM:=01262075cc72ad804f1d6b5dc181113b > > PKG_INSTALL:=1 > > include $(INCLUDE_DIR)/package.mk > > define Package/magicjack-proxy > SECTION:=net > CATEGORY:=Network > TITLE:=MagicJack Proxy > URL:=http://www.magicjacksupport.com/post42750.html#42750 > # DEPENDS:= > endef > > define Package/magicjack-proxy/description > Proxy for MagicJack (VoIP service provider, http://www.magicjack.com/) > endef > > #define Package/magicjack-proxy/conffiles > #endef > > define Build/Compile > #No Makefile available > #gcc -o mjproxy md5.c mjproxy.c > #ToDo: How to do it the right OpenWrt way? > #??? $(call Build/Compile/Default) > $(MAKE) -C $(PKG_BUILD_DIR) \ > $(TARGET_CONFIGURE_OPTS) \ > CFLAGS="$(TARGET_CFLAGS)" \ > USELIBWRAP= \ > all > endef > > define Package/magicjack-proxy/install > $(INSTALL_DIR) $(1)/usr/bin > $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/mjproxy $(1)/usr/bin/ > endef > > $(eval $(call BuildPackage,magicjack-proxy)) > _______________________________________________ > openwrt-devel mailing list > [email protected] > https://lists.openwrt.org/mailman/listinfo/openwrt-devel >
signature.asc
Description: This is a digitally signed message part.
_______________________________________________ openwrt-devel mailing list [email protected] https://lists.openwrt.org/mailman/listinfo/openwrt-devel
