Skip to contentSkip to conversation

package/alac: new package

PATCH New Marc Chalain 3 participants 5 messages Jul 27, 2020 – Sep 7, 2020

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 package/alac: new package

From: Marc Chalain <[email protected]>

The Apple Lossless Audio Codec (ALAC) is an audio codec developed by Apple and supported on iPhone, iPad, most iPods, Mac and iTunes. ALAC is a data compression method which reduces the size of audio files with no loss of information. A decoded ALAC stream is bit-for-bit identical to the original uncompressed audio file.

https://macosforge.github.io/alac/

A patch fix problem to link the convert utility with libalac.a

---
 package/Config.in                             |  1 +
 ...rary-and-objects-to-link-all-symbols.patch | 26 ++++++++++++++
 package/alac/Config.in                        | 16 +++++++++
 package/alac/alac.hash                        |  2 ++
 package/alac/alac.mk                          | 35 +++++++++++++++++++
 5 files changed, 80 insertions(+)
 create mode 100644 package/alac/0001-reorder-library-and-objects-to-link-all-symbols.patch
 create mode 100644 package/alac/Config.in
 create mode 100644 package/alac/alac.hash
 create mode 100644 package/alac/alac.mk
package/Config.in +1 -0
index 5c30d27b7a..4a03a67a0d 100644
@@ -1239,6 +1239,7 @@ endmenu
 menu "Libraries"
 
 menu "Audio/Sound"
+	source "package/alac/Config.in"
 	source "package/alsa-lib/Config.in"
 	source "package/alure/Config.in"
 	source "package/aubio/Config.in"
package/alac/0001-reorder-library-and-objects-to-link-all-symbols.patch new file +26 -0
new file mode 100644
index 0000000000..580a18d3a6
@@ -0,0 +1,26 @@
+convert-utility: reorder library and objects to link all symbols
+
+Signed-off-by: Marc Chalain <[email protected]>
+
+--- a/convert-utility/makefile
++++ b/convert-utility/makefile
+@@ -1,7 +1,8 @@
+ # alacconvert make
+ 
+ CFLAGS = -g -O3 -c
+-LFLAGS = -Wall -L$(CODECDIR) -lalac
++LFLAGS = -Wall -L$(CODECDIR)
++LIBS = -lalac
+ CC = g++
+ 
+ SRCDIR = .
+@@ -30,7 +31,7 @@ CAFFileALAC.o
+ 
+ alacconvert:	$(OBJS)
+ 	(cd $(CODECDIR); $(MAKE))
+-	$(CC) $(LFLAGS) $(OBJS) -o alacconvert
++	$(CC) $(LFLAGS) $(OBJS) $(LIBS) -o alacconvert
+ 
+ main.o : main.cpp
+ 	$(CC) -I $(INCLUDES) $(CFLAGS) main.cpp
+
package/alac/Config.in new file +16 -0
new file mode 100644
index 0000000000..2f1d4a1077
@@ -0,0 +1,16 @@
+config BR2_PACKAGE_ALAC
+	bool "Apple Lossless Audio Codec"
+	help
+	  Alac is an audio codec developed by Apple and
+	  supported on iPhone, iPad, most iPods, Mac and
+	  iTunes. ALAC is a data compression method which
+	  reduces the size of audio files with no loss
+	  of information. A decoded ALAC stream is bit-for-bit
+	  identical to the original uncompressed audio file
+
+	  https://macosforge.github.io/alac/
+
+
+config BR2_PACKAGE_ALAC_CONVERT
+	bool "binary converter"
+	depends on BR2_PACKAGE_ALAC
package/alac/alac.hash new file +2 -0
new file mode 100644
index 0000000000..9477916558
@@ -0,0 +1,2 @@
+sha256 98635ece42fb1c3fceb75eaa4b5164d866e09f0195b3e7ec4085f1123c5e272f  alac-c38887c5c5e64a4b31108733bd79ca9b2496d987.tar.gz
+sha256 a337314dd82d26791112c1e5a85725b2eb92f5b7e6f9102fa4eaa2903f77518f  LICENSE
package/alac/alac.mk new file +35 -0
new file mode 100644
index 0000000000..64227eaa2e
@@ -0,0 +1,35 @@
+################################################################################
+#
+# alac
+#
+################################################################################
+
+ALAC_VERSION = c38887c5c5e64a4b31108733bd79ca9b2496d987
+ALAC_SITE =$(call github,macosforge,alac,$(ALAC_VERSION))
+ALAC_LICENSE = APACHE
+ALAC_LICENSE_FILES = LICENSE
+ALAC_INSTALL_STAGING = YES
+
+ALAC_MAKE_OPTS =  CC=$(TARGET_CXX)
+
+ifeq ($(BR2_PACKAGE_ALAC_CONVERT),y)
+define ALACCONVERT_BUILD_CMDS
+	$(MAKE) $(ALAC_MAKE_OPTS) -C $(@D)/convert-utility
+endef
+define ALAC_INSTALL_TARGET_CMDS
+	$(INSTALL) -D -m 755 $(@D)/convert-utility/alacconvert $(TARGET_DIR)/usr/bin
+endef
+endif
+
+define ALAC_BUILD_CMDS
+	$(MAKE) $(ALAC_MAKE_OPTS) -C $(@D)/codec
+	$(ALACCONVERT_BUILD_CMDS)
+endef
+
+define ALAC_INSTALL_STAGING_CMDS
+	$(INSTALL) -D -m 644 $(@D)/codec/libalac.a      $(STAGING_DIR)/usr/lib/libalac.a
+	$(INSTALL) -D -m 644 $(@D)/codec/ALACDecoder.h  $(STAGING_DIR)/usr/include/ALACDecoder.h
+	$(INSTALL) -D -m 644 $(@D)/codec/ALACEncoder.h  $(STAGING_DIR)/usr/include/ALACEncoder.h
+endef
+
+$(eval $(generic-package))
Signature · 1 line
2.17.1
#1 lore raw

