ref: 8aca2030c46df6deae7d3dc544720decbff74721
parent: 31e19f038e5e0e4c1035c3d6925e03cd01b7f66c
parent: 3cacaf85f1ba66e08a8a3aeb6385b967236f9f66
author: Ethan Hugg <[email protected]>
date: Thu Jan 23 04:00:54 EST 2014
Merge pull request #199 from mstorsjo/make-exeext Include the executable suffix within make
--- a/build/mktargets.py
+++ b/build/mktargets.py
@@ -110,9 +110,9 @@
f.write("LIBRARIES += $(LIBPREFIX)%s.$(LIBSUFFIX)\n"%args.library)
if args.binary is not None:
- f.write("%s: $(%s_OBJS) $(LIBS) $(%s_LIBS) $(%s_DEPS)\n"%(args.binary, PREFIX, PREFIX, PREFIX))
+ f.write("%s$(EXEEXT): $(%s_OBJS) $(LIBS) $(%s_LIBS) $(%s_DEPS)\n"%(args.binary, PREFIX, PREFIX, PREFIX))
f.write("\t$(CXX) $(CXX_LINK_O) $(%s_OBJS) $(%s_LDFLAGS) $(%s_LIBS) $(LDFLAGS) $(LIBS)\n\n"%(PREFIX, PREFIX, PREFIX))
- f.write("binaries: %s\n"%args.binary)
- f.write("BINARIES += %s\n"%args.binary)
+ f.write("binaries: %s$(EXEEXT)\n"%args.binary)
+ f.write("BINARIES += %s$(EXEEXT)\n"%args.binary)
f.close()
--- a/build/platform-mingw_nt.mk
+++ b/build/platform-mingw_nt.mk
@@ -11,4 +11,5 @@
ASMFLAGS += -f win32 -DPREFIX
CFLAGS += -DWIN32
endif
+EXEEXT = .exe
--- a/build/platform-msvc-common.mk
+++ b/build/platform-msvc-common.mk
@@ -11,3 +11,4 @@
LINK_LIB=$(1).lib
LIBSUFFIX=lib
LIBPREFIX=
+EXEEXT=.exe
--- a/codec/console/dec/targets.mk
+++ b/codec/console/dec/targets.mk
@@ -10,8 +10,8 @@
$(H264DEC_SRCDIR)/%.o: $(H264DEC_SRCDIR)/%.cpp
$(CXX) $(CFLAGS) $(CXXFLAGS) $(INCLUDES) $(H264DEC_CFLAGS) $(H264DEC_INCLUDES) -c $(CXX_O) $<
-h264dec: $(H264DEC_OBJS) $(LIBS) $(H264DEC_LIBS) $(H264DEC_DEPS)
+h264dec$(EXEEXT): $(H264DEC_OBJS) $(LIBS) $(H264DEC_LIBS) $(H264DEC_DEPS)
$(CXX) $(CXX_LINK_O) $(H264DEC_OBJS) $(H264DEC_LDFLAGS) $(H264DEC_LIBS) $(LDFLAGS) $(LIBS)
-binaries: h264dec
-BINARIES += h264dec
+binaries: h264dec$(EXEEXT)
+BINARIES += h264dec$(EXEEXT)
--- a/codec/console/enc/targets.mk
+++ b/codec/console/enc/targets.mk
@@ -9,8 +9,8 @@
$(H264ENC_SRCDIR)/%.o: $(H264ENC_SRCDIR)/%.cpp
$(CXX) $(CFLAGS) $(CXXFLAGS) $(INCLUDES) $(H264ENC_CFLAGS) $(H264ENC_INCLUDES) -c $(CXX_O) $<
-h264enc: $(H264ENC_OBJS) $(LIBS) $(H264ENC_LIBS) $(H264ENC_DEPS)
+h264enc$(EXEEXT): $(H264ENC_OBJS) $(LIBS) $(H264ENC_LIBS) $(H264ENC_DEPS)
$(CXX) $(CXX_LINK_O) $(H264ENC_OBJS) $(H264ENC_LDFLAGS) $(H264ENC_LIBS) $(LDFLAGS) $(LIBS)
-binaries: h264enc
-BINARIES += h264enc
+binaries: h264enc$(EXEEXT)
+BINARIES += h264enc$(EXEEXT)
--- a/test/targets.mk
+++ b/test/targets.mk
@@ -10,8 +10,8 @@
$(CODEC_UNITTEST_SRCDIR)/%.o: $(CODEC_UNITTEST_SRCDIR)/%.cpp
$(CXX) $(CFLAGS) $(CXXFLAGS) $(INCLUDES) $(CODEC_UNITTEST_CFLAGS) $(CODEC_UNITTEST_INCLUDES) -c $(CXX_O) $<
-codec_unittest: $(CODEC_UNITTEST_OBJS) $(LIBS) $(CODEC_UNITTEST_LIBS) $(CODEC_UNITTEST_DEPS)
+codec_unittest$(EXEEXT): $(CODEC_UNITTEST_OBJS) $(LIBS) $(CODEC_UNITTEST_LIBS) $(CODEC_UNITTEST_DEPS)
$(CXX) $(CXX_LINK_O) $(CODEC_UNITTEST_OBJS) $(CODEC_UNITTEST_LDFLAGS) $(CODEC_UNITTEST_LIBS) $(LDFLAGS) $(LIBS)
-binaries: codec_unittest
-BINARIES += codec_unittest
+binaries: codec_unittest$(EXEEXT)
+BINARIES += codec_unittest$(EXEEXT)