From 4a35f8406044eed85d8acb758e9743dab59e1dc8 Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Thu, 23 Mar 2006 21:28:33 +0000 Subject: [PATCH] Fixed bug #171 SDL_config.h is no longer in CVS. Instead, configure will generate it for systems that use configure, and we always copy SDL_config.h.default to SDL_config.h before generating a snapshot or release archive. Also fixed a couple of uninstall issues. --- Makefile.in | 18 +++++--- Makefile.minimal | 6 ++- include/.cvsignore | 1 + include/SDL_config.h | 35 +-------------- include/SDL_config.h.default | 45 +++++++++++++++++++ ..._config.h.minimal => SDL_config_minimal.h} | 26 ++--------- 6 files changed, 69 insertions(+), 62 deletions(-) create mode 100644 include/SDL_config.h.default rename include/{SDL_config.h.minimal => SDL_config_minimal.h} (77%) diff --git a/Makefile.in b/Makefile.in index 4605b04f8..98bbc7615 100644 --- a/Makefile.in +++ b/Makefile.in @@ -99,7 +99,7 @@ install-man: $(INSTALL) -m 644 $$src $(mandir)/man3/$$file; \ done -uninstall: uninstall-bin uninstall-hdrs uninstall-lib uninstall-man +uninstall: uninstall-bin uninstall-hdrs uninstall-lib uninstall-data uninstall-man uninstall-bin: rm -f $(bindir)/sdl-config uninstall-hdrs: @@ -108,6 +108,7 @@ uninstall-hdrs: rm -f $(includedir)/SDL/$$file; \ done rm -f $(includedir)/SDL/SDL_config.h + -rmdir $(includedir)/SDL uninstall-lib: $(LIBTOOL) --mode=uninstall rm -f $(libdir)/$(TARGET) rm -f $(libdir)/$(SDLMAIN_TARGET) @@ -125,19 +126,25 @@ clean: distclean: clean rm -f Makefile include/SDL_config.h sdl-config + rm -f include/SDL_config.h sdl-config rm -f SDL.qpg rm -f config.status config.cache config.log libtool $(depend) rm -rf $(srcdir)/autom4te* - find $(srcdir) \ - -name '*~' -o -name '*.bak' -o -name '*.old' -o -name '*.rej' -o \ - -name '.#*' \ + find $(srcdir) \( \ + -name '*~' -o \ + -name '*.bak' -o \ + -name '*.old' -o \ + -name '*.rej' -o \ + -name '*.orig' -o \ + -name '.#*' \) \ -exec rm -f {} \; - cp $(srcdir)/include/SDL_config.h.minimal $(srcdir)/include/SDL_config.h + cp $(srcdir)/include/SDL_config.h.default $(srcdir)/include/SDL_config.h if test -f test/Makefile; then (cd test; $(MAKE) $@); fi dist $(distfile): $(SHELL) $(auxdir)/mkinstalldirs $(distdir) tar cf - $(DIST) | (cd $(distdir); tar xf -) + cp $(distdir)/include/SDL_config.h.default $(distdir)/include/SDL_config.h rm -rf `find $(distdir) -name CVS` rm -f `find $(distdir) -name '.cvsignore'` rm -f `find $(distdir) -name '.#*'` @@ -154,6 +161,7 @@ snapshot: cvs -d $(CVSROOT) login cvs -d $(CVSROOT) checkout -P SDL12 (cd SDL12 && ./autogen.sh && rm -rf autom4te.cache) + cp SDL12/include/SDL_config.h.default SDL12/include/SDL_config.h mv SDL12 SDL-1.2 tar zcf $(HOME)/SDL-1.2.tar.gz SDL-1.2 rm -f $(HOME)/SDL-1.2.zip diff --git a/Makefile.minimal b/Makefile.minimal index e54452db0..827621c3f 100644 --- a/Makefile.minimal +++ b/Makefile.minimal @@ -5,6 +5,7 @@ CFLAGS = -g -O2 $(INCLUDE) AR = ar RANLIB = ranlib +CONFIG_H = include/SDL_config.h TARGET = libSDL.a SOURCES = \ src/*.c \ @@ -30,9 +31,12 @@ OBJECTS = $(shell echo $(SOURCES) | sed -e 's,\.c,\.o,g') all: $(TARGET) -$(TARGET): $(OBJECTS) +$(TARGET): $(CONFIG_H) $(OBJECTS) $(AR) crv $@ $^ $(RANLIB) $@ +$(CONFIG_H): + cp $(CONFIG_H).default $(CONFIG_H) + clean: rm -f $(TARGET) $(OBJECTS) diff --git a/include/.cvsignore b/include/.cvsignore index 3dda72986..ffef2ddfd 100644 --- a/include/.cvsignore +++ b/include/.cvsignore @@ -1,2 +1,3 @@ Makefile.in Makefile +SDL_config.h diff --git a/include/SDL_config.h b/include/SDL_config.h index 85db0a73b..8970ec3d5 100644 --- a/include/SDL_config.h +++ b/include/SDL_config.h @@ -39,40 +39,7 @@ #elif defined(__OS2__) #include "SDL_config_os2.h" #else -/* This is the minimal configuration that can be used to build SDL */ - -#include - -typedef signed char int8_t; -typedef unsigned char uint8_t; -typedef signed short int16_t; -typedef unsigned short uint16_t; -typedef signed int int32_t; -typedef unsigned int uint32_t; -typedef unsigned int size_t; -typedef unsigned long uintptr_t; - -/* Enable the dummy audio driver (src/audio/dummy/\*.c) */ -#define SDL_AUDIO_DRIVER_DUMMY 1 - -/* Enable the stub cdrom driver (src/cdrom/dummy/\*.c) */ -#define SDL_CDROM_DISABLED 1 - -/* Enable the stub joystick driver (src/joystick/dummy/\*.c) */ -#define SDL_JOYSTICK_DISABLED 1 - -/* Enable the stub shared object loader (src/loadso/dummy/\*.c) */ -#define SDL_LOADSO_DISABLED 1 - -/* Enable the stub thread support (src/thread/generic/\*.c) */ -#define SDL_THREADS_DISABLED 1 - -/* Enable the stub timer support (src/timer/dummy/\*.c) */ -#define SDL_TIMERS_DISABLED 1 - -/* Enable the dummy video driver (src/video/dummy/\*.c) */ -#define SDL_VIDEO_DRIVER_DUMMY 1 - +#include "SDL_config_minimal.h" #endif /* platform config */ #endif /* _SDL_config_h */ diff --git a/include/SDL_config.h.default b/include/SDL_config.h.default new file mode 100644 index 000000000..8970ec3d5 --- /dev/null +++ b/include/SDL_config.h.default @@ -0,0 +1,45 @@ +/* + SDL - Simple DirectMedia Layer + Copyright (C) 1997-2006 Sam Lantinga + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + Sam Lantinga + slouken@libsdl.org +*/ + +#ifndef _SDL_config_h +#define _SDL_config_h + +#include "SDL_platform.h" + +/* Add any platform that doesn't build using the configure system */ +#if defined(__AMIGA__) +#include "SDL_config_amiga.h" +#elif defined(__DREAMCAST__) +#include "SDL_config_dreamcast.h" +#elif defined(__MACOS__) +#include "SDL_config_macos.h" +#elif defined(__MACOSX__) +#include "SDL_config_macosx.h" +#elif defined(__WIN32__) +#include "SDL_config_win32.h" +#elif defined(__OS2__) +#include "SDL_config_os2.h" +#else +#include "SDL_config_minimal.h" +#endif /* platform config */ + +#endif /* _SDL_config_h */ diff --git a/include/SDL_config.h.minimal b/include/SDL_config_minimal.h similarity index 77% rename from include/SDL_config.h.minimal rename to include/SDL_config_minimal.h index 85db0a73b..2570031a7 100644 --- a/include/SDL_config.h.minimal +++ b/include/SDL_config_minimal.h @@ -20,25 +20,9 @@ slouken@libsdl.org */ -#ifndef _SDL_config_h -#define _SDL_config_h - -#include "SDL_platform.h" - -/* Add any platform that doesn't build using the configure system */ -#if defined(__AMIGA__) -#include "SDL_config_amiga.h" -#elif defined(__DREAMCAST__) -#include "SDL_config_dreamcast.h" -#elif defined(__MACOS__) -#include "SDL_config_macos.h" -#elif defined(__MACOSX__) -#include "SDL_config_macosx.h" -#elif defined(__WIN32__) -#include "SDL_config_win32.h" -#elif defined(__OS2__) -#include "SDL_config_os2.h" -#else +#ifndef _SDL_config_minimal_h +#define _SDL_config_minimal_h + /* This is the minimal configuration that can be used to build SDL */ #include @@ -73,6 +57,4 @@ typedef unsigned long uintptr_t; /* Enable the dummy video driver (src/video/dummy/\*.c) */ #define SDL_VIDEO_DRIVER_DUMMY 1 -#endif /* platform config */ - -#endif /* _SDL_config_h */ +#endif /* _SDL_config_minimal_h */