PATCH 1/1 package/alac: new package

Hello Marc,

Le 27/07/2020 ? 17:27, Marc Chalain a ?crit?:

Quoted 7 lines

From: Marc Chalain <[email protected]>

The Apple Lossless Audio Codec (ALAC) is an audio codec developed by Apple and supported on iPhone, iPad, most iPods, Mac and iTunes. ALAC is a data compression method which reduces the size of audio files with no loss of information. A decoded ALAC stream is bit-for-bit identical to the original uncompressed audio file.

https://macosforge.github.io/alac/

A patch fix problem to link the convert utility with libalac.a

Did you try with the alac library provided by libaudiofile package ? It's seems libaudiofile provide the same functionality.

Best regards,
Romain

Quoted 130 lines
---
 package/Config.in                             |  1 +
 ...rary-and-objects-to-link-all-symbols.patch | 26 ++++++++++++++
 package/alac/Config.in                        | 16 +++++++++
 package/alac/alac.hash                        |  2 ++
 package/alac/alac.mk                          | 35 +++++++++++++++++++
 5 files changed, 80 insertions(+)
 create mode 100644 package/alac/0001-reorder-library-and-objects-to-link-all-symbols.patch
 create mode 100644 package/alac/Config.in
 create mode 100644 package/alac/alac.hash
 create mode 100644 package/alac/alac.mk
package/Config.in +1 -0
index 5c30d27b7a..4a03a67a0d 100644
@@ -1239,6 +1239,7 @@ endmenu
 menu "Libraries"
 
 menu "Audio/Sound"
+	source "package/alac/Config.in"
 	source "package/alsa-lib/Config.in"
 	source "package/alure/Config.in"
 	source "package/aubio/Config.in"
