Makefile.in
author Sam Lantinga <slouken@libsdl.org>
Thu, 05 Jun 2014 09:27:06 -0700
changeset 8829 6ed74a27066a
parent 8827 d4ffa5194a49
child 8876 60edb019f0fe
permissions -rw-r--r--
Added missing headers that should be installed.
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@6250
    15
distdir = SDL2-@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@1419
    28
AR	= @AR@
slouken@1419
    29
RANLIB	= @RANLIB@
slouken@2204
    30
WINDRES	= @WINDRES@
slouken@1362
    31
slouken@6250
    32
TARGET  = libSDL2.la
slouken@1362
    33
OBJECTS = @OBJECTS@
slouken@3334
    34
VERSION_OBJECTS = @VERSION_OBJECTS@
slouken@1362
    35
slouken@6250
    36
SDLMAIN_TARGET = libSDL2main.a
slouken@1397
    37
SDLMAIN_OBJECTS = @SDLMAIN_OBJECTS@
slouken@1397
    38
slouken@6688
    39
SDLTEST_TARGET = libSDL2_test.a
slouken@6688
    40
SDLTEST_OBJECTS = @SDLTEST_OBJECTS@
slouken@6688
    41
slouken@7228
    42
SRC_DIST = *.txt acinclude Android.mk autogen.sh android-project build-scripts cmake configure configure.in debian include Makefile.* sdl2-config.in sdl2.m4 sdl2.pc.in SDL2.spec.in src test VisualC.html VisualC Xcode Xcode-iOS
slouken@6250
    43
GEN_DIST = SDL2.spec
slouken@1362
    44
slouken@4929
    45
HDRS = \
slouken@4929
    46
	SDL.h \
slouken@4929
    47
	SDL_assert.h \
slouken@4929
    48
	SDL_atomic.h \
slouken@4929
    49
	SDL_audio.h \
slouken@8829
    50
	SDL_bits.h \
slouken@4929
    51
	SDL_blendmode.h \
slouken@4929
    52
	SDL_clipboard.h \
slouken@4929
    53
	SDL_cpuinfo.h \
slouken@8829
    54
	SDL_egl.h \
slouken@4929
    55
	SDL_endian.h \
slouken@4929
    56
	SDL_error.h \
slouken@4929
    57
	SDL_events.h \
icculus@7667
    58
	SDL_filesystem.h \
slouken@6690
    59
	SDL_gamecontroller.h \
slouken@4929
    60
	SDL_gesture.h \
slouken@4929
    61
	SDL_haptic.h \
slouken@5189
    62
	SDL_hints.h \
slouken@4929
    63
	SDL_joystick.h \
slouken@4929
    64
	SDL_keyboard.h \
slouken@5340
    65
	SDL_keycode.h \
slouken@4929
    66
	SDL_loadso.h \
slouken@5221
    67
	SDL_log.h \
slouken@4929
    68
	SDL_main.h \
slouken@6607
    69
	SDL_messagebox.h \
slouken@4929
    70
	SDL_mouse.h \
slouken@4929
    71
	SDL_mutex.h \
slouken@4929
    72
	SDL_name.h \
slouken@4929
    73
	SDL_opengl.h \
icculus@8827
    74
	SDL_opengl_glext.h \
slouken@4929
    75
	SDL_opengles.h \
slouken@8829
    76
	SDL_opengles2_gl2ext.h \
slouken@8829
    77
	SDL_opengles2_gl2.h \
slouken@8829
    78
	SDL_opengles2_gl2platform.h \
slouken@6205
    79
	SDL_opengles2.h \
slouken@8829
    80
	SDL_opengles2_khrplatform.h \
slouken@4929
    81
	SDL_pixels.h \
slouken@4929
    82
	SDL_platform.h \
slouken@4929
    83
	SDL_power.h \
slouken@4929
    84
	SDL_quit.h \
slouken@4929
    85
	SDL_rect.h \
slouken@5145
    86
	SDL_render.h \
slouken@4929
    87
	SDL_rwops.h \
slouken@4929
    88
	SDL_scancode.h \
slouken@4929
    89
	SDL_shape.h \
slouken@4929
    90
	SDL_stdinc.h \
slouken@4929
    91
	SDL_surface.h \
slouken@6345
    92
	SDL_system.h \
slouken@4929
    93
	SDL_syswm.h \
slouken@4929
    94
	SDL_thread.h \
slouken@4929
    95
	SDL_timer.h \
slouken@4929
    96
	SDL_touch.h \
icculus@7387
    97
	SDL_types.h \
slouken@4929
    98
	SDL_version.h \
slouken@4929
    99
	SDL_video.h \
slouken@4929
   100
	begin_code.h \
slouken@4929
   101
	close_code.h
slouken@2122
   102
slouken@6689
   103
SDLTEST_HDRS = $(shell ls $(srcdir)/include | fgrep SDL_test)
slouken@6688
   104
slouken@1362
   105
LT_AGE      = @LT_AGE@
slouken@1362
   106
