Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 4a35f84

Browse files
committedMar 23, 2006
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.
1 parent 41322c7 commit 4a35f84

6 files changed

+69
-62
lines changed
 

‎Makefile.in

+13-5
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ install-man:
9999
$(INSTALL) -m 644 $$src $(mandir)/man3/$$file; \
100100
done
101101

102-
uninstall: uninstall-bin uninstall-hdrs uninstall-lib uninstall-man
102+
uninstall: uninstall-bin uninstall-hdrs uninstall-lib uninstall-data uninstall-man
103103
uninstall-bin:
104104
rm -f $(bindir)/sdl-config
105105
uninstall-hdrs:
@@ -108,6 +108,7 @@ uninstall-hdrs:
108108
rm -f $(includedir)/SDL/$$file; \
109109
done
110110
rm -f $(includedir)/SDL/SDL_config.h
111+
-rmdir $(includedir)/SDL
111112
uninstall-lib:
112113
$(LIBTOOL) --mode=uninstall rm -f $(libdir)/$(TARGET)
113114
rm -f $(libdir)/$(SDLMAIN_TARGET)
@@ -125,19 +126,25 @@ clean:
125126

126127
distclean: clean
127128
rm -f Makefile include/SDL_config.h sdl-config
129+
rm -f include/SDL_config.h sdl-config
128130
rm -f SDL.qpg
129131
rm -f config.status config.cache config.log libtool $(depend)
130132
rm -rf $(srcdir)/autom4te*
131-
find $(srcdir) \
132-
-name '*~' -o -name '*.bak' -o -name '*.old' -o -name '*.rej' -o \
133-
-name '.#*' \
133+
find $(srcdir) \( \
134+
-name '*~' -o \
135+
-name '*.bak' -o \
136+
-name '*.old' -o \
137+
-name '*.rej' -o \
138+
-name '*.orig' -o \
139+
-name '.#*' \) \
134140
-exec rm -f {} \;
135-
cp $(srcdir)/include/SDL_config.h.minimal $(srcdir)/include/SDL_config.h
141+
cp $(srcdir)/include/SDL_config.h.default $(srcdir)/include/SDL_config.h
136142
if test -f test/Makefile; then (cd test; $(MAKE) $@); fi
137143

138144
dist $(distfile):
139145
$(SHELL) $(auxdir)/mkinstalldirs $(distdir)
140146
tar cf - $(DIST) | (cd $(distdir); tar xf -)
147+
cp $(distdir)/include/SDL_config.h.default $(distdir)/include/SDL_config.h
141148
rm -rf `find $(distdir) -name CVS`
142149
rm -f `find $(distdir) -name '.cvsignore'`
143150
rm -f `find $(distdir) -name '.#*'`
@@ -154,6 +161,7 @@ snapshot:
154161
cvs -d $(CVSROOT) login
155162
cvs -d $(CVSROOT) checkout -P SDL12
156163
(cd SDL12 && ./autogen.sh && rm -rf autom4te.cache)
164+
cp SDL12/include/SDL_config.h.default SDL12/include/SDL_config.h
157165
mv SDL12 SDL-1.2
158166
tar zcf $(HOME)/SDL-1.2.tar.gz SDL-1.2
159167
rm -f $(HOME)/SDL-1.2.zip

‎Makefile.minimal

+5-1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ CFLAGS = -g -O2 $(INCLUDE)
55
AR = ar
66
RANLIB = ranlib
77