package/alac/0001-reorder-library-and-objects-to-link-all-symbols.patch new file +26 -0
new file mode 100644
index 0000000000..580a18d3a6
@@ -0,0 +1,26 @@
+convert-utility: reorder library and objects to link all symbols
+
+Signed-off-by: Marc Chalain <[email protected]>
+
+--- a/convert-utility/makefile
++++ b/convert-utility/makefile
+@@ -1,7 +1,8 @@
+ # alacconvert make
+ 
+ CFLAGS = -g -O3 -c
+-LFLAGS = -Wall -L$(CODECDIR) -lalac
++LFLAGS = -Wall -L$(CODECDIR)
++LIBS = -lalac
+ CC = g++
+ 
+ SRCDIR = .
+@@ -30,7 +31,7 @@ CAFFileALAC.o
+ 
+ alacconvert:	$(OBJS)
+ 	(cd $(CODECDIR); $(MAKE))
+-	$(CC) $(LFLAGS) $(OBJS) -o alacconvert
++	$(CC) $(LFLAGS) $(OBJS) $(LIBS) -o alacconvert
+ 
+ main.o : main.cpp
+ 	$(CC) -I $(INCLUDES) $(CFLAGS) main.cpp
+
package/alac/Config.in new file +16 -0
new file mode 100644
index 0000000000..2f1d4a1077
@@ -0,0 +1,16 @@
+config BR2_PACKAGE_ALAC
+	bool "Apple Lossless Audio Codec"
+	help
+	  Alac is an audio codec developed by Apple and
+	  supported on iPhone, iPad, most iPods, Mac and
+	  iTunes. ALAC is a data compression method which
+	  reduces the size of audio files with no loss
+	  of information. A decoded ALAC stream is bit-for-bit
+	  identical to the original uncompressed audio file
+
+	  https://macosforge.github.io/alac/
+
+
+config BR2_PACKAGE_ALAC_CONVERT
+	bool "binary converter"
+	depends on BR2_PACKAGE_ALAC
package/alac/alac.hash new file +2 -0
new file mode 100644
index 0000000000..9477916558
@@ -0,0 +1,2 @@
+sha256 98635ece42fb1c3fceb75eaa4b5164d866e09f0195b3e7ec4085f1123c5e272f  alac-c38887c5c5e64a4b31108733bd79ca9b2496d987.tar.gz
+sha256 a337314dd82d26791112c1e5a85725b2eb92f5b7e6f9102fa4eaa2903f77518f  LICENSE
package/alac/alac.mk new file +35 -0
new file mode 100644
index 0000000000..64227eaa2e
@@ -0,0 +1,35 @@
+################################################################################
+#
+# alac
+#
+################################################################################
+
+ALAC_VERSION = c38887c5c5e64a4b31108733bd79ca9b2496d987
+ALAC_SITE =$(call github,macosforge,alac,$(ALAC_VERSION))
+ALAC_LICENSE = APACHE
+ALAC_LICENSE_FILES = LICENSE
+ALAC_INSTALL_STAGING = YES
+
+ALAC_MAKE_OPTS =  CC=$(TARGET_CXX)
+
+ifeq ($(BR2_PACKAGE_ALAC_CONVERT),y)
+define ALACCONVERT_BUILD_CMDS
+	$(MAKE) $(ALAC_MAKE_OPTS) -C $(@D)/convert-utility
+endef
+define ALAC_INSTALL_TARGET_CMDS
+	$(INSTALL) -D -m 755 $(@D)/convert-utility/alacconvert $(TARGET_DIR)/usr/bin
+endef
+endif
+
+define ALAC_BUILD_CMDS
+	$(MAKE) $(ALAC_MAKE_OPTS) -C $(@D)/codec
+	$(ALACCONVERT_BUILD_CMDS)
+endef
+
+define ALAC_INSTALL_STAGING_CMDS
+	$(INSTALL) -D -m 644 $(@D)/codec/libalac.a      $(STAGING_DIR)/usr/lib/libalac.a
+	$(INSTALL) -D -m 644 $(@D)/codec/ALACDecoder.h  $(STAGING_DIR)/usr/include/ALACDecoder.h
+	$(INSTALL) -D -m 644 $(@D)/codec/ALACEncoder.h  $(STAGING_DIR)/usr/include/ALACEncoder.h
+endef
+
+$(eval $(generic-package))
#2 lore raw

PATCH 1/1 package/alac: new package

Hello,

No in fact, I didn't find this library. I just looked for the original library from Apple.
This library is used by shairplay, but it is integrated inside the source files.

Best regards,
Marc

Le lun. 27 juil. 2020 ? 18:21, Romain Naour <[email protected]> a ?crit :

Quoted 156 lines

Hello Marc,

Le 27/07/2020 ? 17:27, Marc Chalain a ?crit :

Quoted 3 lines

From: Marc Chalain <[email protected]>

The Apple Lossless Audio Codec (ALAC) is an audio codec developed by

Apple and supported on iPhone, iPad, most iPods, Mac and iTunes. ALAC is a data compression method which reduces the size of audio files with no loss of information. A decoded ALAC stream is bit-for-bit identical to the original uncompressed audio file.

Quoted 4 lines

https://macosforge.github.io/alac/

A patch fix problem to link the convert utility with libalac.a

