Makefile.in
author Sam Lantinga <slouken@libsdl.org>
Sun, 09 May 2010 20:47:22 -0700
changeset 4465 3e69e077cb95
parent 3698 17376128fb56
child 4496 aea9e96d7973
permissions -rw-r--r--
Removed multi-mouse / multi-keyboard support in anticipation of a real multi-mouse and multi-touch API.

Plus, this lets me start implementing cursor support.
slouken@1362
     1
# Makefile to build and install the SDL library
slouken@1362
     2
slouken@1362
     3
top_builddir = .
slouken@1362
     4
srcdir  = @srcdir@
slouken@1362
     5
objects = build
slouken@1362
     6
prefix = @prefix@
slouken@1362
     7
exec_prefix = @exec_prefix@
slouken@2156
     8
bindir	= @bindir@
slouken@2156
     9
libdir  = @libdir@
slouken@2156
    10
includedir = @includedir@
slouken@2156
    11
datarootdir = @datarootdir@
slouken@2156
    12
datadir	= @datadir@
slouken@1391
    13
auxdir	= @ac_aux_dir@
slouken@1362
    14
distpath = $(srcdir)/..
slouken@1362
    15
distdir = SDL-@SDL_VERSION@
slouken@1362
    16
distfile = $(distdir).tar.gz
slouken@1362
    17
slouken@1380
    18
@SET_MAKE@
slouken@1362
    19
SHELL	= @SHELL@
slouken@1362
    20
CC      = @CC@
slouken@1362
    21
INCLUDE = @INCLUDE@
slouken@1362
    22
CFLAGS  = @BUILD_CFLAGS@
slouken@1521
    23
EXTRA_CFLAGS = @EXTRA_CFLAGS@
slouken@1393
    24
LDFLAGS = @BUILD_LDFLAGS@
slouken@1521
    25
EXTRA_LDFLAGS = @EXTRA_LDFLAGS@
slouken@1362
    26
LIBTOOL = @LIBTOOL@
slouken@1362
    27
INSTALL = @INSTALL@
slouken@1362
    28
NASM	= @NASM@ @NASMFLAGS@
slouken@1419
    29
AR	= @AR@
slouken@1419
    30
RANLIB	= @RANLIB@
slouken@2204
    31
WINDRES	= @WINDRES@
slouken@1362
    32
slouken@1362
    33
TARGET  = libSDL.la
slouken@1362
    34
OBJECTS = @OBJECTS@
slouken@3334
    35
VERSION_OBJECTS = @VERSION_OBJECTS@
slouken@1362
    36
slouken@1397
    37
SDLMAIN_TARGET = libSDLmain.a
slouken@1397
    38
SDLMAIN_OBJECTS = @SDLMAIN_OBJECTS@
slouken@1397
    39
slouken@3257
    40
# PS3 SPU programs
slouken@3257
    41
SPU_GCC = @SPU_GCC@
slouken@3257
    42
EMBEDSPU = @EMBEDSPU@
slouken@3258
    43
#include $(srcdir)/src/video/ps3/spulibs/Makefile
slouken@3257
    44
slouken@3698
    45
DIST = acinclude autogen.sh Borland.html Borland.zip BUGS build-scripts configure configure.in COPYING CREDITS include INSTALL Makefile.minimal Makefile.in README* sdl-config.in sdl.m4 sdl.pc.in SDL.spec SDL.spec.in src test TODO VisualC.html VisualC VisualCE Watcom-Win32.zip WhatsNew Xcode Xcode-iPhoneOS
slouken@1362
    46
slouken@4465
    47
HDRS = SDL.h SDL_assert.h SDL_atomic.h SDL_audio.h SDL_compat.h SDL_cpuinfo.h SDL_endian.h SDL_error.h SDL_events.h SDL_haptic.h SDL_input.h SDL_joystick.h SDL_keyboard.h SDL_keysym.h SDL_loadso.h SDL_main.h SDL_mouse.h SDL_mutex.h SDL_name.h SDL_opengl.h SDL_opengles.h SDL_pixels.h SDL_platform.h SDL_power.h SDL_quit.h SDL_rect.h SDL_revision.h SDL_rwops.h SDL_scancode.h SDL_stdinc.h SDL_surface.h SDL_syswm.h SDL_thread.h SDL_timer.h SDL_types.h SDL_version.h SDL_video.h begin_code.h close_code.h
slouken@2122
    48
slouken@1362
    49
LT_AGE      = @LT_AGE@
slouken@1362
    50
LT_CURRENT  = @LT_CURRENT@
slouken@1362
    51
LT_RELEASE  = @LT_RELEASE@
slouken@1362
    52
LT_REVISION = @LT_REVISION@
slouken@2156
    53
LT_LDFLAGS  = -no-undefined -rpath $(DESTDIR)$(libdir) -release $(LT_RELEASE) -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE)
slouken@1362
    54
slouken@3311
    55
all: $(srcdir)/configure Makefile $(objects) $(objects)/$(TARGET) $(objects)/$(SDLMAIN_TARGET)
slouken@1622
    56