LT_CURRENT  = @LT_CURRENT@
slouken@1362
   107
LT_RELEASE  = @LT_RELEASE@
slouken@1362
   108
LT_REVISION = @LT_REVISION@
slouken@2156
   109
LT_LDFLAGS  = -no-undefined -rpath $(DESTDIR)$(libdir) -release $(LT_RELEASE) -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE)
slouken@1362
   110
slouken@6688
   111
all: $(srcdir)/configure Makefile $(objects) $(objects)/$(TARGET) $(objects)/$(SDLMAIN_TARGET) $(objects)/$(SDLTEST_TARGET)
slouken@1622
   112
slouken@1622
   113
$(srcdir)/configure: $(srcdir)/configure.in
slouken@1622
   114
	@echo "Warning, configure.in is out of date"
slouken@1622
   115
	#(cd $(srcdir) && sh autogen.sh && sh configure)
slouken@1623
   116
	@sleep 3
slouken@1362
   117
slouken@1362
   118
Makefile: $(srcdir)/Makefile.in
slouken@1362
   119
	$(SHELL) config.status $@
slouken@1362
   120
slouken@3416
   121
Makefile.in:;
slouken@3416
   122
slouken@1362
   123
$(objects):
slouken@1391
   124
	$(SHELL) $(auxdir)/mkinstalldirs $@
slouken@1362
   125
slouken@2982
   126
update-revision:
slouken@2982
   127
	$(SHELL) $(auxdir)/updaterev.sh
slouken@2982
   128
slouken@5346
   129
.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
   130
slouken@5345
   131
$(objects)/$(TARGET): $(OBJECTS) $(VERSION_OBJECTS)
sstewartgallus00@8743
   132
	$(LIBTOOL) --tag=CC --mode=link $(CC) -o $@ $(OBJECTS) $(VERSION_OBJECTS) $(LDFLAGS) $(EXTRA_LDFLAGS) $(LT_LDFLAGS)
slouken@1362
   133
slouken@1397
   134
$(objects)/$(SDLMAIN_TARGET): $(SDLMAIN_OBJECTS)
slouken@1419
   135
	$(AR) cru $@ $(SDLMAIN_OBJECTS)
slouken@1419
   136
	$(RANLIB) $@
slouken@1397
   137
slouken@6688
   138
$(objects)/$(SDLTEST_TARGET): $(SDLTEST_OBJECTS)
slouken@6688
   139
	$(AR) cru $@ $(SDLTEST_OBJECTS)
slouken@6688
   140
	$(RANLIB) $@
slouken@6688
   141
slouken@3352
   142
install: all install-bin install-hdrs install-lib install-data
slouken@1362
   143
install-bin:
slouken@2156
   144
	$(SHELL) $(auxdir)/mkinstalldirs $(DESTDIR)$(bindir)
slouken@6250
   145
	$(INSTALL) -m 755 sdl2-config $(DESTDIR)$(bindir)/sdl2-config
slouken@5345
   146
install-hdrs: update-revision
slouken@6250
   147
	$(SHELL) $(auxdir)/mkinstalldirs $(DESTDIR)$(includedir)/SDL2
slouken@6688
   148
	for file in $(HDRS) $(SDLTEST_HDRS); do \
slouken@6250
   149
	    $(INSTALL) -m 644 $(srcdir)/include/$$file $(DESTDIR)$(includedir)/SDL2/$$file; \
slouken@1362
   150
	done
slouken@6250
   151
	$(INSTALL) -m 644 include/SDL_config.h $(DESTDIR)$(includedir)/SDL2/SDL_config.h
slouken@5345
   152
	if test -f include/SDL_revision.h; then \
slouken@6250
   153
	    $(INSTALL) -m 644 include/SDL_revision.h $(DESTDIR)$(includedir)/SDL2/SDL_revision.h; \
slouken@5345
   154
	else \
slouken@6250
   155
	    $(INSTALL) -m 644 $(srcdir)/include/SDL_revision.h $(DESTDIR)$(includedir)/SDL2/SDL_revision.h; \
slouken@5345
   156
	fi
slouken@5345
   157
slouken@6688
   158
install-lib: $(objects) $(objects)/$(TARGET) $(objects)/$(SDLMAIN_TARGET) $(objects)/$(SDLTEST_TARGET)
slouken@2156
   159
	$(SHELL) $(auxdir)/mkinstalldirs $(DESTDIR)$(libdir)
slouken@2156
   160
	$(LIBTOOL) --mode=install $(INSTALL) $(objects)/$(TARGET) $(DESTDIR)$(libdir)/$(TARGET)
slouken@2156
   161
	$(INSTALL) -m 644 $(objects)/$(SDLMAIN_TARGET) $(DESTDIR)$(libdir)/$(SDLMAIN_TARGET)
slouken@2156
   162
	$(RANLIB) $(DESTDIR)$(libdir)/$(SDLMAIN_TARGET)