Did you try with the alac library provided by libaudiofile package ? It's seems libaudiofile provide the same functionality.

Best regards,
Romain

Quoted 10 lines
---
 package/Config.in                             |  1 +
 ...rary-and-objects-to-link-all-symbols.patch | 26 ++++++++++++++
 package/alac/Config.in                        | 16 +++++++++
 package/alac/alac.hash                        |  2 ++
 package/alac/alac.mk                          | 35 +++++++++++++++++++
 5 files changed, 80 insertions(+)
 create mode 100644

package/alac/0001-reorder-library-and-objects-to-link-all-symbols.patch

Quoted 16 lines
 create mode 100644 package/alac/Config.in
 create mode 100644 package/alac/alac.hash
 create mode 100644 package/alac/alac.mk
package/Config.in +1 -0
index 5c30d27b7a..4a03a67a0d 100644
@@ -1239,6 +1239,7 @@ endmenu
 menu "Libraries"
 
 menu "Audio/Sound"
+     source "package/alac/Config.in"
      source "package/alsa-lib/Config.in"
      source "package/alure/Config.in"
      source "package/aubio/Config.in"
Quoted 1 line

diff --git

a/package/alac/0001-reorder-library-and-objects-to-link-all-symbols.patch b/package/alac/0001-reorder-library-and-objects-to-link-all-symbols.patch

Quoted 4 lines

new file mode 100644
index 0000000000..580a18d3a6
--- /dev/null
+++

b/package/alac/0001-reorder-library-and-objects-to-link-all-symbols.patch

Quoted 55 lines
package/Config.in +26 -0
@@ -0,0 +1,26 @@
+convert-utility: reorder library and objects to link all symbols
+
+Signed-off-by: Marc Chalain <[email protected]>
+
+--- a/convert-utility/makefile
++++ b/convert-utility/makefile
+@@ -1,7 +1,8 @@
+ # alacconvert make
+
+ CFLAGS = -g -O3 -c
+-LFLAGS = -Wall -L$(CODECDIR) -lalac
++LFLAGS = -Wall -L$(CODECDIR)
++LIBS = -lalac
+ CC = g++
+
+ SRCDIR = .
+@@ -30,7 +31,7 @@ CAFFileALAC.o
+
+ alacconvert:        $(OBJS)
+     (cd $(CODECDIR); $(MAKE))
+-    $(CC) $(LFLAGS) $(OBJS) -o alacconvert
++    $(CC) $(LFLAGS) $(OBJS) $(LIBS) -o alacconvert
+
+ main.o : main.cpp
+     $(CC) -I $(INCLUDES) $(CFLAGS) main.cpp
+
package/alac/Config.in new file +16 -0
new file mode 100644
index 0000000000..2f1d4a1077
@@ -0,0 +1,16 @@
+config BR2_PACKAGE_ALAC
+     bool "Apple Lossless Audio Codec"
+     help
+       Alac is an audio codec developed by Apple and
+       supported on iPhone, iPad, most iPods, Mac and
+       iTunes. ALAC is a data compression method which
+       reduces the size of audio files with no loss
+       of information. A decoded ALAC stream is bit-for-bit
+       identical to the original uncompressed audio file
+
+       https://macosforge.github.io/alac/
+
+
+config BR2_PACKAGE_ALAC_CONVERT
+     bool "binary converter"
+     depends on BR2_PACKAGE_ALAC
package/alac/alac.hash new file +0 -0
new file mode 100644
index 0000000000..9477916558

package/alac/alac.hash line 1

Quoted 1 line
package/alac/alac.hash new file +1 -0
@@ -0,0 +1,2 @@
+sha256

98635ece42fb1c3fceb75eaa4b5164d866e09f0195b3e7ec4085f1123c5e272f alac-c38887c5c5e64a4b31108733bd79ca9b2496d987.tar.gz

package/alac/alac.hash line 2

Quoted 1 line
package/alac/alac.hash new file +1 -0
+sha256

a337314dd82d26791112c1e5a85725b2eb92f5b7e6f9102fa4eaa2903f77518f LICENSE

package/alac/alac.mk

Quoted 7 lines
package/alac/alac.mk new file +0 -0
new file mode 100644
index 0000000000..64227eaa2e
@@ -0,0 +1,35 @@

+################################################################################

package/alac/alac.mk line 4

Quoted 4 lines
package/alac/alac.mk new file +3 -0
+#
+# alac
+#

