Where is the Makefile generated by the Eclipse CDT?

47,442

Solution 1

If you use the default setttings with current builder = CDT internal builder, there is no make file. if you select current builder = GNU make, you will see the makefile in the debug folder.

Solution 2

On Windows,

Click your project, go to menu project -> properties, select Tool Chain Editor then select in Current Builder Gnu Make Builder.

Build a target now generate makefile.

Current builder Gnu Make Builder

http://help.eclipse.org/helios/index.jsp?topic=%2Forg.eclipse.cdt.doc.user%2Freference%2Fcdt_u_prop_build_toolchain.htm

Solution 3

The only thing I can think of is that the makefile isn't created. Click your project, go to menu project -> properties, select C/C++ Build in the left pane, and make sure the Generate Makefiles automatically checkbox is checked.

Solution 4

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
Share:
47,442
Admin
Author by

Admin

Updated on November 01, 2020

Comments

  • Admin
    Admin over 3 years

    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 folder/debug/release folders or in the src folders. Where can I find this Makefile?