Makefile.in
author Sam Lantinga <slouken@libsdl.org>
Wed, 12 Jan 2011 15:42:26 -0800
changeset 4986 8431f59485d0
parent 4970 b9eed029844a
child 5048 187d7d446306
permissions -rw-r--r--
Renderer didn't advertise texture format SDL_PIXELFORMAT_ABGR8888
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@4970
    45
DIST = acinclude Android.mk 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@4929
    47
HDRS = \
slouken@4929
    48
	SDL.h \
slouken@4929
    49
	SDL_assert.h \
slouken@4929
    50
	SDL_atomic.h \
slouken@4929
    51
	SDL_audio.h \
slouken@4929
    52
	SDL_blendmode.h \
slouken@4929
    53
	SDL_clipboard.h \
slouken@4929
    54
	SDL_compat.h \
slouken@4929
    55
	SDL_cpuinfo.h \
slouken@4929
    56
	SDL_endian.h \
slouken@4929
    57
	SDL_error.h \
slouken@4929
    58
	SDL_events.h \
slouken@4929
    59
	SDL_gesture.h \
slouken@4929
    60
	SDL_haptic.h \
slouken@4929
    61
	SDL_input.h \
slouken@4929
    62
	SDL_joystick.h \
slouken@4929
    63
	SDL_keyboard.h \
slouken@4929
    64
	SDL_keysym.h \
slouken@4929
    65
	SDL_loadso.h \
slouken@4929
    66
	SDL_main.h \
slouken@4929
    67
	SDL_mouse.h \
slouken@4929
    68
	SDL_mutex.h \
slouken@4929
    69
	SDL_name.h \
slouken@4929
    70
	SDL_opengl.h \
slouken@4929
    71
	SDL_opengles.h \
slouken@4929
    72
	SDL_pixels.h \
slouken@4929
    73
	SDL_platform.h \
slouken@4929
    74
	SDL_power.h \
slouken@4929
    75
	SDL_quit.h \
slouken@4929
    76
	SDL_rect.h \
slouken@4929
    77
	SDL_revision.h \
slouken@4929
    78
	SDL_rwops.h \
slouken@4929
    79
	SDL_scalemode.h \
slouken@4929
    80
	SDL_scancode.h \
slouken@4929
    81
	SDL_shape.h \
slouken@4929
    82
	SDL_stdinc.h \
slouken@4929
    83
	SDL_surface.h \
slouken@4929
    84
	SDL_syswm.h \
slouken@4929
    85
	SDL_thread.h \
slouken@4929
    86
	SDL_timer.h \
slouken@4929
    87
	SDL_touch.h \
slouken@4929
    88
	SDL_types.h \
slouken@4929
    89
	SDL_version.h \
slouken@4929
    90
	SDL_video.h \
slouken@4929
    91
	begin_code.h \
slouken@4929
    92
	close_code.h
slouken@2122
    93
slouken@1362
    94
LT_AGE      = @LT_AGE@
slouken@1362
    95
LT_CURRENT  = @LT_CURRENT@
slouken@1362
    96
LT_RELEASE  = @LT_RELEASE@
slouken@1362
    97
LT_REVISION = @LT_REVISION@
slouken@2156
    98
LT_LDFLAGS  = -no-undefined -rpath $(DESTDIR)$(libdir) -release $(LT_RELEASE) -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE)
slouken@1362
    99
slouken@3311
   100
all: $(srcdir)/configure Makefile $(objects) $(objects)/$(TARGET) $(objects)/$(SDLMAIN_TARGET)
slouken@1622
   101
slouken@1622
   102
$(srcdir)/configure: $(srcdir)/configure.in
slouken@1622
   103
	@echo "Warning, configure.in is out of date"
slouken@1622
   104
	#(cd $(srcdir) && sh autogen.sh && sh configure)
slouken@1623
   105
	@sleep 3
slouken@1362
   106
slouken@1362
   107
Makefile: $(srcdir)/Makefile.in
slouken@1362
   108
	$(SHELL) config.status $@
slouken@1362
   109
slouken@3416
   110
Makefile.in:;
slouken@3416
   111
slouken@1362
   112
$(objects):
slouken@1391
   113
	$(SHELL) $(auxdir)/mkinstalldirs $@
slouken@1362
   114
slouken@3311
   115
# To make sure parallel builds will not fail
slouken@3311
   116
$(srcdir)/include/SDL_revision.h: update-revision
slouken@3311
   117
slouken@2982
   118
