changeset 20755:b4c865e17155

Create binaries with proper executable suffix under Windows.
author diego
date Wed, 08 Nov 2006 00:13:33 +0000
parents da4c2344a97c
children ce57eb3e9b81
files Makefile TOOLS/Makefile TOOLS/bmovl-test/Makefile configure
diffstat 4 files changed, 48 insertions(+), 51 deletions(-) [+]
line wrap: on
line diff
--- a/Makefile	Wed Nov 08 00:11:42 2006 +0000
+++ b/Makefile	Wed Nov 08 00:13:33 2006 +0000
@@ -128,9 +128,9 @@
 PARTS += tremor
 endif
 
-ALL_PRG = $(PRG)
+ALL_PRG = mplayer$(EXESUF)
 ifeq ($(MENCODER),yes)
-ALL_PRG += $(PRG_MENCODER)
+ALL_PRG += mencoder$(EXESUF)
 endif
 
 COMMON_DEPS = $(W32_DEP) \
@@ -305,30 +305,30 @@
                $(VO_LIBS) \
                $(AO_LIBS) \
 
-$(PRG):	$(MPLAYER_DEP)
-	$(CC) -o $(PRG) $(OBJS_MPLAYER) $(LIBS_MPLAYER)
+mplayer$(EXESUF): $(MPLAYER_DEP)
+	$(CC) -o $@ $(OBJS_MPLAYER) $(LIBS_MPLAYER)
 
 ifeq ($(MENCODER),yes)
 LIBS_MENCODER = libmpcodecs/libmpencoders.a \
                 $(MP3LAME_LIB) \
                 $(COMMON_LIBS) \
 
-$(PRG_MENCODER): $(MENCODER_DEP)
-	$(CC) -o $(PRG_MENCODER) $(OBJS_MENCODER) $(LIBS_MENCODER)
+mencoder$(EXESUF): $(MENCODER_DEP)
+	$(CC) -o $@ $(OBJS_MENCODER) $(LIBS_MENCODER)
 endif
 
 osdep/mplayer-rc.o: osdep/mplayer.rc
 	windres -o $@ osdep/mplayer.rc
 
-codec-cfg: codec-cfg.c codec-cfg.h help_mp.h
+codec-cfg$(EXESUF): codec-cfg.c codec-cfg.h help_mp.h
 	$(HOST_CC) -I. -DCODECS2HTML codec-cfg.c -o $@
 
 codecs.conf.h: codec-cfg etc/codecs.conf
-	./codec-cfg ./etc/codecs.conf > $@
+	./codec-cfg$(EXESUF) ./etc/codecs.conf > $@
 
 codec-cfg.o: codecs.conf.h
 
-codecs2html: mp_msg.o
+codecs2html$(EXESUF): mp_msg.o
 	$(CC) -DCODECS2HTML codec-cfg.c mp_msg.o -o $@
 
 install: $(ALL_PRG)
@@ -337,9 +337,10 @@
 	$(MAKE) -C vidix install
 endif
 	$(INSTALL) -d $(BINDIR)
-	$(INSTALL) -m 755 $(INSTALLSTRIP) $(PRG) $(BINDIR)/$(PRG)
+	$(INSTALL) -m 755 $(INSTALLSTRIP) mplayer$(EXESUF) \
+		$(BINDIR)/mplayer$(EXESUF)
 ifeq ($(GUI),yes)
-	-ln -sf $(PRG) $(BINDIR)/gmplayer
+	-ln -sf mplayer$(EXESUF) $(BINDIR)/gmplayer$(EXESUF)
 endif
 	$(INSTALL) -d $(MANDIR)/man1
 	for i in $(MAN_LANG); do \
@@ -351,7 +352,8 @@
 		fi ; \
 	done
 ifeq ($(MENCODER),yes)
-	$(INSTALL) -m 755 $(INSTALLSTRIP) $(PRG_MENCODER) $(BINDIR)/$(PRG_MENCODER)
+	$(INSTALL) -m 755 $(INSTALLSTRIP) mencoder$(EXESUF) \
+		$(BINDIR)/mencoder$(EXESUF)
 	for i in $(MAN_LANG); do \
 		if test "$$i" = en ; then \
 			cd $(MANDIR)/man1 && ln -sf mplayer.1 mencoder.1 ; \
