From f6de79153337cbeaad3687acbafa9bf6b4c74490 Mon Sep 17 00:00:00 2001 From: Doug Schaefer Date: Fri, 25 May 2007 04:16:17 +0000 Subject: [PATCH] Some fixes to get the HelloWorld Makefile project template working on Linux. --- .../managedbuilder/gnu/templates/SimpleMakefileGenerator.java | 3 +-- .../projecttemplates/MakefileHelloWorldCCProject/Makefile | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) 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)