Im using buildroot to make a custom linux image, and it is working.
The problem is when i run "make" to finish the image after change my package "source code", because it cleans my custom package dependencies and all header include are not found.
I have a dependency with structure:
################################################################################
#
# hello
#
################################################################################
HELLO_VERSION = 1.0
HELLO_SITE = ./package/hello/src
HELLO_SITE_METHOD = local
HELLO_DEPENDENCIES += directfb libogg libvorbis mpg123 sdl2 sdl2_image sdl2_gfx sdl2_ttf sdl2_mixer sdl2_net
define HELLO_BUILD_CMDS
$(MAKE) CC="$(TARGET_CC)" CXX="$(TARGET_CXX)" LD="$(TARGET_LD)" -C $(@D)
endef
define HELLO_INSTALL_TARGET_CMDS
$(INSTALL) -D -m 0755 $(@D)/hello $(TARGET_DIR)/usr/bin
mkdir -p $(TARGET_DIR)/opt/app
cp -r $(@D)/assets $(TARGET_DIR)/opt/app
endef
$(eval $(generic-package))
When i run "make hello-rebuild && make", i got error that all SDL includes don't exists.
When i got this error i rebuild only the dependencies packages with "make sdl2-rebuild", "make sdl2_mixer-rebuild", etc.
Can anyone help me understand how i can solve it?
Thanks.
After post in other places the same answer, a buildroot user answer with correct way, that is use @STAGING directory when compile instead of @TARGET directory.
In my makefile i compile it using @TARGET_DIR/usr/[folder], but the correct is @STAGING_DIR/usr[folder].
Thanks.