Made it possible to build SDL from a fresh checkout without any additional steps.

The trick is that if you're using configure and you don't want to have SDL_config.h and SDL_revision.h to show up as modified, you need to configure and build from a separate directory.

You also need to include SDL_revision.h directly if you want to use the SDL_REVISION constant, as a side effect of these changes.

--HG--
rename : include/SDL_config.h.default => include/SDL_config.h
This commit is contained in:
Sam Lantinga 2011-02-16 02:37:09 -08:00
parent 20ae4187a4
commit e0bf2dc643
19 changed files with 45463 additions and 138 deletions

View file

@ -5,41 +5,37 @@ CFLAGS = -g -O2 $(INCLUDE)
AR = ar
RANLIB = ranlib
CONFIG_H = include/SDL_config.h
TARGET = libSDL.a
SOURCES = \
src/*.c \
src/audio/*.c \
src/cdrom/*.c \
src/audio/dummy/*.c \
src/cpuinfo/*.c \
src/events/*.c \
src/file/*.c \
src/joystick/*.c \
src/haptic/*.c \
src/haptic/dummy/*.c \
src/joystick/*.c \
src/joystick/dummy/*.c \
src/loadso/dummy/*.c \
src/power/*.c \
src/render/*.c \
src/render/software/*.c \
src/stdlib/*.c \
src/thread/*.c \
src/timer/*.c \
src/video/*.c \
src/power/*.c \
src/audio/dummy/*.c \
src/video/dummy/*.c \
src/joystick/dummy/*.c \
src/haptic/dummy/*.c \
src/cdrom/dummy/*.c \
src/thread/generic/*.c \
src/timer/*.c \
src/timer/dummy/*.c \
src/loadso/dummy/*.c \
src/video/*.c \
src/video/dummy/*.c \
OBJECTS = $(shell echo $(SOURCES) | sed -e 's,\.c,\.o,g')
all: $(TARGET)
$(TARGET): $(CONFIG_H) $(OBJECTS)
$(TARGET): $(OBJECTS)
$(AR) crv $@ $^
$(RANLIB) $@
$(CONFIG_H):
cp $(CONFIG_H).default $(CONFIG_H)
clean:
rm -f $(TARGET) $(OBJECTS)