Compare commits
1 Commits
b3e331fc42
...
cc851fc929
Author | SHA1 | Date | |
---|---|---|---|
|
cc851fc929 |
14
Makefile
14
Makefile
@ -11,14 +11,12 @@ BIN_DIR = bin
|
||||
|
||||
INCLUDES := inc
|
||||
|
||||
#Alpine Linux ftdi include path
|
||||
#Alpine Linux names libftdi libftdi1
|
||||
ifneq "$(findstring Alpine,$(shell head -1 /etc/issue))" ""
|
||||
INCLUDES += /usr/include/libftdi1
|
||||
|
||||
DISTRO=$(shell head -1 /etc/issue)
|
||||
ifeq "$(findstring Alpine,$(DISTRO))" ""
|
||||
LIBS := ftdi
|
||||
else
|
||||
LIBS := ftdi1
|
||||
else
|
||||
LIBS := ftdi
|
||||
endif
|
||||
|
||||
LD_FLAGS :=
|
||||
@ -37,10 +35,6 @@ THIS_MAKEFILE := $(lastword $(MAKEFILE_LIST))
|
||||
all: $(TARGET)
|
||||
|
||||
$(TARGET): $(OBJS) $(THIS_MAKEFILE)
|
||||
head -1 /etc/issue
|
||||
echo "$(LIBS)"
|
||||
echo "$(DISTRO)"
|
||||
echo "$(findstring Alpine,$(DISTRO))"
|
||||
@mkdir -p $(BIN_DIR)
|
||||
$(CC) $(C_FLAGS) $(LD_FLAGS) $(OBJS) $(addprefix -l,$(LIBS)) -o $@
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user