xref: /OK3568_Linux_fs/buildroot/package/libgsm/libgsm.mk (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1################################################################################
2#
3# libgsm
4#
5################################################################################
6
7LIBGSM_VERSION = 1.0.19
8LIBGSM_SOURCE = gsm-$(LIBGSM_VERSION).tar.gz
9LIBGSM_SITE = http://www.quut.com/gsm
10LIBGSM_LICENSE = gsm
11LIBGSM_LICENSE_FILES = COPYRIGHT
12LIBGSM_INSTALL_STAGING = YES
13
14define LIBGSM_BUILD_CMDS
15	$(TARGET_MAKE_ENV) $(MAKE) CC=$(TARGET_CC) -C $(@D)
16endef
17
18# Install targets are not safe for parallel jobs. However, since there's
19# just only a bunch of files to install, just do it manually. Note that,
20# even though the package version is '1.0.16', the solib is generated as
21# '1.0.13' and its SONAME is just '1'.
22#
23# For staging, we install all the .so symlinks, and the header.
24define LIBGSM_INSTALL_STAGING_CMDS
25	$(INSTALL) -D -m 0644 $(@D)/inc/gsm.h $(STAGING_DIR)/usr/include/gsm.h
26	$(INSTALL) -D -m 0644 $(@D)/lib/libgsm.so.1.0.13 $(STAGING_DIR)/usr/lib/libgsm.so.1.0.13
27	ln -sf libgsm.so.1.0.13 $(STAGING_DIR)/usr/lib/libgsm.so.1
28	ln -sf libgsm.so.1.0.13 $(STAGING_DIR)/usr/lib/libgsm.so
29endef
30
31# Install targets are not safe for parallel jobs. However, since there's
32# just only a bunch of files to install, just do it manually. Note that,
33# even though the package version is '1.0.16', the solib is versioned as
34# '1.0.13' and its SONAME is just versioned with '1'.
35#
36# For target, we just need the library to be installed as its SONAME, and
37# the programs.
38define LIBGSM_INSTALL_TARGET_CMDS
39	$(INSTALL) -D -m 0644 $(@D)/lib/libgsm.so.1.0.13 $(TARGET_DIR)/usr/lib/libgsm.so.1
40	$(INSTALL) -D -m 0755 $(@D)/bin/toast $(TARGET_DIR)/usr/bin/toast
41	$(INSTALL) -D -m 0755 $(@D)/bin/tcat $(TARGET_DIR)/usr/bin/tcat
42	$(INSTALL) -D -m 0755 $(@D)/bin/untoast $(TARGET_DIR)/usr/bin/untoast
43endef
44
45$(eval $(generic-package))
46