slouken@1622
    57
$(srcdir)/configure: $(srcdir)/configure.in
slouken@1622
    58
	@echo "Warning, configure.in is out of date"
slouken@1622
    59
	#(cd $(srcdir) && sh autogen.sh && sh configure)
slouken@1623
    60
	@sleep 3
slouken@1362
    61
slouken@1362
    62
Makefile: $(srcdir)/Makefile.in
slouken@1362
    63
	$(SHELL) config.status $@
slouken@1362
    64
slouken@3416
    65
Makefile.in:;
slouken@3416
    66
slouken@1362
    67
$(objects):
slouken@1391
    68
	$(SHELL) $(auxdir)/mkinstalldirs $@
slouken@1362
    69
slouken@3311
    70
# To make sure parallel builds will not fail
slouken@3311
    71
$(srcdir)/include/SDL_revision.h: update-revision
slouken@3311
    72
slouken@2982
    73
update-revision:
slouken@2982
    74
	$(SHELL) $(auxdir)/updaterev.sh
slouken@2982
    75
slouken@3416
    76
.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)
slouken@1362
    77
slouken@3334
    78
-include $(OBJECTS:.lo=.d)
slouken@3334
    79
@DEPENDS@
slouken@3334
    80
@VERSION_DEPENDS@
slouken@3334
    81
@SDLMAIN_DEPENDS@
slouken@1362
    82
slouken@3334
    83
$(objects)/$(TARGET): $(OBJECTS) $(VERSION_OBJECTS)
slouken@3334
    84
	$(LIBTOOL) --mode=link $(CC) -o $@ $(OBJECTS) $(VERSION_OBJECTS) $(LDFLAGS) $(EXTRA_LDFLAGS) $(LT_LDFLAGS)
slouken@1362
    85
slouken@1397
    86
$(objects)/$(SDLMAIN_TARGET): $(SDLMAIN_OBJECTS)
slouken@1419
    87
	$(AR) cru $@ $(SDLMAIN_OBJECTS)
slouken@1419
    88
	$(RANLIB) $@
slouken@1397
    89
slouken@3352
    90
install: all install-bin install-hdrs install-lib install-data
slouken@1362
    91
install-bin:
slouken@2156
    92
	$(SHELL) $(auxdir)/mkinstalldirs $(DESTDIR)$(bindir)
slouken@2156
    93
	$(INSTALL) -m 755 sdl-config $(DESTDIR)$(bindir)/sdl-config
slouken@1362
    94
install-hdrs:
slouken@2156
    95
	$(SHELL) $(auxdir)/mkinstalldirs $(DESTDIR)$(includedir)/SDL
slouken@2122
    96
	for file in $(HDRS); do \
slouken@2156
    97
	    $(INSTALL) -m 644 $(srcdir)/include/$$file $(DESTDIR)$(includedir)/SDL/$$file; \
slouken@1362
    98
	done
slouken@2156
    99
	$(INSTALL) -m 644 include/SDL_config.h $(DESTDIR)$(includedir)/SDL/SDL_config.h
slouken@2151
   100
install-lib: $(objects) $(objects)/$(TARGET) $(objects)/$(SDLMAIN_TARGET)
slouken@2156
   101
	$(SHELL) $(auxdir)/mkinstalldirs $(DESTDIR)$(libdir)
slouken@2156
   102
	$(LIBTOOL) --mode=install $(INSTALL) $(objects)/$(TARGET) $(DESTDIR)$(libdir)/$(TARGET)
slouken@2156
   103
	$(INSTALL) -m 644 $(objects)/$(SDLMAIN_TARGET) $(DESTDIR)$(libdir)/$(SDLMAIN_TARGET)
slouken@2156
   104
	$(RANLIB) $(DESTDIR)$(libdir)/$(SDLMAIN_TARGET)
slouken@1362
   105
install-data:
slouken@2156
   106
	$(SHELL) $(auxdir)/mkinstalldirs $(DESTDIR)$(datadir)/aclocal
slouken@2156
   107
	$(INSTALL) -m 644 $(srcdir)/sdl.m4 $(DESTDIR)$(datadir)/aclocal/sdl.m4
slouken@2156
   108
	$(SHELL) $(auxdir)/mkinstalldirs $(DESTDIR)$(libdir)/pkgconfig
slouken@2156
   109
	$(INSTALL) -m 644 sdl.pc $(DESTDIR)$(libdir)/pkgconfig
slouken@1362
   110
slouken@3352
   111
uninstall: uninstall-bin uninstall-hdrs uninstall-lib uninstall-data
slouken@1362
   112
uninstall-bin:
slouken@2156
   113
	rm -f $(DESTDIR)$(bindir)/sdl-config
slouken@1362
   114
uninstall-hdrs:
slouken@2122
   115
	for file in $(HDRS); do \
slouken@2156
   116
	    rm -f $(DESTDIR)$(includedir)/SDL/$$file; \