@@ -375,8 +377,9 @@
 	@if test -f $(CONFDIR)/codecs.conf ; then mv -f $(CONFDIR)/codecs.conf $(CONFDIR)/codecs.conf.old ; fi
 
 uninstall:
-	-rm -f $(BINDIR)/$(PRG) $(BINDIR)/gmplayer $(MANDIR)/man1/mplayer.1
-	-rm -f  $(BINDIR)/$(PRG_MENCODER) $(MANDIR)/man1/mencoder.1
+	-rm -f $(BINDIR)/mplayer$(EXESUF) $(BINDIR)/gmplayer$(EXESUF)
+	-rm -f $(BINDIR)/mencoder$(EXESUF)
+	-rm -f $(MANDIR)/man1/mencoder.1 $(MANDIR)/man1/mplayer.1
 	-rm -f $(prefix)/share/pixmaps/mplayer.xpm
 	-rm -f $(prefix)/share/applications/mplayer.desktop
 	for l in $(MAN_LANG); do \
@@ -400,7 +403,8 @@
 
 distclean: dirclean doxygen_clean
 	@for a in $(PARTS); do $(MAKE) -C $$a distclean; done
-	-rm -f *~ $(PRG) $(PRG_MENCODER) codec-cfg codecs2html codecs.conf.h \
+	-rm -f *~ mplayer$(EXESUF) mencoder$(EXESUF) \
+	  codec-cfg$(EXESUF) codecs2html$(EXESUF) codecs.conf.h \
           .depend configure.log config.mak config.h help_mp.h version.h
 
 strip:
--- a/TOOLS/Makefile	Wed Nov 08 00:11:42 2006 +0000
+++ b/TOOLS/Makefile	Wed Nov 08 00:13:33 2006 +0000
@@ -2,22 +2,22 @@
 
 CFLAGS = -I..
 
-OBJS = alaw-gen \
-	asfinfo \
-	avi-fix \
-	avisubdump \
-	bios2dump \
-	dump_mp4 \
-	mem2dump \
-	movinfo \
-	png2raw \
-	subrip \
-	vivodump \
-	302m_convert \
-	360m_convert \
+OBJS = alaw-gen$(EXESUF) \
+	asfinfo$(EXESUF) \
+	avi-fix$(EXESUF) \
+	avisubdump$(EXESUF) \
+	bios2dump$(EXESUF) \
+	dump_mp4$(EXESUF) \
+	mem2dump$(EXESUF) \
+	movinfo$(EXESUF) \
+	png2raw$(EXESUF) \
+	subrip$(EXESUF) \
+	vivodump$(EXESUF) \
+	302m_convert$(EXESUF) \
+	360m_convert$(EXESUF) \
 
 ifeq ($(TARGET_ARCH_X86),yes)
-OBJS += cpuinfo fastmemcpybench
+OBJS += cpuinfo$(EXESUF) fastmemcpybench
 endif
 
 all: $(OBJS)
@@ -34,14 +34,14 @@
 	$(CC) $(CFLAGS) -o $@ $< ../mp_msg.o ../libmpdemux/libmpdemux.a ../stream/stream.a
 
 fastmemcpybench: fastmemcpybench.c
