2006-02-16 10:22:28 +00:00
|
|
|
# Makefile to build and install the SDL library
|
|
|
|
|
|
|
|
top_builddir = .
|
|
|
|
srcdir = @srcdir@
|
|
|
|
objects = build
|
|
|
|
prefix = @prefix@
|
|
|
|
exec_prefix = @exec_prefix@
|
2007-07-08 05:58:51 +00:00
|
|
|
bindir = @bindir@
|
|
|
|
libdir = @libdir@
|
|
|
|
includedir = @includedir@
|
|
|
|
datarootdir = @datarootdir@
|
|
|
|
datadir = @datadir@
|
2006-02-20 12:45:51 +00:00
|
|
|
auxdir = @ac_aux_dir@
|
2006-02-16 10:22:28 +00:00
|
|
|
distpath = $(srcdir)/..
|
2012-01-22 22:21:00 +00:00
|
|
|
distdir = SDL2-@SDL_VERSION@
|
2006-02-16 10:22:28 +00:00
|
|
|
distfile = $(distdir).tar.gz
|
|
|
|
|
2006-02-20 02:09:49 +00:00
|
|
|
@SET_MAKE@
|
2006-02-16 10:22:28 +00:00
|
|
|
SHELL = @SHELL@
|
|
|
|
CC = @CC@
|
|
|
|
INCLUDE = @INCLUDE@
|
|
|
|
CFLAGS = @BUILD_CFLAGS@
|
2006-03-14 02:46:26 +00:00
|
|
|
EXTRA_CFLAGS = @EXTRA_CFLAGS@
|
2006-02-20 20:08:29 +00:00
|
|
|
LDFLAGS = @BUILD_LDFLAGS@
|
2006-03-14 02:46:26 +00:00
|
|
|
EXTRA_LDFLAGS = @EXTRA_LDFLAGS@
|
2006-02-16 10:22:28 +00:00
|
|
|
LIBTOOL = @LIBTOOL@
|
|
|
|
INSTALL = @INSTALL@
|
2006-02-23 04:16:08 +00:00
|
|
|
AR = @AR@
|
|
|
|
RANLIB = @RANLIB@
|
2007-07-16 03:28:48 +00:00
|
|
|
WINDRES = @WINDRES@
|
2006-02-16 10:22:28 +00:00
|
|
|
|
2012-01-22 22:21:00 +00:00
|
|
|
TARGET = libSDL2.la
|
2006-02-16 10:22:28 +00:00
|
|
|
OBJECTS = @OBJECTS@
|
2009-10-04 03:38:01 +00:00
|
|
|
VERSION_OBJECTS = @VERSION_OBJECTS@
|
2006-02-16 10:22:28 +00:00
|
|
|
|
2012-01-22 22:21:00 +00:00
|
|
|
SDLMAIN_TARGET = libSDL2main.a
|
2006-02-20 22:15:38 +00:00
|
|
|
SDLMAIN_OBJECTS = @SDLMAIN_OBJECTS@
|
|
|
|
|
2012-01-22 22:41:33 +00:00
|
|
|
SRC_DIST = acinclude Android.mk autogen.sh BUGS build-scripts configure configure.in COPYING CREDITS include INSTALL Makefile.minimal Makefile.in README* sdl2-config.in sdl2.m4 sdl2.pc.in SDL2.spec.in src test TODO VisualC.html VisualC VisualCE WhatsNew Xcode Xcode-iOS
|
2012-01-22 22:21:00 +00:00
|
|
|
GEN_DIST = SDL2.spec
|
2006-02-16 10:22:28 +00:00
|
|
|
|
2010-12-12 23:19:05 +00:00
|
|
|
HDRS = \
|
|
|
|
SDL.h \
|
|
|
|
SDL_assert.h \
|
|
|
|
SDL_atomic.h \
|
|
|
|
SDL_audio.h \
|
|
|
|
SDL_blendmode.h \
|
|
|
|
SDL_clipboard.h \
|
|
|
|
SDL_cpuinfo.h \
|
|
|
|
SDL_endian.h \
|
|
|
|
SDL_error.h \
|
|
|
|
SDL_events.h \
|
|
|
|
SDL_gesture.h \
|
|
|
|
SDL_haptic.h \
|
2011-02-05 18:02:39 +00:00
|
|
|
SDL_hints.h \
|
2010-12-12 23:19:05 +00:00
|
|
|
SDL_input.h \
|
|
|
|
SDL_joystick.h \
|
|
|
|
SDL_keyboard.h \
|
2011-02-18 02:54:11 +00:00
|
|
|
SDL_keycode.h \
|
2010-12-12 23:19:05 +00:00
|
|
|
SDL_loadso.h \
|
2011-02-08 00:45:40 +00:00
|
|
|
SDL_log.h \
|
2010-12-12 23:19:05 +00:00
|
|
|
SDL_main.h \
|
2012-10-24 06:45:48 +00:00
|
|
|
SDL_messagebox.h \
|
2010-12-12 23:19:05 +00:00
|
|
|
SDL_mouse.h \
|
|
|
|
SDL_mutex.h \
|
|
|
|
SDL_name.h \
|
|
|
|
SDL_opengl.h \
|
|
|
|
SDL_opengles.h \
|
2012-01-10 02:11:11 +00:00
|
|
|
SDL_opengles2.h \
|
2010-12-12 23:19:05 +00:00
|
|
|
SDL_pixels.h \
|
|
|
|
SDL_platform.h \
|
|
|
|
SDL_power.h \
|
|
|
|
SDL_quit.h \
|
|
|
|
SDL_rect.h \
|
2011-02-01 23:02:21 +00:00
|
|
|
SDL_render.h \
|
2010-12-12 23:19:05 +00:00
|
|
|
SDL_rwops.h \
|
|
|
|
SDL_scancode.h \
|
|
|
|
SDL_shape.h \
|
|
|
|
SDL_stdinc.h \
|
|
|
|
SDL_surface.h \
|
2012-06-23 10:46:06 +00:00
|
|
|
SDL_system.h \
|
2010-12-12 23:19:05 +00:00
|
|
|
SDL_syswm.h \
|
|
|
|
SDL_thread.h \
|
|
|
|
SDL_timer.h \
|
|
|
|
SDL_touch.h \
|
|
|
|
SDL_types.h \
|
|
|
|
SDL_version.h \
|
|
|
|
SDL_video.h \
|
|
|
|
begin_code.h \
|
|
|
|
close_code.h
|
2007-06-15 05:43:05 +00:00
|
|
|
|
2006-02-16 10:22:28 +00:00
|
|
|
LT_AGE = @LT_AGE@
|
|
|
|
LT_CURRENT = @LT_CURRENT@
|
|
|
|
LT_RELEASE = @LT_RELEASE@
|
|
|
|
LT_REVISION = @LT_REVISION@
|
2007-07-08 05:58:51 +00:00
|
|
|
LT_LDFLAGS = -no-undefined -rpath $(DESTDIR)$(libdir) -release $(LT_RELEASE) -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE)
|
2006-02-16 10:22:28 +00:00
|
|
|
|
2011-02-16 22:38:49 +00:00
|
|
|
all: $(srcdir)/configure Makefile $(objects) $(objects)/$(TARGET) $(objects)/$(SDLMAIN_TARGET)
|
2006-04-13 13:23:56 +00:00
|
|
|
|
|
|
|
$(srcdir)/configure: $(srcdir)/configure.in
|
|
|
|
@echo "Warning, configure.in is out of date"
|
|
|
|
#(cd $(srcdir) && sh autogen.sh && sh configure)
|
2006-04-13 13:25:21 +00:00
|
|
|
@sleep 3
|
2006-02-16 10:22:28 +00:00
|
|
|
|
|
|
|
Makefile: $(srcdir)/Makefile.in
|
|
|
|
$(SHELL) config.status $@
|
|
|
|
|
2009-10-28 04:33:24 +00:00
|
|
|
Makefile.in:;
|
|
|
|
|
2006-02-16 10:22:28 +00:00
|
|
|
$(objects):
|
2006-02-20 12:45:51 +00:00
|
|
|
$(SHELL) $(auxdir)/mkinstalldirs $@
|
2006-02-16 10:22:28 +00:00
|
|
|
|
2009-01-04 05:08:12 +00:00
|
|
|
update-revision:
|
|
|
|
$(SHELL) $(auxdir)/updaterev.sh
|
|
|
|
|
2011-02-18 19:23:25 +00:00
|
|
|
.PHONY: all update-revision install install-bin install-hdrs install-lib install-data uninstall uninstall-bin uninstall-hdrs uninstall-lib uninstall-data clean distclean dist $(OBJECTS:.lo=.d)
|
2006-02-16 10:22:28 +00:00
|
|
|
|
2011-02-18 19:19:34 +00:00
|
|
|
$(objects)/$(TARGET): $(OBJECTS) $(VERSION_OBJECTS)
|
2009-10-04 03:38:01 +00:00
|
|
|
$(LIBTOOL) --mode=link $(CC) -o $@ $(OBJECTS) $(VERSION_OBJECTS) $(LDFLAGS) $(EXTRA_LDFLAGS) $(LT_LDFLAGS)
|
2006-02-16 10:22:28 +00:00
|
|
|
|
2006-02-20 22:15:38 +00:00
|
|
|
$(objects)/$(SDLMAIN_TARGET): $(SDLMAIN_OBJECTS)
|
2006-02-23 04:16:08 +00:00
|
|
|
$(AR) cru $@ $(SDLMAIN_OBJECTS)
|
|
|
|
$(RANLIB) $@
|
2006-02-20 22:15:38 +00:00
|
|
|
|
2009-10-07 14:29:59 +00:00
|
|
|
install: all install-bin install-hdrs install-lib install-data
|
2006-02-16 10:22:28 +00:00
|
|
|
install-bin:
|
2007-07-08 05:58:51 +00:00
|
|
|
$(SHELL) $(auxdir)/mkinstalldirs $(DESTDIR)$(bindir)
|
2012-01-22 22:21:00 +00:00
|
|
|
$(INSTALL) -m 755 sdl2-config $(DESTDIR)$(bindir)/sdl2-config
|
2011-02-18 19:19:34 +00:00
|
|
|
install-hdrs: update-revision
|
2012-01-22 22:21:00 +00:00
|
|
|
$(SHELL) $(auxdir)/mkinstalldirs $(DESTDIR)$(includedir)/SDL2
|
2007-06-15 05:43:05 +00:00
|
|
|
for file in $(HDRS); do \
|
2012-01-22 22:21:00 +00:00
|
|
|
$(INSTALL) -m 644 $(srcdir)/include/$$file $(DESTDIR)$(includedir)/SDL2/$$file; \
|
2006-02-16 10:22:28 +00:00
|
|
|
done
|
2012-01-22 22:21:00 +00:00
|
|
|
$(INSTALL) -m 644 include/SDL_config.h $(DESTDIR)$(includedir)/SDL2/SDL_config.h
|
2011-02-18 19:19:34 +00:00
|
|
|
if test -f include/SDL_revision.h; then \
|
2012-01-22 22:21:00 +00:00
|
|
|
$(INSTALL) -m 644 include/SDL_revision.h $(DESTDIR)$(includedir)/SDL2/SDL_revision.h; \
|
2011-02-18 19:19:34 +00:00
|
|
|
else \
|
2012-01-22 22:21:00 +00:00
|
|
|
$(INSTALL) -m 644 $(srcdir)/include/SDL_revision.h $(DESTDIR)$(includedir)/SDL2/SDL_revision.h; \
|
2011-02-18 19:19:34 +00:00
|
|
|
fi
|
|
|
|
|
2007-07-05 06:35:40 +00:00
|
|
|
install-lib: $(objects) $(objects)/$(TARGET) $(objects)/$(SDLMAIN_TARGET)
|
2007-07-08 05:58:51 +00:00
|
|
|
$(SHELL) $(auxdir)/mkinstalldirs $(DESTDIR)$(libdir)
|
|
|
|
$(LIBTOOL) --mode=install $(INSTALL) $(objects)/$(TARGET) $(DESTDIR)$(libdir)/$(TARGET)
|
|
|
|
$(INSTALL) -m 644 $(objects)/$(SDLMAIN_TARGET) $(DESTDIR)$(libdir)/$(SDLMAIN_TARGET)
|
|
|
|
$(RANLIB) $(DESTDIR)$(libdir)/$(SDLMAIN_TARGET)
|
2006-02-16 10:22:28 +00:00
|
|
|
install-data:
|
2007-07-08 05:58:51 +00:00
|
|
|
$(SHELL) $(auxdir)/mkinstalldirs $(DESTDIR)$(datadir)/aclocal
|
2012-01-22 22:21:00 +00:00
|
|
|
$(INSTALL) -m 644 $(srcdir)/sdl2.m4 $(DESTDIR)$(datadir)/aclocal/sdl2.m4
|
2007-07-08 05:58:51 +00:00
|
|
|
$(SHELL) $(auxdir)/mkinstalldirs $(DESTDIR)$(libdir)/pkgconfig
|
2012-01-22 22:21:00 +00:00
|
|
|
$(INSTALL) -m 644 sdl2.pc $(DESTDIR)$(libdir)/pkgconfig
|
2006-02-16 10:22:28 +00:00
|
|
|
|
2009-10-07 14:29:59 +00:00
|
|
|
uninstall: uninstall-bin uninstall-hdrs uninstall-lib uninstall-data
|
2006-02-16 10:22:28 +00:00
|
|
|
uninstall-bin:
|
2012-01-22 22:21:00 +00:00
|
|
|
rm -f $(DESTDIR)$(bindir)/sdl2-config
|
2006-02-16 10:22:28 +00:00
|
|
|
uninstall-hdrs:
|
2007-06-15 05:43:05 +00:00
|
|
|
for file in $(HDRS); do \
|
2012-01-22 22:21:00 +00:00
|
|
|
rm -f $(DESTDIR)$(includedir)/SDL2/$$file; \
|
2006-02-16 10:22:28 +00:00
|
|
|
done
|
2012-01-22 22:21:00 +00:00
|
|
|
rm -f $(DESTDIR)$(includedir)/SDL2/SDL_config.h
|
|
|
|
rm -f $(DESTDIR)$(includedir)/SDL2/SDL_revision.h
|
|
|
|
-rmdir $(DESTDIR)$(includedir)/SDL2
|
2006-02-16 10:22:28 +00:00
|
|
|
uninstall-lib:
|
2007-07-08 05:58:51 +00:00
|
|
|
$(LIBTOOL) --mode=uninstall rm -f $(DESTDIR)$(libdir)/$(TARGET)
|
|
|
|
rm -f $(DESTDIR)$(libdir)/$(SDLMAIN_TARGET)
|
2006-02-16 10:22:28 +00:00
|
|
|
uninstall-data:
|
2012-01-22 22:21:00 +00:00
|
|
|
rm -f $(DESTDIR)$(datadir)/aclocal/sdl2.m4
|
|
|
|
rm -f $(DESTDIR)$(libdir)/pkgconfig/sdl2.pc
|
2006-02-16 10:22:28 +00:00
|
|
|
|
|
|
|
clean:
|
|
|
|
rm -rf $(objects)
|
2006-02-20 02:09:49 +00:00
|
|
|
if test -f test/Makefile; then (cd test; $(MAKE) $@); fi
|
2006-02-16 10:22:28 +00:00
|
|
|
|
|
|
|
distclean: clean
|
2012-01-22 22:21:00 +00:00
|
|
|
rm -f Makefile Makefile.rules sdl2-config
|
2009-10-04 03:38:01 +00:00
|
|
|
rm -f config.status config.cache config.log libtool
|
2006-02-16 10:22:28 +00:00
|
|
|
rm -rf $(srcdir)/autom4te*
|
2006-03-23 21:28:33 +00:00
|
|
|
find $(srcdir) \( \
|
|
|
|
-name '*~' -o \
|
|
|
|
-name '*.bak' -o \
|
|
|
|
-name '*.old' -o \
|
|
|
|
-name '*.rej' -o \
|
|
|
|
-name '*.orig' -o \
|
|
|
|
-name '.#*' \) \
|
2006-02-16 10:22:28 +00:00
|
|
|
-exec rm -f {} \;
|
2006-02-20 02:09:49 +00:00
|
|
|
if test -f test/Makefile; then (cd test; $(MAKE) $@); fi
|
2006-02-16 10:22:28 +00:00
|
|
|
|
|
|
|
dist $(distfile):
|
2006-02-20 12:45:51 +00:00
|
|
|
$(SHELL) $(auxdir)/mkinstalldirs $(distdir)
|
2011-03-16 06:26:22 +00:00
|
|
|
(cd $(srcdir); tar cf - $(SRC_DIST)) | (cd $(distdir); tar xf -)
|
|
|
|
tar cf - $(GEN_DIST) | (cd $(distdir); tar xf -)
|
2006-05-17 04:42:37 +00:00
|
|
|
find $(distdir) \( \
|
2006-05-17 04:36:31 +00:00
|
|
|
-name '*~' -o \
|
|
|
|
-name '*.bak' -o \
|
|
|
|
-name '*.old' -o \
|
|
|
|
-name '*.rej' -o \
|
|
|
|
-name '*.orig' -o \
|
|
|
|
-name '.#*' \) \
|
|
|
|
-exec rm -f {} \;
|
2006-05-17 07:38:34 +00:00
|
|
|
if test -f $(distdir)/test/Makefile; then (cd $(distdir)/test && make distclean); fi
|
2006-02-16 10:22:28 +00:00
|
|
|
tar cvf - $(distdir) | gzip --best >$(distfile)
|
|
|
|
rm -rf $(distdir)
|
|
|
|
|
|
|
|
rpm: $(distfile)
|
|
|
|
rpmbuild -ta $?
|
2006-02-24 09:57:14 +00:00
|
|
|
|
2006-07-10 21:04:37 +00:00
|
|
|
# Run indent on the source to standardize coding style
|
|
|
|
indent:
|
|
|
|
@echo "Running indent... modified files:"
|
|
|
|
@cd $(srcdir) && \
|
|
|
|
find . \( \
|
|
|
|
-name '*.h' -o \
|
|
|
|
-name '*.c' -o \
|
|
|
|
-name '*.cc' \) \
|
2007-08-11 18:51:12 +00:00
|
|
|
-print | fgrep -v ./Xcode | \
|
2006-07-10 21:04:37 +00:00
|
|
|
while read file; do \
|
|
|
|
indent "$$file" -o "$$file.indent"; \
|
|
|
|
if cmp "$$file" "$$file.indent" >/dev/null; then \
|
|
|
|
rm -f "$$file.indent"; \
|
|
|
|
else \
|
|
|
|
echo "$$file"; \
|
|
|
|
mv -f "$$file.indent" "$$file"; \
|
|
|
|
fi; \
|
|
|
|
done
|
|
|
|
|
|
|
|
# Run indent and then commit modified files
|
|
|
|
commit: indent
|
2011-02-16 10:37:09 +00:00
|
|
|
hg commit
|