summaryrefslogtreecommitdiff
path: root/Makefile.in
diff options
context:
space:
mode:
authorSam Lantinga <slouken@libsdl.org>2011-02-18 11:19:34 -0800
committerSam Lantinga <slouken@libsdl.org>2011-02-18 11:19:34 -0800
commite81d8928b6947ab0199100e0f58bab6c0ab8e3b8 (patch)
treebac3b038b435db365e666d94e09ad4c17c9c67b9 /Makefile.in
parent3afe890b1f4013ffd96318089606dff273ac2e2a (diff)
Added a better way to include build rules in the Makefile
Cleaned up dependencies on generating SDL_revision.h Fixed 'make install' if you are not building from a Mercurial repository
Diffstat (limited to 'Makefile.in')
-rw-r--r--Makefile.in18
1 files changed, 10 insertions, 8 deletions
diff --git a/Makefile.in b/Makefile.in
index 12b9097e..2c48b98b 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -108,15 +108,12 @@ Makefile.in:;
$(objects):
$(SHELL) $(auxdir)/mkinstalldirs $@
-# To make sure parallel builds will not fail
-include/SDL_revision.h: update-revision
-
update-revision:
$(SHELL) $(auxdir)/updaterev.sh
-.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)
+.PHONY: all install install-bin install-hdrs install-lib install-data uninstall uninstall-bin uninstall-hdrs uninstall-lib uninstall-data clean distclean dist $(OBJECTS:.lo=.d)
-$(objects)/$(TARGET): update-revision $(OBJECTS) $(VERSION_OBJECTS)
+$(objects)/$(TARGET): $(OBJECTS) $(VERSION_OBJECTS)
$(LIBTOOL) --mode=link $(CC) -o $@ $(OBJECTS) $(VERSION_OBJECTS) $(LDFLAGS) $(EXTRA_LDFLAGS) $(LT_LDFLAGS)
$(objects)/$(SDLMAIN_TARGET): $(SDLMAIN_OBJECTS)
@@ -127,13 +124,18 @@ install: all install-bin install-hdrs install-lib install-data
install-bin:
$(SHELL) $(auxdir)/mkinstalldirs $(DESTDIR)$(bindir)
$(INSTALL) -m 755 sdl-config $(DESTDIR)$(bindir)/sdl-config
-install-hdrs: include/SDL_revision.h
+install-hdrs: update-revision
$(SHELL) $(auxdir)/mkinstalldirs $(DESTDIR)$(includedir)/SDL
for file in $(HDRS); do \
$(INSTALL) -m 644 $(srcdir)/include/$$file $(DESTDIR)$(includedir)/SDL/$$file; \
done
$(INSTALL) -m 644 include/SDL_config.h $(DESTDIR)$(includedir)/SDL/SDL_config.h
- $(INSTALL) -m 644 include/SDL_revision.h $(DESTDIR)$(includedir)/SDL/SDL_revision.h
+ if test -f include/SDL_revision.h; then \
+ $(INSTALL) -m 644 include/SDL_revision.h $(DESTDIR)$(includedir)/SDL/SDL_revision.h; \
+ else \
+ $(INSTALL) -m 644 $(srcdir)/include/SDL_revision.h $(DESTDIR)$(includedir)/SDL/SDL_revision.h; \
+ fi
+
install-lib: $(objects) $(objects)/$(TARGET) $(objects)/$(SDLMAIN_TARGET)
$(SHELL) $(auxdir)/mkinstalldirs $(DESTDIR)$(libdir)
$(LIBTOOL) --mode=install $(INSTALL) $(objects)/$(TARGET) $(DESTDIR)$(libdir)/$(TARGET)
@@ -167,7 +169,7 @@ clean:
if test -f test/Makefile; then (cd test; $(MAKE) $@); fi
distclean: clean
- rm -f Makefile sdl-config
+ rm -f Makefile Makefile.rules sdl-config
rm -f SDL.qpg
rm -f config.status config.cache config.log libtool
rm -rf $(srcdir)/autom4te*