update-revision:
slouken@2982
   119
	$(SHELL) $(auxdir)/updaterev.sh
slouken@2982
   120
slouken@3416
   121
.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
   122
slouken@3334
   123
-include $(OBJECTS:.lo=.d)
slouken@3334
   124
@DEPENDS@
slouken@3334
   125
@VERSION_DEPENDS@
slouken@3334
   126
@SDLMAIN_DEPENDS@
slouken@1362
   127
slouken@3334
   128
$(objects)/$(TARGET): $(OBJECTS) $(VERSION_OBJECTS)
slouken@3334
   129
	$(LIBTOOL) --mode=link $(CC) -o $@ $(OBJECTS) $(VERSION_OBJECTS) $(LDFLAGS) $(EXTRA_LDFLAGS) $(LT_LDFLAGS)
slouken@1362
   130
slouken@1397
   131
$(objects)/$(SDLMAIN_TARGET): $(SDLMAIN_OBJECTS)
slouken@1419
   132
	$(AR) cru $@ $(SDLMAIN_OBJECTS)
slouken@1419
   133
	$(RANLIB) $@
slouken@1397
   134
slouken@3352
   135
install: all install-bin install-hdrs install-lib install-data
slouken@1362
   136
install-bin:
slouken@2156
   137
	$(SHELL) $(auxdir)/mkinstalldirs $(DESTDIR)$(bindir)
slouken@2156
   138
	$(INSTALL) -m 755 sdl-config $(DESTDIR)$(bindir)/sdl-config
slouken@1362
   139
install-hdrs:
slouken@2156
   140
	$(SHELL) $(auxdir)/mkinstalldirs $(DESTDIR)$(includedir)/SDL
slouken@2122
   141
	for file in $(HDRS); do \
slouken@2156
   142
	    $(INSTALL) -m 644 $(srcdir)/include/$$file $(DESTDIR)$(includedir)/SDL/$$file; \
slouken@1362
   143
	done
slouken@2156
   144
	$(INSTALL) -m 644 include/SDL_config.h $(DESTDIR)$(includedir)/SDL/SDL_config.h
slouken@2151
   145
install-lib: $(objects) $(objects)/$(TARGET) $(objects)/$(SDLMAIN_TARGET)
slouken@2156
   146
	$(SHELL) $(auxdir)/mkinstalldirs $(DESTDIR)$(libdir)
slouken@2156
   147
	$(LIBTOOL) --mode=install $(INSTALL) $(objects)/$(TARGET) $(DESTDIR)$(libdir)/$(TARGET)
slouken@2156
   148
	$(INSTALL) -m 644 $(objects)/$(SDLMAIN_TARGET) $(DESTDIR)$(libdir)/$(SDLMAIN_TARGET)
slouken@2156
   149
	$(RANLIB) $(DESTDIR)$(libdir)/$(SDLMAIN_TARGET)
slouken@1362
   150
install-data:
slouken@2156
   151
	$(SHELL) $(auxdir)/mkinstalldirs $(DESTDIR)$(datadir)/aclocal
slouken@2156
   152
	$(INSTALL) -m 644 $(srcdir)/sdl.m4 $(DESTDIR)$(datadir)/aclocal/sdl.m4
slouken@2156
   153
	$(SHELL) $(auxdir)/mkinstalldirs $(DESTDIR)$(libdir)/pkgconfig
slouken@2156
   154
	$(INSTALL) -m 644 sdl.pc $(DESTDIR)$(libdir)/pkgconfig
slouken@1362
   155
slouken@3352
   156
uninstall: uninstall-bin uninstall-hdrs uninstall-lib uninstall-data
slouken@1362
   157
uninstall-bin:
slouken@2156
   158
	rm -f $(DESTDIR)$(bindir)/sdl-config
slouken@1362
   159
uninstall-hdrs:
slouken@2122
   160
	for file in $(HDRS); do \
slouken@2156
   161
	    rm -f $(DESTDIR)$(includedir)/SDL/$$file; \
slouken@1362
   162
	done
slouken@2156
   163
	rm -f $(DESTDIR)$(includedir)/SDL/SDL_config.h
slouken@2156
   164
	-rmdir $(DESTDIR)$(includedir)/SDL
slouken@1362
   165
uninstall-lib:
slouken@2156
   166
	$(LIBTOOL) --mode=uninstall rm -f $(DESTDIR)$(libdir)/$(TARGET)
slouken@2156
   167
	rm -f $(DESTDIR)$(libdir)/$(SDLMAIN_TARGET)
