diff --git a/build/org.eclipse.cdt.managedbuilder.gnu.ui/src/org/eclipse/cdt/managedbuilder/gnu/templates/SimpleMakefileGenerator.java b/build/org.eclipse.cdt.managedbuilder.gnu.ui/src/org/eclipse/cdt/managedbuilder/gnu/templates/SimpleMakefileGenerator.java index d52c72855e8..9150103c091 100644 --- a/build/org.eclipse.cdt.managedbuilder.gnu.ui/src/org/eclipse/cdt/managedbuilder/gnu/templates/SimpleMakefileGenerator.java +++ b/build/org.eclipse.cdt.managedbuilder.gnu.ui/src/org/eclipse/cdt/managedbuilder/gnu/templates/SimpleMakefileGenerator.java @@ -73,8 +73,7 @@ public class SimpleMakefileGenerator extends ProcessRunner { } Map macros = new HashMap(template.getValueStore()); - if (Platform.getOS().equals(Platform.OS_WIN32)) - macros.put("exe", ".exe"); + macros.put("exe", Platform.getOS().equals(Platform.OS_WIN32) ? ".exe" : ""); //$NON-NLS-1$ $NON-NLS-2$ $NON-NLS-3$ fileContents = replaceMacros(fileContents, macros); contents = new ByteArrayInputStream(fileContents.getBytes()); diff --git a/build/org.eclipse.cdt.managedbuilder.gnu.ui/templates/projecttemplates/MakefileHelloWorldCCProject/Makefile b/build/org.eclipse.cdt.managedbuilder.gnu.ui/templates/projecttemplates/MakefileHelloWorldCCProject/Makefile index 7114ef1e1cf..dd884f196cf 100644 --- a/build/org.eclipse.cdt.managedbuilder.gnu.ui/templates/projecttemplates/MakefileHelloWorldCCProject/Makefile +++ b/build/org.eclipse.cdt.managedbuilder.gnu.ui/templates/projecttemplates/MakefileHelloWorldCCProject/Makefile @@ -1,4 +1,3 @@ -CFLAGS = -O2 -g -Wall -fmessage-length=0 CXXFLAGS = -O2 -g -Wall -fmessage-length=0 OBJS = {{baseName}}.o @@ -8,7 +7,7 @@ LIBS = TARGET = {{baseName}}{{exe}} $(TARGET): $(OBJS) - $(CC) -o $(TARGET) $(OBJS) $(LIBS) + $(CXX) -o $(TARGET) $(OBJS) $(LIBS) all: $(TARGET)