From 123c52bd2a0c4af9fbce6ed7832c5401d6e9a5f8 Mon Sep 17 00:00:00 2001 From: Thomas Klaehn Date: Sat, 13 Jul 2019 22:05:35 +0200 Subject: [PATCH] Workaround: In alpine libftdi is named libftdi1 --- Makefile | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Makefile b/Makefile index f76d4f5..99c985c 100644 --- a/Makefile +++ b/Makefile @@ -13,7 +13,13 @@ INCLUDES := inc #Alpine Linux ftdi include path INCLUDES += /usr/include/libftdi1 + +DISTRO=$(cat /etc/issue | grep Alpine) +ifeq "$(findstring Alpine,$(DISTRO))" "" LIBS := ftdi +else +LIBS := ftdi1 +endif LD_FLAGS := C_FLAGS := -O0 -g @@ -31,6 +37,9 @@ THIS_MAKEFILE := $(lastword $(MAKEFILE_LIST)) all: $(TARGET) $(TARGET): $(OBJS) $(THIS_MAKEFILE) + echo "$(LIBS)" + echo "$(DISTRO)" + echo "$(findstring Alpine,$(DISTRO))" @mkdir -p $(BIN_DIR) $(CC) $(C_FLAGS) $(LD_FLAGS) $(OBJS) $(addprefix -l,$(LIBS)) -o $@