Compare commits
1 Commits
cb995279b2
...
123c52bd2a
Author | SHA1 | Date | |
---|---|---|---|
|
123c52bd2a |
9
Makefile
9
Makefile
@ -13,7 +13,13 @@ INCLUDES := inc
|
|||||||
|
|
||||||
#Alpine Linux ftdi include path
|
#Alpine Linux ftdi include path
|
||||||
INCLUDES += /usr/include/libftdi1
|
INCLUDES += /usr/include/libftdi1
|
||||||
|
|
||||||
|
DISTRO=$(cat /etc/issue | grep Alpine)
|
||||||
|
ifeq "$(findstring Alpine,$(DISTRO))" ""
|
||||||
LIBS := ftdi
|
LIBS := ftdi
|
||||||
|
else
|
||||||
|
LIBS := ftdi1
|
||||||
|
endif
|
||||||
|
|
||||||
LD_FLAGS :=
|
LD_FLAGS :=
|
||||||
C_FLAGS := -O0 -g
|
C_FLAGS := -O0 -g
|
||||||
@ -31,6 +37,9 @@ THIS_MAKEFILE := $(lastword $(MAKEFILE_LIST))
|
|||||||
all: $(TARGET)
|
all: $(TARGET)
|
||||||
|
|
||||||
$(TARGET): $(OBJS) $(THIS_MAKEFILE)
|
$(TARGET): $(OBJS) $(THIS_MAKEFILE)
|
||||||
|
echo "$(LIBS)"
|
||||||
|
echo "$(DISTRO)"
|
||||||
|
echo "$(findstring Alpine,$(DISTRO))"
|
||||||
@mkdir -p $(BIN_DIR)
|
@mkdir -p $(BIN_DIR)
|
||||||
$(CC) $(C_FLAGS) $(LD_FLAGS) $(OBJS) $(addprefix -l,$(LIBS)) -o $@
|
$(CC) $(C_FLAGS) $(LD_FLAGS) $(OBJS) $(addprefix -l,$(LIBS)) -o $@
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user