OS/2 support restored in cleaner form.
authorDave Yeo <daveryeo@telus.net>
Wed, 5 Dec 2007 23:15:24 +0000 (23:15 +0000)
committerDiego Biurrun <diego@biurrun.de>
Wed, 5 Dec 2007 23:15:24 +0000 (23:15 +0000)
patch by Dave Yeo, daveryeo telus net

Originally committed as revision 11172 to svn://svn.ffmpeg.org/ffmpeg/trunk

Changelog
common.mak
configure

index 272275d..3a913e8 100644 (file)
--- a/Changelog
+++ b/Changelog
@@ -90,7 +90,7 @@ version <next>
 - codebook generator
 - RoQ video encoder
 - QTRLE encoder
-- OS/2 support removed
+- OS/2 support removed and restored again
 - AC-3 decoder
 - NUT muxer (since r10052)
 - Matroska muxer
index babcd10..8da643c 100644 (file)
@@ -28,6 +28,7 @@ $(SLIBNAME): $(SLIBNAME_WITH_MAJOR)
        $(LN_S) $^ $@
 
 $(SLIBNAME_WITH_MAJOR): $(OBJS)
+       $(SLIB_CREATE_DEF_CMD)
        $(CC) $(SHFLAGS) $(LDFLAGS) -o $@ $^ $(EXTRALIBS) $(EXTRAOBJS)
        $(SLIB_EXTRA_CMD)
 
@@ -51,7 +52,7 @@ depend dep: $(SRCS)
 
 clean::
        rm -f *.o *~ *.a *.lib *.so *.so.* *.dylib *.dll \
-             *.def *.dll.a *.exp *.ho
+             *.def *.dll.a *.exp *.ho *.map
 
 distclean: clean
        rm -f .depend
index 703d0d5..3aecec9 100755 (executable)
--- a/configure
+++ b/configure
@@ -71,6 +71,7 @@ show_help(){
   echo "  --enable-pp              enable GPLed postprocessing support [default=no]"
   echo "  --enable-swscaler        software scaler support [default=no]"
   echo "  --enable-beosthreads     use BeOS threads [default=no]"
+  echo "  --enable-os2threads      use OS/2 threads [default=no]"
   echo "  --enable-pthreads        use pthreads [default=no]"
   echo "  --enable-w32threads      use Win32 threads [default=no]"
   echo "  --enable-x11grab         enable X11 grabbing [default=no]"
@@ -637,6 +638,7 @@ CONFIG_LIST="
 
 THREADS_LIST='
     beosthreads
+    os2threads
     pthreads
     w32threads
 '
@@ -1219,6 +1221,34 @@ case $targetos in
         targetos=irix
         ranlib="echo ignoring ranlib"
         ;;
+    os/2*)
+        ar="emxomfar -p256"
+        ranlib="echo ignoring ranlib"
+        strip="lxlite"
+        ln_s="cp -f"
+        add_cflags "-Zomf"
+        EXESUF=".exe"
+        FFLDFLAGS="-Zomf -Zbin-files -Zargs-wild -Zmap"
+        SHFLAGS='$(NAME).def -Zdll -Zomf'
+        FFSERVERLDFLAGS=""
+        LIBSUF="_s.lib"
+        SLIBPREF=""
+        SLIBSUF=".dll"
+        SLIBNAME_WITH_VERSION='$(SLIBPREF)$(NAME)-$(LIBVERSION)$(SLIBSUF)'
+        SLIBNAME_WITH_MAJOR='$(SLIBPREF)$(shell echo $(NAME) | cut -c1-6)$(LIBMAJOR)$(SLIBSUF)'
+        SLIB_CREATE_DEF_CMD='echo LIBRARY $(SLIBNAME_WITH_MAJOR) INITINSTANCE TERMINSTANCE > $(NAME).def; \
+          echo PROTMODE >> $(NAME).def; \
+          echo CODE PRELOAD MOVEABLE DISCARDABLE >> $(NAME).def; \
+          echo DATA PRELOAD MOVEABLE MULTIPLE NONSHARED >> $(NAME).def; \
+          echo EXPORTS >> $(NAME).def; \
+          emxexp -o $(OBJS) >> $(NAME).def'
+        SLIB_EXTRA_CMD='emximp -o $(LIBPREF)$(NAME)_dll.a $(NAME).def; \
+          emximp -o $(LIBPREF)$(NAME)_dll.lib $(NAME).def;'
+        SLIB_INSTALL_EXTRA_CMD='install -m 644 $(LIBPREF)$(NAME)_dll.a $(LIBPREF)$(NAME)_dll.lib "$(LIBDIR)"'
+        SLIB_UNINSTALL_EXTRA_CMD='rm -f "$(LIBDIR)"/$(LIBPREF)$(NAME)_dll.a "$(LIBDIR)"/$(LIBPREF)$(NAME)_dll.lib'
+        vhook="no"
+        ;;
+
     *)
         targetos="${targetos}-UNKNOWN"
         ;;
@@ -1936,6 +1966,7 @@ if enabled shared; then
     echo "SLIBNAME=${SLIBNAME}" >> config.mak
     echo "SLIBNAME_WITH_VERSION=${SLIBNAME_WITH_VERSION}" >> config.mak
     echo "SLIBNAME_WITH_MAJOR=${SLIBNAME_WITH_MAJOR}" >> config.mak
+    echo "SLIB_CREATE_DEF_CMD=${SLIB_CREATE_DEF_CMD}" >> config.mak
     echo "SLIB_EXTRA_CMD=${SLIB_EXTRA_CMD}" >> config.mak
     echo "SLIB_INSTALL_EXTRA_CMD=${SLIB_INSTALL_EXTRA_CMD}" >> config.mak
     echo "SLIB_UNINSTALL_EXTRA_CMD=${SLIB_UNINSTALL_EXTRA_CMD}" >> config.mak