]> rtime.felk.cvut.cz Git - coffee/buildroot.git/blob - package/4th/4th.mk
Globally replace $(HOST_DIR)/usr/bin with $(HOST_DIR)/bin
[coffee/buildroot.git] / package / 4th / 4th.mk
1 ################################################################################
2 #
3 # 4th
4 #
5 ################################################################################
6
7 4TH_VERSION = 3.62.4
8 4TH_SOURCE = 4th-$(4TH_VERSION)-unix.tar.gz
9 4TH_SITE = http://downloads.sourceforge.net/project/forth-4th/4th-$(4TH_VERSION)
10 4TH_LICENSE = GPL-3.0+, LGPL-3.0+
11 # The COPYING file only contains the text of the LGPL-3.0, but the
12 # source code really contains parts under GPL-3.0+.
13 4TH_LICENSE_FILES = COPYING
14 4TH_DEPENDENCIES = host-4th
15 4TH_INSTALL_STAGING = YES
16
17 4TH_CFLAGS = $(TARGET_CFLAGS) -DUNIX -fsigned-char
18
19 ifeq ($(BR2_STATIC_LIBS),y)
20 4TH_MAKE_ENV = $(TARGET_MAKE_ENV) STATIC=1
21 else
22 4TH_MAKE_ENV = $(TARGET_MAKE_ENV) SHARED=1
23 4TH_CFLAGS += -fPIC
24 endif
25
26 define 4TH_BUILD_CMDS
27         $(4TH_MAKE_ENV) $(MAKE) -C $(@D)/sources all \
28                 CROSS="$(TARGET_CROSS)" \
29                 CFLAGS="$(4TH_CFLAGS)" \
30                 FOURTH=$(HOST_DIR)/bin/4th
31 endef
32
33 define 4TH_INSTALL_STAGING_CMDS
34         $(4TH_MAKE_ENV) $(MAKE) -C $(@D)/sources libinstall \
35                 LIBRARIES=$(STAGING_DIR)/usr/lib
36         $(INSTALL) -D -m 0644 $(@D)/sources/4th.h \
37                 $(STAGING_DIR)/usr/include/4th.h
38 endef
39
40 define 4TH_INSTALL_TARGET_CMDS
41         mkdir -p $(TARGET_DIR)/usr/bin
42         mkdir -p $(TARGET_DIR)/usr/lib
43         $(4TH_MAKE_ENV) $(MAKE) -C $(@D)/sources mostlyinstall \
44                 BINARIES=$(TARGET_DIR)/usr/bin \
45                 LIBRARIES=$(TARGET_DIR)/usr/lib
46         mkdir -p $(TARGET_DIR)/usr/share/4th/lib
47         cp -dpf $(@D)/4th/*.4th $(TARGET_DIR)/usr/share/4th
48         cp -dpf $(@D)/4th/lib/*.4th $(TARGET_DIR)/usr/share/4th/lib
49         mkdir -p $(TARGET_DIR)/usr/share/4th/demo
50         cp -dpf $(@D)/4th/demo/*.4th $(TARGET_DIR)/usr/share/4th/demo
51         mkdir -p $(TARGET_DIR)/usr/share/4th/4pp/lib
52         cp -dpf $(@D)/4th/4pp/*.4pp $(TARGET_DIR)/usr/share/4th/4pp
53         cp -dpf $(@D)/4th/4pp/lib/*.4pp $(TARGET_DIR)/usr/share/4th/4pp/lib
54 endef
55
56 define HOST_4TH_BUILD_CMDS
57         $(HOST_MAKE_ENV) $(MAKE) -C $(@D)/sources all \
58                 CFLAGS="$(HOST_CFLAGS) -DUNIX -fsigned-char"
59 endef
60
61 define HOST_4TH_INSTALL_CMDS
62         mkdir -p $(HOST_DIR)/bin
63         mkdir -p $(HOST_DIR)/usr/lib
64         $(HOST_MAKE_ENV) $(MAKE) -C $(@D)/sources mostlyinstall \
65                 BINARIES=$(HOST_DIR)/bin \
66                 LIBRARIES=$(HOST_DIR)/usr/lib
67 endef
68
69 $(eval $(generic-package))
70 $(eval $(host-generic-package))