slouken@6688
   163
	$(INSTALL) -m 644 $(objects)/$(SDLTEST_TARGET) $(DESTDIR)$(libdir)/$(SDLTEST_TARGET)
slouken@6688
   164
	$(RANLIB) $(DESTDIR)$(libdir)/$(SDLTEST_TARGET)
slouken@1362
   165
install-data:
slouken@2156
   166
	$(SHELL) $(auxdir)/mkinstalldirs $(DESTDIR)$(datadir)/aclocal
slouken@6250
   167
	$(INSTALL) -m 644 $(srcdir)/sdl2.m4 $(DESTDIR)$(datadir)/aclocal/sdl2.m4
slouken@2156
   168
	$(SHELL) $(auxdir)/mkinstalldirs $(DESTDIR)$(libdir)/pkgconfig
slouken@6250
   169
	$(INSTALL) -m 644 sdl2.pc $(DESTDIR)$(libdir)/pkgconfig
slouken@1362
   170
slouken@3352
   171
uninstall: uninstall-bin uninstall-hdrs uninstall-lib uninstall-data
slouken@1362
   172
uninstall-bin:
slouken@6250
   173
	rm -f $(DESTDIR)$(bindir)/sdl2-config
slouken@1362
   174
uninstall-hdrs:
slouken@6688
   175
	for file in $(HDRS) $(SDLTEST_HDRS); do \
slouken@6250
   176
	    rm -f $(DESTDIR)$(includedir)/SDL2/$$file; \
slouken@1362
   177
	done
slouken@6250
   178
	rm -f $(DESTDIR)$(includedir)/SDL2/SDL_config.h
slouken@6250
   179
	rm -f $(DESTDIR)$(includedir)/SDL2/SDL_revision.h
slouken@6250
   180
	-rmdir $(DESTDIR)$(includedir)/SDL2
slouken@1362
   181
uninstall-lib:
slouken@2156
   182
	$(LIBTOOL) --mode=uninstall rm -f $(DESTDIR)$(libdir)/$(TARGET)
slouken@2156
   183
	rm -f $(DESTDIR)$(libdir)/$(SDLMAIN_TARGET)
slouken@6688
   184
	rm -f $(DESTDIR)$(libdir)/$(SDLTEST_TARGET)
slouken@1362
   185
uninstall-data:
slouken@6250
   186
	rm -f $(DESTDIR)$(datadir)/aclocal/sdl2.m4
slouken@6250
   187
	rm -f $(DESTDIR)$(libdir)/pkgconfig/sdl2.pc
slouken@1362
   188
slouken@1362
   189
clean:
slouken@1362
   190
	rm -rf $(objects)
slouken@1380
   191
	if test -f test/Makefile; then (cd test; $(MAKE) $@); fi
slouken@1362
   192
slouken@1362
   193
distclean: clean
slouken@6250
   194
	rm -f Makefile Makefile.rules sdl2-config
slouken@3334
   195
	rm -f config.status config.cache config.log libtool
slouken@1362
   196
	rm -rf $(srcdir)/autom4te*
slouken@1603
   197
	find $(srcdir) \( \
slouken@1603
   198
	    -name '*~' -o \
slouken@1603
   199
	    -name '*.bak' -o \
slouken@1603
   200
	    -name '*.old' -o \
slouken@1603
   201
	    -name '*.rej' -o \
slouken@1603
   202
	    -name '*.orig' -o \
slouken@1603
   203
	    -name '.#*' \) \
slouken@1362
   204
	    -exec rm -f {} \;
slouken@1380
   205
	if test -f test/Makefile; then (cd test; $(MAKE) $@); fi
slouken@1362
   206
slouken@1362
   207
dist $(distfile):
slouken@1391
   208
	$(SHELL) $(auxdir)/mkinstalldirs $(distdir)
slouken@5498
   209
	(cd $(srcdir); tar cf - $(SRC_DIST)) | (cd $(distdir); tar xf -)
slouken@5498
   210
	tar cf - $(GEN_DIST) | (cd $(distdir); tar xf -)
slouken@1846
   211
	find $(distdir) \( \
slouken@1845
   212
	    -name '*~' -o \
slouken@1845
   213
	    -name '*.bak' -o \
slouken@1845
   214
	    -name '*.old' -o \
slouken@1845
   215
	    -name '*.rej' -o \
slouken@1845
   216
	    -name '*.orig' -o \
slouken@1845
   217
	    -name '.#*' \) \
slouken@1845
   218
	    -exec rm -f {} \;
slouken@1848
   219
	if test -f $(distdir)/test/Makefile; then (cd $(distdir)/test && make distclean); fi
slouken@6886
   220
	(cd $(distdir); build-scripts/updaterev.sh)
slouken@1362
   221
	tar cvf - $(distdir) | gzip --best >$(distfile)
slouken@1362
   222
	rm -rf $(distdir)
slouken@1362
   223
slouken@1362
   224
rpm: $(distfile)
slouken@1362
   225
	rpmbuild -ta $?