-	$(CC) $(CFLAGS) -g $< -o fastmem-mmx  ../libvo/aclib.o -DNAME=\"mmx\"      -DHAVE_MMX
-	$(CC) $(CFLAGS) -g $< -o fastmem-k6   ../libvo/aclib.o -DNAME=\"k6\ \"     -DHAVE_MMX -DHAVE_3DNOW
-	$(CC) $(CFLAGS) -g $< -o fastmem-k7   ../libvo/aclib.o -DNAME=\"k7\ \"     -DHAVE_MMX -DHAVE_3DNOW -DHAVE_MMX2
-	$(CC) $(CFLAGS) -g $< -o fastmem-sse  ../libvo/aclib.o -DNAME=\"sse\"      -DHAVE_MMX -DHAVE_SSE   -DHAVE_MMX2
-	$(CC) $(CFLAGS) -g $< -o fastmem2-mmx ../libvo/aclib.o -DNAME=\"mga-mmx\"  -DHAVE_MGA -DHAVE_MMX
-	$(CC) $(CFLAGS) -g $< -o fastmem2-k6  ../libvo/aclib.o -DNAME=\"mga-k6\ \" -DHAVE_MGA -DHAVE_MMX -DHAVE_3DNOW 
-	$(CC) $(CFLAGS) -g $< -o fastmem2-k7  ../libvo/aclib.o -DNAME=\"mga-k7\ \" -DHAVE_MGA -DHAVE_MMX -DHAVE_3DNOW -DHAVE_MMX2
-	$(CC) $(CFLAGS) -g $< -o fastmem2-sse ../libvo/aclib.o -DNAME=\"mga-sse\"  -DHAVE_MGA -DHAVE_MMX -DHAVE_SSE   -DHAVE_MMX2
+	$(CC) $(CFLAGS) -g $< -o fastmem-mmx$(EXESUF)  ../libvo/aclib.o -DNAME=\"mmx\"      -DHAVE_MMX
+	$(CC) $(CFLAGS) -g $< -o fastmem-k6$(EXESUF)   ../libvo/aclib.o -DNAME=\"k6\ \"     -DHAVE_MMX -DHAVE_3DNOW
+	$(CC) $(CFLAGS) -g $< -o fastmem-k7$(EXESUF)   ../libvo/aclib.o -DNAME=\"k7\ \"     -DHAVE_MMX -DHAVE_3DNOW -DHAVE_MMX2
+	$(CC) $(CFLAGS) -g $< -o fastmem-sse$(EXESUF)  ../libvo/aclib.o -DNAME=\"sse\"      -DHAVE_MMX -DHAVE_SSE   -DHAVE_MMX2
+	$(CC) $(CFLAGS) -g $< -o fastmem2-mmx$(EXESUF) ../libvo/aclib.o -DNAME=\"mga-mmx\"  -DHAVE_MGA -DHAVE_MMX
+	$(CC) $(CFLAGS) -g $< -o fastmem2-k6$(EXESUF)  ../libvo/aclib.o -DNAME=\"mga-k6\ \" -DHAVE_MGA -DHAVE_MMX -DHAVE_3DNOW
+	$(CC) $(CFLAGS) -g $< -o fastmem2-k7$(EXESUF)  ../libvo/aclib.o -DNAME=\"mga-k7\ \" -DHAVE_MGA -DHAVE_MMX -DHAVE_3DNOW -DHAVE_MMX2
+	$(CC) $(CFLAGS) -g $< -o fastmem2-sse$(EXESUF) ../libvo/aclib.o -DNAME=\"mga-sse\"  -DHAVE_MGA -DHAVE_MMX -DHAVE_SSE   -DHAVE_MMX2
 
 clean:
 	rm -f $(OBJS)
--- a/TOOLS/bmovl-test/Makefile	Wed Nov 08 00:11:42 2006 +0000
+++ b/TOOLS/bmovl-test/Makefile	Wed Nov 08 00:13:33 2006 +0000
@@ -1,7 +1,7 @@
 include ../../config.mak
 
-bmovl-test: bmovl-test.c
-	$(CC) -O3 $(SDL_INC) -lSDL_image -o bmovl-test bmovl-test.c
+bmovl-test$(EXESUF): bmovl-test.c
+	$(CC) -O3 $(SDL_INC) -lSDL_image -o $@ bmovl-test.c
 
 clean:
 	rm -f bmovl-test
--- a/configure	Wed Nov 08 00:11:42 2006 +0000
+++ b/configure	Wed Nov 08 00:13:33 2006 +0000
@@ -2200,6 +2200,10 @@
 test -z "$_confdir" && _confdir="$_prefix/etc/mplayer"
 test -z "$_libdir" && _libdir="$_prefix/lib"
 
+# For lack of a better place to put platform-specific stuff ..
+win32 && _exesuf=".exe"
+
+
 if x86 ; then
   # Checking assembler (_as) compatibility...
   # Added workaround for older as that reads from stdin by default - atmos
@@ -2441,16 +2445,6 @@
   darwin && _vidix_internal=no
 fi
 
-echocheck "MPlayer binary name"
-if win32 ; then
-  _prg="mplayer.exe"
-  _prg_mencoder="mencoder.exe"
-else
-  _prg="mplayer"
-  _prg_mencoder="mencoder"
-fi
-echores $_prg
-
 
 # On QNX we must link to libph - Gabucino
 if qnx ; then
@@ -7356,8 +7350,7 @@
 CHARSET = $_charset
 HELP_FILE = $_mp_help
 
-PRG = $_prg
-PRG_MENCODER = $_prg_mencoder
+EXESUF = $_exesuf
 
 MPLAYER_NETWORK = $_network
 FTP = $_ftp