+################################################################################

Quoted 5 lines
package/alac/alac.mk new file +5 -0
+
+ALAC_VERSION = c38887c5c5e64a4b31108733bd79ca9b2496d987
+ALAC_SITE =$(call github,macosforge,alac,$(ALAC_VERSION))
+ALAC_LICENSE = APACHE
+ALAC_LICENSE_FILES = LICENSE

package/alac/alac.mk

Quoted 10 lines
package/alac/alac.mk new file +10 -0
+ALAC_INSTALL_STAGING = YES
+
+ALAC_MAKE_OPTS =  CC=$(TARGET_CXX)
+
+ifeq ($(BR2_PACKAGE_ALAC_CONVERT),y)
+define ALACCONVERT_BUILD_CMDS
+     $(MAKE) $(ALAC_MAKE_OPTS) -C $(@D)/convert-utility
+endef
+define ALAC_INSTALL_TARGET_CMDS
+     $(INSTALL) -D -m 755 $(@D)/convert-utility/alacconvert

$(TARGET_DIR)/usr/bin

package/alac/alac.mk

Quoted 10 lines
package/alac/alac.mk new file +10 -0
+endef
+endif
+
+define ALAC_BUILD_CMDS
+     $(MAKE) $(ALAC_MAKE_OPTS) -C $(@D)/codec
+     $(ALACCONVERT_BUILD_CMDS)
+endef
+
+define ALAC_INSTALL_STAGING_CMDS
+     $(INSTALL) -D -m 644 $(@D)/codec/libalac.a

$(STAGING_DIR)/usr/lib/libalac.a

Quoted 10 lines

package/alac/alac.mk line 29

Quoted 1 line
package/alac/alac.mk new file +1 -0
+     $(INSTALL) -D -m 644 $(@D)/codec/ALACDecoder.h

$(STAGING_DIR)/usr/include/ALACDecoder.h

package/alac/alac.mk line 30

Quoted 1 line
package/alac/alac.mk new file +1 -0
+     $(INSTALL) -D -m 644 $(@D)/codec/ALACEncoder.h

$(STAGING_DIR)/usr/include/ALACEncoder.h

package/alac/alac.mk line 35

Quoted 4 lines
package/alac/alac.mk new file +3 -0
+endef
+
+$(eval $(generic-package))

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20200727/51d7606c/attachment.html>

#3 lore raw

PATCH 1/1 package/alac: new package

Hello Marc,

Quoted 4 lines · On Mon, 27 Jul 2020 18:36:47 +0200 Marc Chalain <[email protected]> wrote:

No in fact, I didn't find this library. I just looked for the original library from Apple.
This library is used by shairplay, but it is integrated inside the source files.

I am sorry, but I don't really understand your answer. In the end, do you need the alac package, or not ?

The alac library as available at
https://github.com/macosforge/alac/tree/master/codec indeed seems to be the same as one integrated inside audiofile:
https://github.com/mpruett/audiofile/tree/master/libaudiofile/alac.

However, the alac code in shairplay seems vastly different:
https://github.com/juhovh/shairplay/tree/master/src/lib/alac.

Could you clarify why you need this alac package? For your message, it seems like you wanted to package shairplay.. but shairplay has a bundled version of alac, and this bundled version is apparently very different from the official alac library, which means this separate alac library can probably not be used by shairplay.

Thanks,

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
#4 lore raw

PATCH 1/1 package/alac: new package

In reply to Marc Chalain

Hello,

Quoted 3 lines · On Mon, 27 Jul 2020 17:27:20 +0200 Marc Chalain <[email protected]> wrote:

From: Marc Chalain <[email protected]>

The Apple Lossless Audio Codec (ALAC) is an audio codec developed by Apple and supported on iPhone, iPad, most iPods, Mac and iTunes. ALAC is a data compression method which reduces the size of audio files with no loss of information. A decoded ALAC stream is bit-for-bit identical to the original uncompressed audio file.

This commit log should be wrapped at 72 columns.

package/alac/0001-reorder-library-and-objects-to-link-all-symbols.patch line 3

Quoted 9 lines
package/alac/0001-reorder-library-and-objects-to-link-all-symbols.patch new file +3 -0
new file mode 100644
index 0000000000..580a18d3a6
@@ -0,0 +1,26 @@
+convert-utility: reorder library and objects to link all symbols
+
+Signed-off-by: Marc Chalain <[email protected]>