slouken@1362
   168
uninstall-data:
slouken@2156
   169
	rm -f $(DESTDIR)$(datadir)/aclocal/sdl.m4
icculus@3355
   170
	rm -f $(DESTDIR)$(libdir)/pkgconfig/sdl.pc
slouken@1362
   171
slouken@1362
   172
clean:
slouken@1362
   173
	rm -rf $(objects)
slouken@1380
   174
	if test -f test/Makefile; then (cd test; $(MAKE) $@); fi
slouken@1362
   175
slouken@1362
   176
distclean: clean
slouken@1362
   177
	rm -f Makefile include/SDL_config.h sdl-config
slouken@1362
   178
	rm -f SDL.qpg
slouken@3334
   179
	rm -f config.status config.cache config.log libtool
slouken@1362
   180
	rm -rf $(srcdir)/autom4te*
slouken@1603
   181
	find $(srcdir) \( \
slouken@1603
   182
	    -name '*~' -o \
slouken@1603
   183
	    -name '*.bak' -o \
slouken@1603
   184
	    -name '*.old' -o \
slouken@1603
   185
	    -name '*.rej' -o \
slouken@1603
   186
	    -name '*.orig' -o \
slouken@1603
   187
	    -name '.#*' \) \
slouken@1362
   188
	    -exec rm -f {} \;
slouken@1603
   189
	cp $(srcdir)/include/SDL_config.h.default $(srcdir)/include/SDL_config.h
slouken@1380
   190
	if test -f test/Makefile; then (cd test; $(MAKE) $@); fi
slouken@1362
   191
slouken@1362
   192
dist $(distfile):
slouken@1391
   193
	$(SHELL) $(auxdir)/mkinstalldirs $(distdir)
slouken@1362
   194
	tar cf - $(DIST) | (cd $(distdir); tar xf -)
slouken@1603
   195
	cp $(distdir)/include/SDL_config.h.default $(distdir)/include/SDL_config.h
slouken@2982
   196
	$(SHELL) $(distdir)/build-scripts/updaterev.sh
slouken@1651
   197
	rm -rf `find $(distdir) -name .svn`
slouken@1846
   198
	find $(distdir) \( \
slouken@1845
   199
	    -name '*~' -o \
slouken@1845
   200
	    -name '*.bak' -o \
slouken@1845
   201
	    -name '*.old' -o \
slouken@1845
   202
	    -name '*.rej' -o \
slouken@1845
   203
	    -name '*.orig' -o \
slouken@1845
   204
	    -name '.#*' \) \
slouken@1845
   205
	    -exec rm -f {} \;
slouken@1848
   206
	if test -f $(distdir)/test/Makefile; then (cd $(distdir)/test && make distclean); fi
slouken@1362
   207
	tar cvf - $(distdir) | gzip --best >$(distfile)
slouken@1362
   208
	rm -rf $(distdir)
slouken@1362
   209
slouken@1362
   210
rpm: $(distfile)
slouken@1362
   211
	rpmbuild -ta $?
slouken@1424
   212
slouken@1895
   213
# Run indent on the source to standardize coding style
slouken@1895
   214
indent:
slouken@1895
   215
	@echo "Running indent... modified files:"
slouken@1895
   216
	@cd $(srcdir) && \
slouken@1895
   217
	find . \( \
slouken@1895
   218
	    -name '*.h' -o \
slouken@1895
   219
	    -name '*.c' -o \
slouken@1895
   220
	    -name '*.cc' \) \
slouken@2220
   221
	    -print | fgrep -v ./Xcode | \
slouken@1895
   222
	while read file; do \
slouken@1895
   223
	    indent "$$file" -o "$$file.indent"; \
slouken@1895
   224
	    if cmp "$$file" "$$file.indent" >/dev/null; then \
slouken@1895
   225
	        rm -f "$$file.indent"; \
slouken@1895
   226
	    else \
slouken@1895
   227
	        echo "$$file"; \
slouken@1895
   228
	        mv -f "$$file.indent" "$$file"; \
slouken@1895
   229
	    fi; \
slouken@1895
   230
	done
slouken@1895
   231
slouken@1895
   232
# Run indent and then commit modified files
slouken@1895
   233
commit: indent
slouken@1895
   234
	svn commit
slouken@1895
   235
slouken@1651
   236
# Create a SVN snapshot that people can run update on
slouken@1424
   237
snapshot:
slouken@3027
   238
	$(SHELL) $(auxdir)/snapshot.sh