Don't use .exe suffix on non Windows
mrdudz opened this issue · 1 comments
mrdudz commented
The makefile produces an executable with .exe suffix on all platforms - but it should do that only on windows. This fixes it:
diff --git a/src/Makefile b/src/Makefile
index 5bf2f78..b38c3d0 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -14,7 +14,7 @@
CXX = g++
#CXX = clang++
-EXE = ../IceBroLite.exe
+EXE = ../IceBroLite
SOURCES = 6510.cpp Breakpoints.cpp C64Colors.cpp Config.cpp Expressions.cpp FileDialog.cpp Files.cpp
SOURCES += IceBroLite.cpp Icons.cpp Image.cpp ImGui_Helper.cpp Mnemonics.cpp
SOURCES += Platform.cpp SaveState.coo SourceDebug.cpp StartVice.cpp struse.cpp Sym.cpp
@@ -64,6 +64,7 @@ ifeq ($(findstring MINGW,$(UNAME_S)),MINGW)
CXXFLAGS += `pkg-config --cflags glfw3`
CFLAGS = $(CXXFLAGS)
+ EXESUFFIX = .exe
endif
##---------------------------------------------------------------------
@@ -88,12 +89,12 @@ endif
%.o:struse/%.cpp
$(CXX) $(CXXFLAGS) -c -o $@ $<
-all: $(EXE)
+all: $(EXE)$(EXESUFFIX)
@echo Build complete for $(ECHO_MESSAGE)
-$(EXE): $(OBJS)
+$(EXE)$(EXESUFFIX): $(OBJS)
$(CXX) -o $@ $^ $(CXXFLAGS) $(LIBS)
clean:
- rm -f $(EXE) $(OBJS)
+ rm -f $(EXE)$(EXESUFFIX) $(OBJS)
Sakrac commented
Updated as suggested