Hi,
While I trying to compile my project for TX2 by using makefile at linux console.
While I am trying to change the target architecture from X64 to Arm64 I am facing compilations error:
nvcc fatal : A single input file is required for a non-link phase when an outputfile is specified
while my makefile is:
CXXCU =nvcc aarch64-linux-g++ -O0 -std=c++11 --compile --relocatable-device-code=true -gencode arch=compute_61,code=compute_61
OBJ = $(addprefix $(OBJDIR)/, $(CSOURCES:.c=.o) $(CXXSOURCES:.cpp=.o) $(CXXSOURCESCU:.cu=.o) )
CXXFLAGS = $(INCLUDEDIRS)
CXX =$(CXXCU) #g++
CC =$(CXXCU) # gcc
LDFLAGS = $(LIBDIRS) $(LIBS)
all: $(PROGRAM)
$(PROGRAM): $(OBJ)
ar rc $(PROGRAM).a $(OBJ)
ranlib $(PROGRAM).a
$(OBJDIR)/%.o: ./%.cpp
@mkdir -p $(@D)
$(CXX) $(CXXFLAGS) -c -o $@ $^
$(OBJDIR)/%.o: ./%.c
@mkdir -p $(@D)
$(CC) $(CXXFLAGS) -c -o $@ $^
$(OBJDIR)/%.o: ./%.cu
@mkdir -p $(@D)
$(CXXCU) $(INCLUDEDIRS) -c -o $@ $^
clean:
$(RM) -f $(CXXOBJECTS) $(PROGRAM)
When I removes the aarch64-linux-g++ argument the compilation is pass.
What I am doing wrong at the makefile that the compilation for the Arm64 is fail.
Yehonatan