Makefile.am
author Patrice Mandin <patmandin@gmail.com>
Thu, 19 Jan 2006 21:28:52 +0000
changeset 1257 448a9a64537b
parent 1131 e044e7c70a50
child 1321 e05bc5d315e3
permissions -rw-r--r--
[PATCH] SDL_GetVideoMode() does not find best mode, part 2

Following commit 1.51, I come accross a problem when SDL must choose between
several video modes that could suit the one asked.

If I ask 320x240 with this list:
768x480 768x240 640x400 640x200 384x480 384x240 320x400 320x200

The smallest selectables modes are 384x240 and 320x400. And SDL choose the later
in this list, but 384x240 is more suitable. So I added a check to compare
the pixel count (surface) of modes, and select the one which has the smallest
pixel count.

In my example, 384x240 has 92160 pixels, and 320x400 has 128000 pixels. So now
SDL will choose 384x240 for the asked 320x240 mode.
     1 # The top-level input Makefile for SDL
     2 
     3 # require automake 1.4
     4 AUTOMAKE_OPTIONS = 1.4
     5 
     6 ## Any directories that you want built and installed should go here.
     7 SUBDIRS = src include docs
     8 
     9 ## Any directories you want a part of the distribution should be listed
    10 ## here, as well as have a Makefile generated at the end of configure.in
    11 ##
    12 ## This only works for subdirectories one level deep.
    13 DIST_SUBDIRS = $(SUBDIRS)
    14 
    15 # SDL runtime configuration script
    16 bin_SCRIPTS = sdl-config
    17 
    18 # All the rest of the distributed files
    19 EXTRA_DIST =		\
    20 	BUGS		\
    21 	TODO		\
    22 	COPYING		\
    23 	CREDITS		\
    24 	INSTALL		\
    25 	README		\
    26 	README.AmigaOS	\
    27 	README.CVS	\
    28 	README.DC	\
    29 	README.Epoc	\
    30 	README.MacOS	\
    31 	README.MacOSX	\
    32 	README.MiNT	\
    33 	README.NanoX	\
    34 	README.PicoGUI	\
    35 	README.QNX	\
    36 	README.Qtopia	\
    37 	README.WinCE	\
    38 	README-SDL.txt	\
    39 	Borland.html	\
    40 	Borland.zip	\
    41 	VisualC.html	\
    42 	VisualC.zip	\
    43 	VisualCE.zip	\
    44 	Makefile.dc	\
    45 	MPWmake.sea.bin	\
    46 	CWprojects.sea.bin \
    47 	PBProjects.tar.gz \
    48 	EpocBuildFiles.zip \
    49 	Xcode.tar.gz	\
    50 	Xcode21.tar.gz	\
    51 	WhatsNew	\
    52 	docs.html	\
    53 	sdl.m4		\
    54 	SDL.spec	\
    55 	autogen.sh	\
    56 	strip_fPIC.sh
    57 
    58 # M4 macro file for inclusion with autoconf
    59 m4datadir = $(datadir)/aclocal
    60 m4data_DATA = sdl.m4
    61 
    62 # Rule to build tar-gzipped distribution package
    63 $(PACKAGE)-$(VERSION).tar.gz: dist
    64 
    65 # Rule to build RPM distribution package
    66 rpm: $(PACKAGE)-$(VERSION).tar.gz
    67 	rpm -ta $(PACKAGE)-$(VERSION).tar.gz
    68 
    69 # Rule to rebuild the export lists for BeOS, MacOS and Win32.
    70 exports:
    71 	(cd src/main/beos/exports; $(MAKE))
    72 	(cd src/main/macos/exports; $(MAKE))
    73 	(cd src/main/macosx/exports; $(MAKE))
    74 	(cd src/main/win32/exports; $(MAKE))
    75 
    76 # Rule to build the Project Builder archive in MacOS X
    77 PBProjects.tar.gz:
    78 	rm -f `find . -name .DS_Store`
    79 	if [ -d PBProjects ]; then \
    80 	    tar zcvf $@ PBProjects; \
    81 	fi
    82 
    83 # Rule to install the libraries only - prevent rebuilding apps
    84 install-lib:
    85 	cd src && $(MAKE) install-libLTLIBRARIES
    86 
    87 # Run ldconfig after installing the library:
    88 install-hook:
    89 	-ldconfig
    90 
    91 # Grab the test programs for the distribution:
    92 dist-hook:
    93 	if test -f test/Makefile; then (cd test; make distclean); fi
    94 	rm -rf $(srcdir)/test/autom4te*
    95 	cp -rp $(srcdir)/test $(distdir)
    96 	rm -rf `find $(distdir) -type d -name CVS -print`
    97 
    98 # Create a CVS snapshot that people can run update -d on
    99 CVSROOT = :pserver:guest@libsdl.org:/home/sdlweb/libsdl.org/cvs
   100 snapshot:
   101 	cvs -d $(CVSROOT) login
   102 	cvs -d $(CVSROOT) checkout SDL12
   103 	(cd SDL12 && ./autogen.sh && rm -rf autom4te.cache)
   104 	mv SDL12 SDL-1.2
   105 	tar zcvf $(HOME)/SDL-1.2.tar.gz SDL-1.2
   106 	rm -rf SDL-1.2
   107 snapshot13:
   108 	cvs -d $(CVSROOT) login
   109 	cvs -d $(CVSROOT) checkout -r branch_1_3_x SDL12
   110 	(cd SDL12 && ./autogen.sh && rm -rf autom4te.cache)
   111 	mv SDL12 SDL-1.3
   112 	tar zcvf $(HOME)/SDL-1.3.tar.gz SDL-1.3
   113 	rm -rf SDL-1.3