Since upstream is using Git, we would like to have a patch generated with "git format-patch -N".

package/alac/Config.in line 2

Quoted 8 lines
package/alac/Config.in new file +2 -0
new file mode 100644
index 0000000000..2f1d4a1077
@@ -0,0 +1,16 @@
+config BR2_PACKAGE_ALAC
+	bool "Apple Lossless Audio Codec"

Just:

bool "alac"

Quoted 4 lines
package/alac/Config.in new file +4 -0
+	help
+	  Alac is an audio codec developed by Apple and
+	  supported on iPhone, iPad, most iPods, Mac and
+	  iTunes. ALAC is a data compression method which

package/alac/Config.in line 16

Quoted 10 lines
package/alac/Config.in new file +10 -0
+	  reduces the size of audio files with no loss
+	  of information. A decoded ALAC stream is bit-for-bit
+	  identical to the original uncompressed audio file
+
+	  https://macosforge.github.io/alac/
+
+
+config BR2_PACKAGE_ALAC_CONVERT
+	bool "binary converter"
+	depends on BR2_PACKAGE_ALAC

We prefer:

if BR2_PACKAGE_ALAC

config ...

endif

Also, the prompt should be "alacconvert", and the option should have a help text.

package/alac/alac.hash

Quoted 6 lines
package/alac/alac.hash new file +0 -0
new file mode 100644
index 0000000000..9477916558
@@ -0,0 +1,2 @@

Please add a comment:

# Locally calculated

Quoted 8 lines
package/alac/alac.hash new file +2 -0
+sha256 98635ece42fb1c3fceb75eaa4b5164d866e09f0195b3e7ec4085f1123c5e272f  alac-c38887c5c5e64a4b31108733bd79ca9b2496d987.tar.gz
+sha256 a337314dd82d26791112c1e5a85725b2eb92f5b7e6f9102fa4eaa2903f77518f  LICENSE
package/alac/alac.mk new file +0 -0
new file mode 100644
index 0000000000..64227eaa2e

package/alac/alac.mk line 9

Quoted 9 lines
package/alac/alac.mk new file +9 -0
@@ -0,0 +1,35 @@
+################################################################################
+#
+# alac
+#
+################################################################################
+
+ALAC_VERSION = c38887c5c5e64a4b31108733bd79ca9b2496d987
+ALAC_SITE =$(call github,macosforge,alac,$(ALAC_VERSION))
+ALAC_LICENSE = APACHE

This is not a valid SPDX identifier.

package/alac/alac.mk line 13

Quoted 4 lines
package/alac/alac.mk new file +4 -0
+ALAC_LICENSE_FILES = LICENSE
+ALAC_INSTALL_STAGING = YES
+
+ALAC_MAKE_OPTS =  CC=$(TARGET_CXX)

You should use $(TARGET_CONFIGURE_OPTS) instead.

package/alac/alac.mk line 20

Quoted 6 lines
package/alac/alac.mk new file +6 -0
+ifeq ($(BR2_PACKAGE_ALAC_CONVERT),y)
+define ALACCONVERT_BUILD_CMDS
+	$(MAKE) $(ALAC_MAKE_OPTS) -C $(@D)/convert-utility
+endef
+define ALAC_INSTALL_TARGET_CMDS
+	$(INSTALL) -D -m 755 $(@D)/convert-utility/alacconvert $(TARGET_DIR)/usr/bin

You should use a full destination path here.

package/alac/alac.mk line 27

Quoted 8 lines
package/alac/alac.mk new file +7 -0
+endef
 
+endif
+
+define ALAC_BUILD_CMDS
+	$(MAKE) $(ALAC_MAKE_OPTS) -C $(@D)/codec
+	$(ALACCONVERT_BUILD_CMDS)
+endef

Perhaps for the build, you could do:

ALAC_MAKE_TARGETS = codec

ifeq ($(BR2_PACKAGE_ALAC_CONVERT),y)
ALAC_MAKE_TARGETS += convert-utility
...
endif

define ALAC_BUILD_CMDS

	$(foreach t,$(ALAC_MAKE_TARGETS), \
		$(TARGET_MAKE_ENV) $(MAKE) $(TARGET_CONFIGURE_OPTS) \
			-C $(@D)/$(t)
	)

endef

Thanks!

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com