slouken@1362
   117
	done
slouken@2156
   118
	rm -f $(DESTDIR)$(includedir)/SDL/SDL_config.h
slouken@2156
   119
	-rmdir $(DESTDIR)$(includedir)/SDL
slouken@1362
   120
uninstall-lib:
slouken@2156
   121
	$(LIBTOOL) --mode=uninstall rm -f $(DESTDIR)$(libdir)/$(TARGET)
slouken@2156
   122
	rm -f $(DESTDIR)$(libdir)/$(SDLMAIN_TARGET)
slouken@1362
   123
uninstall-data:
slouken@2156
   124
	rm -f $(DESTDIR)$(datadir)/aclocal/sdl.m4
icculus@3355
   125
	rm -f $(DESTDIR)$(libdir)/pkgconfig/sdl.pc
slouken@1362
   126
slouken@1362
   127
clean:
slouken@1362
   128
	rm -rf $(objects)
slouken@1380
   129
	if test -f test/Makefile; then (cd test; $(MAKE) $@); fi
slouken@1362
   130
slouken@1362
   131
distclean: clean
slouken@1362
   132
	rm -f Makefile include/SDL_config.h sdl-config
slouken@1362
   133
	rm -f SDL.qpg
slouken@3334
   134
	rm -f config.status config.cache config.log libtool
slouken@1362
   135
	rm -rf $(srcdir)/autom4te*
slouken@1603
   136
	find $(srcdir) \( \
slouken@1603
   137
	    -name '*~' -o \
slouken@1603
   138
	    -name '*.bak' -o \
slouken@1603
   139
	    -name '*.old' -o \
slouken@1603
   140
	    -name '*.rej' -o \
slouken@1603
   141
	    -name '*.orig' -o \
slouken@1603
   142
	    -name '.#*' \) \
slouken@1362
   143
	    -exec rm -f {} \;
slouken@1603
   144
	cp $(srcdir)/include/SDL_config.h.default $(srcdir)/include/SDL_config.h
slouken@1380
   145
	if test -f test/Makefile; then (cd test; $(MAKE) $@); fi
slouken@1362
   146
slouken@1362
   147
dist $(distfile):
slouken@1391
   148
	$(SHELL) $(auxdir)/mkinstalldirs $(distdir)
slouken@1362
   149
	tar cf - $(DIST) | (cd $(distdir); tar xf -)
slouken@1603
   150
	cp $(distdir)/include/SDL_config.h.default $(distdir)/include/SDL_config.h
slouken@2982
   151
	$(SHELL) $(distdir)/build-scripts/updaterev.sh
slouken@1651
   152
	rm -rf `find $(distdir) -name .svn`
slouken@1846
   153
	find $(distdir) \( \
slouken@1845
   154
	    -name '*~' -o \
slouken@1845
   155
	    -name '*.bak' -o \
slouken@1845
   156
	    -name '*.old' -o \
slouken@1845
   157
	    -name '*.rej' -o \
slouken@1845
   158
	    -name '*.orig' -o \
slouken@1845
   159
	    -name '.#*' \) \
slouken@1845
   160
	    -exec rm -f {} \;
slouken@1848
   161
	if test -f $(distdir)/test/Makefile; then (cd $(distdir)/test && make distclean); fi
slouken@1362
   162
	tar cvf - $(distdir) | gzip --best >$(distfile)
slouken@1362
   163
	rm -rf $(distdir)
slouken@1362
   164
slouken@1362
   165
rpm: $(distfile)
slouken@1362
   166
	rpmbuild -ta $?
slouken@1424
   167
slouken@1895
   168
# Run indent on the source to standardize coding style
slouken@1895
   169
indent:
slouken@1895
   170
	@echo "Running indent... modified files:"
slouken@1895
   171
	@cd $(srcdir) && \
slouken@1895
   172
	find . \( \
slouken@1895
   173
	    -name '*.h' -o \
slouken@1895
   174
	    -name '*.c' -o \
slouken@1895
   175
	    -name '*.cc' \) \
slouken@2220
   176
	    -print | fgrep -v ./Xcode | \
slouken@1895
   177
	while read file; do \
slouken@1895
   178
	    indent "$$file" -o "$$file.indent"; \
slouken@1895
   179
	    if cmp "$$file" "$$file.indent" >/dev/null; then \
slouken@1895
   180
	        rm -f "$$file.indent"; \
slouken@1895
   181
	    else \
slouken@1895
   182
	        echo "$$file"; \
slouken@1895
   183
	        mv -f "$$file.indent" "$$file"; \
slouken@1895
   184
	    fi; \
slouken@1895
   185
	done
slouken@1895
   186
slouken@1895
   187
# Run indent and then commit modified files
slouken@1895
   188
commit: indent
slouken@1895
   189
	svn commit
slouken@1895
   190
slouken@1651
   191
# Create a SVN snapshot that people can run update on
slouken@1424
   192
snapshot:
slouken@3027
   193
	$(SHELL) $(auxdir)/snapshot.sh