Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[cdt-dev] make target question

Can someone explain the purpose behind the "Make Target"'s view? Is it essentially to tell the builder where to start the build process? (i.e., where to pick up the default Makefile when executing "make"?).

When I first tried the CDT, I expected the "make target" to be used as a make target (you can probably see why I might be confused).

Right-clicking on a make target named "hello" and then selecing "Build", I fully expected to see something like "make -k hello", but instead I see "make -k clean all" in the C-Build View. The former would actually be a way of using the built-in make rules to build a target when no makefile exists.

For instance, I could create a new "hello" project, create a simple hello.c source file, use the default "hello" make target provided by the CDT, and then select "Build". No makefile generation necessary, since building "hello" from "hello.c" is already part of the default make rules.

I also noticed I can't seem to tell the CDT not to include the word "all" in my custom build commands. In other words, modifying the properties for the "hello" project, and setting the build command to "make -k hello" results in a "make -k hello all" reflected in the C-Build view. Make complains about the "all" target, since I have no makefile.

Am I just wasting my time here, or is it worth trying to use make's build-in target rules for simple projects?

Brian



Back to the top