0849e8193e
Thanks to the pkgparentdir and pkgname functions, we can rewrite the GENTARGETS macro in a way that avoids the need for each package to repeat its name and the directory in which it is present. [Peter: pkgdir->pkgparentdir] Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
37 lines
993 B
Makefile
37 lines
993 B
Makefile
#############################################################
|
|
#
|
|
# luasocket
|
|
#
|
|
#############################################################
|
|
|
|
LUASOCKET_VERSION = 2.0.2
|
|
LUASOCKET_SITE = http://luaforge.net/frs/download.php/2664
|
|
LUASOCKET_DEPENDENCIES = lua
|
|
|
|
define LUASOCKET_BUILD_CMDS
|
|
$(MAKE) -C $(@D) -f makefile \
|
|
CC="$(TARGET_CC)" LD="$(TARGET_CC)" \
|
|
CFLAGS="$(TARGET_CFLAGS) -fPIC"
|
|
endef
|
|
|
|
define LUASOCKET_INSTALL_TARGET_CMDS
|
|
$(MAKE) -C $(@D) -f makefile \
|
|
INSTALL_TOP_SHARE="$(TARGET_DIR)/usr/share/lua" \
|
|
INSTALL_TOP_LIB="$(TARGET_DIR)/usr/lib/lua" install
|
|
endef
|
|
|
|
define LUASOCKET_UNINSTALL_TARGET_CMDS
|
|
rm -rf "$(TARGET_DIR)/usr/lib/lua/mime"
|
|
rm -rf "$(TARGET_DIR)/usr/lib/lua/socket"
|
|
rm -rf "$(TARGET_DIR)/usr/share/lua/socket"
|
|
rm -f "$(TARGET_DIR)/usr/share/lua/socket.lua"
|
|
rm -f "$(TARGET_DIR)/usr/share/lua/mime.lua"
|
|
rm -f "$(TARGET_DIR)/usr/share/lua/ltn12.lua"
|
|
endef
|
|
|
|
define LUASOCKET_CLEAN_CMDS
|
|
$(MAKE) -C $(@D) -f makefile clean
|
|
endef
|
|
|
|
$(eval $(call GENTARGETS))
|