8+
CONFIG_H = include/SDL_config.h
89
TARGET = libSDL.a
910
SOURCES = \
1011
src/*.c \
@@ -30,9 +31,12 @@ OBJECTS = $(shell echo $(SOURCES) | sed -e 's,\.c,\.o,g')
3031

3132
all: $(TARGET)
3233

33-
$(TARGET): $(OBJECTS)
34+
$(TARGET): $(CONFIG_H) $(OBJECTS)
3435
$(AR) crv $@ $^
3536
$(RANLIB) $@
3637

38+
$(CONFIG_H):
39+
cp $(CONFIG_H).default $(CONFIG_H)
40+
3741
clean:
3842
rm -f $(TARGET) $(OBJECTS)

‎include/.cvsignore

+1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
Makefile.in
22
Makefile
3+
SDL_config.h

‎include/SDL_config.h

+1-34
Original file line numberDiff line numberDiff line change
@@ -39,40 +39,7 @@
3939
#elif defined(__OS2__)
4040
#include "SDL_config_os2.h"
4141
#else
42-
/* This is the minimal configuration that can be used to build SDL */
43-
44-
#include <stdarg.h>
45-
46-
typedef signed char int8_t;
47-
typedef unsigned char uint8_t;
48-
typedef signed short int16_t;
49-
typedef unsigned short uint16_t;
50-
typedef signed int int32_t;
51-
typedef unsigned int uint32_t;
52-
typedef unsigned int size_t;
53-
typedef unsigned long uintptr_t;
54-
55-
/* Enable the dummy audio driver (src/audio/dummy/\*.c) */
56-
#define SDL_AUDIO_DRIVER_DUMMY 1
57-
58-
/* Enable the stub cdrom driver (src/cdrom/dummy/\*.c) */
59-
#define SDL_CDROM_DISABLED 1
60-
61-
/* Enable the stub joystick driver (src/joystick/dummy/\*.c) */
62-
#define SDL_JOYSTICK_DISABLED 1
63-
64-
/* Enable the stub shared object loader (src/loadso/dummy/\*.c) */
65-
#define SDL_LOADSO_DISABLED 1
66-
67-
/* Enable the stub thread support (src/thread/generic/\*.c) */
68-
#define SDL_THREADS_DISABLED 1
69-
70-
/* Enable the stub timer support (src/timer/dummy/\*.c) */
71-
#define SDL_TIMERS_DISABLED 1
72-
73-
/* Enable the dummy video driver (src/video/dummy/\*.c) */
74-
#define SDL_VIDEO_DRIVER_DUMMY 1
75-
42+
#include "SDL_config_minimal.h"
7643
#endif /* platform config */
7744

7845
#endif /* _SDL_config_h */

‎include/SDL_config.h.default

+45
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
/*
2+
SDL - Simple DirectMedia Layer
3+
Copyright (C) 1997-2006 Sam Lantinga
4+
5+
This library is free software; you can redistribute it and/or
6+
modify it under the terms of the GNU Lesser General Public
7+
License as published by the Free Software Foundation; either
8+
version 2.1 of the License, or (at your option) any later version.
9+
10+
This library is distributed in the hope that it will be useful,
11+
but WITHOUT ANY WARRANTY; without even the implied warranty of
12+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13+
Lesser General Public License for more details.
14+
15+
You should have received a copy of the GNU Lesser General Public
16+
License along with this library; if not, write to the Free Software
17+
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
18+
19+
Sam Lantinga
20+
slouken@libsdl.org
21+
*/
22+
23+
#ifndef _SDL_config_h
24+
#define _SDL_config_h
25+
26+
#include "SDL_platform.h"
27+
28+
/* Add any platform that doesn't build using the configure system */
29+
#if defined(__AMIGA__)
30+
#include "SDL_config_amiga.h"
31+
#elif defined(__DREAMCAST__)
32+
#include "SDL_config_dreamcast.h"
33+
#elif defined(__MACOS__)
34+
#include "SDL_config_macos.h"
35+
#elif defined(__MACOSX__)
36+
#include "SDL_config_macosx.h"
37+
#elif defined(__WIN32__)
38+
#include "SDL_config_win32.h"
39+
#elif defined(__OS2__)
40+
#include "SDL_config_os2.h"
41+
#else
42+
#include "SDL_config_minimal.h"
43+
#endif /* platform config */
44+
45+
#endif /* _SDL_config_h */

‎include/SDL_config.h.minimal ‎include/SDL_config_minimal.h

+4-22
Original file line numberDiff line numberDiff line change
@@ -20,25 +20,9 @@
2020
slouken@libsdl.org
2121
*/
2222

23-
#ifndef _SDL_config_h
24-
#define _SDL_config_h
25-
26-
#include "SDL_platform.h"
27-
28-
/* Add any platform that doesn't build using the configure system */
29-
#if defined(__AMIGA__)
30-
#include "SDL_config_amiga.h"
31-
#elif defined(__DREAMCAST__)
32-
#include "SDL_config_dreamcast.h"
33-
#elif defined(__MACOS__)
34-
#include "SDL_config_macos.h"
35-
#elif defined(__MACOSX__)
36-
#include "SDL_config_macosx.h"
37-
#elif defined(__WIN32__)
38-
#include "SDL_config_win32.h"
39-
#elif defined(__OS2__)
40-
#include "SDL_config_os2.h"
41-
#else
23+
#ifndef _SDL_config_minimal_h
24+
#define _SDL_config_minimal_h
25+
4226
/* This is the minimal configuration that can be used to build SDL */
4327

4428
#include <stdarg.h>
@@ -73,6 +57,4 @@ typedef unsigned long uintptr_t;
7357
/* Enable the dummy video driver (src/video/dummy/\*.c) */
7458
#define SDL_VIDEO_DRIVER_DUMMY 1
7559

76-
#endif /* platform config */
77-
78-
#endif /* _SDL_config_h */
60+
#endif /* _SDL_config_minimal_h */

0 commit comments

Comments
 (0)
Please sign in to comment.