make:***没有将目标设为“ all”的规则。停止。 C / C ++问题

时间:2019-09-04 12:36:46

标签: c linux-kernel embedded-linux beagleboneblack

我正在尝试编译从Eclipse CDT 3.8.1的GitHub https://github.com/severinson/VLC-driver下载的代码,并得到以下错误:
"make: *** No rule to make target 'x86_64all'"
我已经包含了所有的linux-header(通用的linux-headers 4.15.0-58),并且已经搜索了很多此错误,每个人都说要对makefile进行更改。我找不到makefile,如何更改makefile?

    ################################################################################
# Automatically-generated file. Do not edit!
################################################################################

-include ../makefile.init

RM := rm -rf

# All of the sources participating in the build are defined here
-include sources.mk
-include src/subdir.mk
-include subdir.mk
-include objects.mk

ifneq ($(MAKECMDGOALS),clean)
ifneq ($(strip $(C_DEPS)),)
-include $(C_DEPS)
endif
endif

-include ../makefile.defs

# Add inputs and outputs from these tool invocations to the build variables 

# All Target
all: VLC_Driver

# Tool invocations
VLC_Driver: $(OBJS) $(USER_OBJS)
    @echo 'Building target: $@'
    @echo 'Invoking: GCC C Linker'
    gcc  -o "VLC_Driver" $(OBJS) $(USER_OBJS) $(LIBS)
    @echo 'Finished building target: $@'
    @echo ' '

# Other Targets
clean:
    -$(RM) $(EXECUTABLES)$(OBJS)$(C_DEPS) VLC_Driver
    -@echo ' '

.PHONY: all clean dependents
.SECONDARY:

-include ../makefile.targets

1 个答案:

答案 0 :(得分:1)

在Makefile中,您会看到类似以下的标签:

VLC_Driver: $(OBJS) $(USER_OBJS)

这里是VLC_Driver的目标。标准make命令中的默认目标为all。出于任何原因,Eclipse都将目标对准x86_64all,而您没有。要在Eclipse中编辑构建目标,请转到“建立目标”视图:

窗口>显示视图>确定目标

您将需要将其设置为all

更多信息here