Compare commits
1 Commits
cc851fc929
...
b3e331fc42
Author | SHA1 | Date | |
---|---|---|---|
|
b3e331fc42 |
10
Makefile
10
Makefile
@ -13,7 +13,13 @@ INCLUDES := inc
|
||||
|
||||
#Alpine Linux ftdi include path
|
||||
INCLUDES += /usr/include/libftdi1
|
||||
|
||||
DISTRO=$(shell head -1 /etc/issue)
|
||||
ifeq "$(findstring Alpine,$(DISTRO))" ""
|
||||
LIBS := ftdi
|
||||
else
|
||||
LIBS := ftdi1
|
||||
endif
|
||||
|
||||
LD_FLAGS :=
|
||||
C_FLAGS := -O0 -g
|
||||
@ -31,6 +37,10 @@ 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