2016-07-05 21:05:20 +02:00
|
|
|
################################################################################
|
|
|
|
#
|
|
|
|
# 4th
|
|
|
|
#
|
|
|
|
################################################################################
|
|
|
|
|
|
|
|
4TH_VERSION = 3.62.4
|
|
|
|
4TH_SOURCE = 4th-$(4TH_VERSION)-unix.tar.gz
|
|
|
|
4TH_SITE = http://downloads.sourceforge.net/project/forth-4th/4th-$(4TH_VERSION)
|
|
|
|
4TH_LICENSE = GPLv3+, LGPLv3+
|
|
|
|
# The COPYING file only contains the text of the LGPLv3, but the
|
|
|
|
# source code really contains parts under GPLv3+.
|
|
|
|
4TH_LICENSE_FILES = COPYING
|
|
|
|
4TH_DEPENDENCIES = host-4th
|
|
|
|
4TH_INSTALL_STAGING = YES
|
|
|
|
|
2016-07-07 10:03:34 +02:00
|
|
|
4TH_CFLAGS = $(TARGET_CFLAGS) -DUNIX -fsigned-char
|
|
|
|
|
2016-07-05 21:05:20 +02:00
|
|
|
ifeq ($(BR2_STATIC_LIBS),y)
|
2016-10-17 18:06:23 +02:00
|
|
|
4TH_MAKE_ENV = $(TARGET_MAKE_ENV) STATIC=1
|
2016-07-05 21:05:20 +02:00
|
|
|
else
|
2016-10-17 18:06:23 +02:00
|
|
|
4TH_MAKE_ENV = $(TARGET_MAKE_ENV) SHARED=1
|
2016-07-07 10:03:34 +02:00
|
|
|
4TH_CFLAGS += -fPIC
|
2016-07-05 21:05:20 +02:00
|
|
|
endif
|
|
|
|
|
|
|
|
define 4TH_BUILD_CMDS
|
|
|
|
$(4TH_MAKE_ENV) $(MAKE) -C $(@D)/sources all \
|
|
|
|
CROSS="$(TARGET_CROSS)" \
|
2016-07-07 10:03:34 +02:00
|
|
|
CFLAGS="$(4TH_CFLAGS)" \
|
2016-07-05 21:05:20 +02:00
|
|
|
FOURTH=$(HOST_DIR)/usr/bin/4th
|
|
|
|
endef
|
|
|
|
|
|
|
|
define 4TH_INSTALL_STAGING_CMDS
|
|
|
|
$(4TH_MAKE_ENV) $(MAKE) -C $(@D)/sources libinstall \
|
|
|
|
LIBRARIES=$(STAGING_DIR)/usr/lib
|
|
|
|
$(INSTALL) -D -m 0644 $(@D)/sources/4th.h \
|
|
|
|
$(STAGING_DIR)/usr/include/4th.h
|
|
|
|
endef
|
|
|
|
|
|
|
|
define 4TH_INSTALL_TARGET_CMDS
|
2016-07-06 23:11:16 +02:00
|
|
|
mkdir -p $(TARGET_DIR)/usr/bin
|
|
|
|
mkdir -p $(TARGET_DIR)/usr/lib
|
2016-07-05 21:05:20 +02:00
|
|
|
$(4TH_MAKE_ENV) $(MAKE) -C $(@D)/sources mostlyinstall \
|
|
|
|
BINARIES=$(TARGET_DIR)/usr/bin \
|
|
|
|
LIBRARIES=$(TARGET_DIR)/usr/lib
|
|
|
|
mkdir -p $(TARGET_DIR)/usr/share/4th/lib
|
|
|
|
cp -dpf $(@D)/4th/*.4th $(TARGET_DIR)/usr/share/4th
|
|
|
|
cp -dpf $(@D)/4th/lib/*.4th $(TARGET_DIR)/usr/share/4th/lib
|
|
|
|
mkdir -p $(TARGET_DIR)/usr/share/4th/demo
|
|
|
|
cp -dpf $(@D)/4th/demo/*.4th $(TARGET_DIR)/usr/share/4th/demo
|
|
|
|
mkdir -p $(TARGET_DIR)/usr/share/4th/4pp/lib
|
|
|
|
cp -dpf $(@D)/4th/4pp/*.4pp $(TARGET_DIR)/usr/share/4th/4pp
|
|
|
|
cp -dpf $(@D)/4th/4pp/lib/*.4pp $(TARGET_DIR)/usr/share/4th/4pp/lib
|
|
|
|
endef
|
|
|
|
|
|
|
|
define HOST_4TH_BUILD_CMDS
|
2016-10-17 18:06:24 +02:00
|
|
|
$(HOST_MAKE_ENV) $(MAKE) -C $(@D)/sources all \
|
2016-07-05 21:05:20 +02:00
|
|
|
CFLAGS="$(HOST_CFLAGS) -DUNIX -fsigned-char"
|
|
|
|
endef
|
|
|
|
|
|
|
|
define HOST_4TH_INSTALL_CMDS
|
2016-07-06 23:11:16 +02:00
|
|
|
mkdir -p $(HOST_DIR)/usr/bin
|
|
|
|
mkdir -p $(HOST_DIR)/usr/lib
|
2016-10-17 18:06:24 +02:00
|
|
|
$(HOST_MAKE_ENV) $(MAKE) -C $(@D)/sources mostlyinstall \
|
2016-07-05 21:05:20 +02:00
|
|
|
BINARIES=$(HOST_DIR)/usr/bin \
|
|
|
|
LIBRARIES=$(HOST_DIR)/usr/lib
|
|
|
|
endef
|
|
|
|
|
|
|
|
$(eval $(generic-package))
|
|
|
|
$(eval $(host-generic-package))
|