首页 > 解决方案 > make: *** 没有将目标设为“全部”的规则。停止。C/C++ 问题

问题描述

我正在尝试在 Eclipse CDT 3.8.1 上编译从 GitHub https://github.com/severinson/VLC-driver
"make: *** No rule to make target 'x86_64all'"下载的代码并收到此错误: .
我已经包含了所有 linux-headers(linux-headers 4.15.0-58 generic)并且我已经搜索了很多这个错误并且每个人都说要对 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

标签: clinux-kernelembedded-linuxbeagleboneblack

解决方案


在您的 Makefile 中,您会看到如下标签:

VLC_Driver: $(OBJS) $(USER_OBJS)

VLC_Driver 这里是一个目标。此 make 命令在标准 make 命令中的默认目标是all. 无论出于何种原因,Eclipse 的目标x86_64all都是您没有的。要在 Eclipse 中编辑构建目标,请转到 Make Target 视图:

窗口 > 显示视图 > 制作目标

您将希望将其设置为all.

更多信息在这里


推荐阅读