Makefile.in
changeset 5345 0202f62906ca
parent 5341 fcde22671032
child 5346 437e54382293
equal deleted inserted replaced
5344:94189aa89b54 5345:0202f62906ca
   106 Makefile.in:;
   106 Makefile.in:;
   107 
   107 
   108 $(objects):
   108 $(objects):
   109 	$(SHELL) $(auxdir)/mkinstalldirs $@
   109 	$(SHELL) $(auxdir)/mkinstalldirs $@
   110 
   110 
   111 # To make sure parallel builds will not fail
       
   112 include/SDL_revision.h: update-revision
       
   113 
       
   114 update-revision:
   111 update-revision:
   115 	$(SHELL) $(auxdir)/updaterev.sh
   112 	$(SHELL) $(auxdir)/updaterev.sh
   116 
   113 
   117 .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)
   114 .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)
   118 
   115 
   119 $(objects)/$(TARGET): update-revision $(OBJECTS) $(VERSION_OBJECTS)
   116 $(objects)/$(TARGET): $(OBJECTS) $(VERSION_OBJECTS)
   120 	$(LIBTOOL) --mode=link $(CC) -o $@ $(OBJECTS) $(VERSION_OBJECTS) $(LDFLAGS) $(EXTRA_LDFLAGS) $(LT_LDFLAGS)
   117 	$(LIBTOOL) --mode=link $(CC) -o $@ $(OBJECTS) $(VERSION_OBJECTS) $(LDFLAGS) $(EXTRA_LDFLAGS) $(LT_LDFLAGS)
   121 
   118 
   122 $(objects)/$(SDLMAIN_TARGET): $(SDLMAIN_OBJECTS)
   119 $(objects)/$(SDLMAIN_TARGET): $(SDLMAIN_OBJECTS)
   123 	$(AR) cru $@ $(SDLMAIN_OBJECTS)
   120 	$(AR) cru $@ $(SDLMAIN_OBJECTS)
   124 	$(RANLIB) $@
   121 	$(RANLIB) $@
   125 
   122 
   126 install: all install-bin install-hdrs install-lib install-data
   123 install: all install-bin install-hdrs install-lib install-data
   127 install-bin:
   124 install-bin:
   128 	$(SHELL) $(auxdir)/mkinstalldirs $(DESTDIR)$(bindir)
   125 	$(SHELL) $(auxdir)/mkinstalldirs $(DESTDIR)$(bindir)
   129 	$(INSTALL) -m 755 sdl-config $(DESTDIR)$(bindir)/sdl-config
   126 	$(INSTALL) -m 755 sdl-config $(DESTDIR)$(bindir)/sdl-config
   130 install-hdrs: include/SDL_revision.h
   127 install-hdrs: update-revision
   131 	$(SHELL) $(auxdir)/mkinstalldirs $(DESTDIR)$(includedir)/SDL
   128 	$(SHELL) $(auxdir)/mkinstalldirs $(DESTDIR)$(includedir)/SDL
   132 	for file in $(HDRS); do \
   129 	for file in $(HDRS); do \
   133 	    $(INSTALL) -m 644 $(srcdir)/include/$$file $(DESTDIR)$(includedir)/SDL/$$file; \
   130 	    $(INSTALL) -m 644 $(srcdir)/include/$$file $(DESTDIR)$(includedir)/SDL/$$file; \
   134 	done
   131 	done
   135 	$(INSTALL) -m 644 include/SDL_config.h $(DESTDIR)$(includedir)/SDL/SDL_config.h
   132 	$(INSTALL) -m 644 include/SDL_config.h $(DESTDIR)$(includedir)/SDL/SDL_config.h
   136 	$(INSTALL) -m 644 include/SDL_revision.h $(DESTDIR)$(includedir)/SDL/SDL_revision.h
   133 	if test -f include/SDL_revision.h; then \
       
   134 	    $(INSTALL) -m 644 include/SDL_revision.h $(DESTDIR)$(includedir)/SDL/SDL_revision.h; \
       
   135 	else \
       
   136 	    $(INSTALL) -m 644 $(srcdir)/include/SDL_revision.h $(DESTDIR)$(includedir)/SDL/SDL_revision.h; \
       
   137 	fi
       
   138 
   137 install-lib: $(objects) $(objects)/$(TARGET) $(objects)/$(SDLMAIN_TARGET)
   139 install-lib: $(objects) $(objects)/$(TARGET) $(objects)/$(SDLMAIN_TARGET)
   138 	$(SHELL) $(auxdir)/mkinstalldirs $(DESTDIR)$(libdir)
   140 	$(SHELL) $(auxdir)/mkinstalldirs $(DESTDIR)$(libdir)
   139 	$(LIBTOOL) --mode=install $(INSTALL) $(objects)/$(TARGET) $(DESTDIR)$(libdir)/$(TARGET)
   141 	$(LIBTOOL) --mode=install $(INSTALL) $(objects)/$(TARGET) $(DESTDIR)$(libdir)/$(TARGET)
   140 	$(INSTALL) -m 644 $(objects)/$(SDLMAIN_TARGET) $(DESTDIR)$(libdir)/$(SDLMAIN_TARGET)
   142 	$(INSTALL) -m 644 $(objects)/$(SDLMAIN_TARGET) $(DESTDIR)$(libdir)/$(SDLMAIN_TARGET)
   141 	$(RANLIB) $(DESTDIR)$(libdir)/$(SDLMAIN_TARGET)
   143 	$(RANLIB) $(DESTDIR)$(libdir)/$(SDLMAIN_TARGET)
   165 clean:
   167 clean:
   166 	rm -rf $(objects)
   168 	rm -rf $(objects)
   167 	if test -f test/Makefile; then (cd test; $(MAKE) $@); fi
   169 	if test -f test/Makefile; then (cd test; $(MAKE) $@); fi
   168 
   170 
   169 distclean: clean
   171 distclean: clean
   170 	rm -f Makefile sdl-config
   172 	rm -f Makefile Makefile.rules sdl-config
   171 	rm -f SDL.qpg
   173 	rm -f SDL.qpg
   172 	rm -f config.status config.cache config.log libtool
   174 	rm -f config.status config.cache config.log libtool
   173 	rm -rf $(srcdir)/autom4te*
   175 	rm -rf $(srcdir)/autom4te*
   174 	find $(srcdir) \( \
   176 	find $(srcdir) \( \
   175 	    -name '*~' -o \
   177 	    -name '*~' -o \