Where is the Makefile generated by the Eclipse CDT?

前端 未结 4 666
无人及你
无人及你 2021-01-31 03:52

I\'ve built a hello world C++ project with Eclipse(helios) CDT. It compiled fine. But I would like to take a look at the Makefile CDT generated. I can\'t find it in project fold

4条回答
  •  孤独总比滥情好
    2021-01-31 04:22

    By default you should have [workspace]/[project folder]/Debug/makefile. Have you made any changes to the default environment?

    Here's the HelloWorld sample project makefile from a Helios (windows/cygwin) installation:

    ################################################################################
    # 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 subdir.mk
    -include src/subdir.mk
    -include objects.mk
    
    ifneq ($(MAKECMDGOALS),clean)
    ifneq ($(strip $(C++_DEPS)),)
    -include $(C++_DEPS)
    endif
    ifneq ($(strip $(C_DEPS)),)
    -include $(C_DEPS)
    endif
    ifneq ($(strip $(CC_DEPS)),)
    -include $(CC_DEPS)
    endif
    ifneq ($(strip $(CPP_DEPS)),)
    -include $(CPP_DEPS)
    endif
    ifneq ($(strip $(CXX_DEPS)),)
    -include $(CXX_DEPS)
    endif
    ifneq ($(strip $(C_UPPER_DEPS)),)
    -include $(C_UPPER_DEPS)
    endif
    endif
    
    -include ../makefile.defs
    
    # Add inputs and outputs from these tool invocations to the build variables
    
    # All Target
    all: HelloWorld.exe
    
    # Tool invocations
    HelloWorld.exe: $(OBJS) $(USER_OBJS)
            @echo 'Building target: $@'
            @echo 'Invoking: Cygwin C++ Linker'
            g++  -o"HelloWorld.exe" $(OBJS) $(USER_OBJS) $(LIBS)
            @echo 'Finished building target: $@'
            @echo ' '
    
    # Other Targets
    clean:
            -$(RM) $(C++_DEPS)$(OBJS)$(C_DEPS)$(CC_DEPS)$(CPP_DEPS)$(EXECUTABLES)$(CXX_DEPS)$(C_UPPER_DEPS) HelloWorld.exe
            -@echo ' '
    
    .PHONY: all clean dependents
    .SECONDARY:
    
    -include ../makefile.targets
    

提交回复
热议问题