From 8f68317094586a7aef651095bba99175b9cffd12 Mon Sep 17 00:00:00 2001 From: Rick van der Zwet Date: Mon, 17 Aug 2020 23:55:14 +0200 Subject: [PATCH] Fix compile failure within OpenEmbedded recipe Since cross compiling requires special headers and locations to be present, make sure to use standardized variables, which can be set. --- Makefile | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index 501f1d2..4202c3a 100644 --- a/Makefile +++ b/Makefile @@ -25,18 +25,18 @@ CUR_PATH = $(shell echo $(PWD)) INCLUDEPATHS = $(addprefix -I$(CUR_PATH)/, $(dir $(SOURCE_FULL)) libusb ) LOADPATHS = LIBS = -lusb-1.0 -CPP = g++ +CXX ?= g++ ykushcmd : $(PROG_OBJ) $(OBJS) - $(CPP) -o bin/$@ $(PROG_OBJ) $(OBJS) $(LIBS) + $(CXX) $(CXXFLAGS) $(COMPILE_FLAGS) -o bin/$@ $(PROG_OBJ) $(OBJS) $(LIBS) $(LDFLAGS) $(PROG_OBJ) : %.o : %.cpp - $(CPP) $(COMPILE_FLAGS) $(INCLUDEPATHS) -c $< -o $@ + $(CXX) $(CXXFLAGS) $(COMPILE_FLAGS) $(INCLUDEPATHS) -c $< -o $@ $(OBJS) : %.o : %.cpp %.h - $(CPP) $(COMPILE_FLAGS) $(INCLUDEPATHS) -c $< -o $@ + $(CXX) $(CXXFLAGS) $(COMPILE_FLAGS) $(INCLUDEPATHS) -c $< -o $@ clean :