Makefile.in
changeset 1397 b189a73aa335
parent 1394 e57f8d1344b6
child 1401 1819fd069e89
--- a/Makefile.in	Mon Feb 20 20:53:52 2006 +0000
+++ b/Makefile.in	Mon Feb 20 22:15:38 2006 +0000
@@ -30,6 +30,10 @@
 SOURCES = @SOURCES@
 OBJECTS = @OBJECTS@
 
+SDLMAIN_TARGET = libSDLmain.a
+SDLMAIN_SOURCES = @SDLMAIN_SOURCES@
+SDLMAIN_OBJECTS = @SDLMAIN_OBJECTS@
+
 DIST = acinclude.m4 autogen.sh Borland.html Borland.zip BUGS build-scripts configure configure.in COPYING CREDITS CWprojects.sea.bin docs docs.html EpocBuildFiles.zip include INSTALL Makefile.dc Makefile.in MPWmake.sea.bin PBProjects.tar.gz README* sdl-config.in sdl.m4 SDL.qpg.in SDL.spec SDL.spec.in setvars.cmd src test TODO VisualCE.zip VisualC.html VisualC.zip Watcom.mif WhatsNew Xcode21.tar.gz Xcode.tar.gz XcodeUniversal.tar.gz
 
 LT_AGE      = @LT_AGE@
@@ -38,7 +42,7 @@
 LT_REVISION = @LT_REVISION@
 LT_LDFLAGS  = -no-undefined -rpath $(libdir) -release $(LT_RELEASE) -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE)
 
-all: Makefile $(objects) $(objects)/$(TARGET)
+all: Makefile $(objects) $(objects)/$(TARGET) $(objects)/$(TARGET_SDLMAIN)
 
 Makefile: $(srcdir)/Makefile.in
 	$(SHELL) config.status $@
@@ -50,12 +54,21 @@
 depend:
 	SOURCES="$(SOURCES)" INCLUDE="$(INCLUDE)" objects="$(objects)" output="$(depend)" \
 	$(SHELL) $(auxdir)/makedep.sh
+	for src in $(SDLMAIN_SOURCES); do \
+	    obj=`echo $$src | sed -e 's|.*/||' -e 's|\.[^\.]*$$|.o|'`; \
+	    echo "$(objects)/$$obj: $$src" >>$(depend); \
+	    echo "	\$$(CC) \$$(CFLAGS) -c $$src -o \$$@" >>$(depend); \
+	done
 
 include $(depend)
 
 $(objects)/$(TARGET): $(OBJECTS)
 	$(LIBTOOL) --mode=link $(CC) -o $@ $(OBJECTS) $(LDFLAGS) $(LIBS) $(LT_LDFLAGS)
 
+$(objects)/$(SDLMAIN_TARGET): $(SDLMAIN_OBJECTS)
+	@AR@ cru $@ $(SDLMAIN_OBJECTS)
+	@RANLIB@ $@
+
 install: install-bin install-hdrs install-lib install-data install-man
 install-bin:
 	$(SHELL) $(auxdir)/mkinstalldirs $(bindir)
@@ -70,6 +83,7 @@
 install-lib:
 	$(SHELL) $(auxdir)/mkinstalldirs $(libdir)
 	$(LIBTOOL) --mode=install $(INSTALL) $(objects)/$(TARGET) $(libdir)/$(TARGET)
+	$(INSTALL) -m 644 $(objects)/$(SDLMAIN_TARGET) $(libdir)/$(SDLMAIN_TARGET)
 install-data:
 	$(SHELL) $(auxdir)/mkinstalldirs $(datadir)/aclocal
 	$(INSTALL) -m 644 $(srcdir)/sdl.m4 $(datadir)/aclocal/sdl.m4
@@ -91,6 +105,7 @@
 	rm -f $(includedir)/SDL/SDL_config.h
 uninstall-lib:
 	$(LIBTOOL) --mode=uninstall rm -f $(libdir)/$(TARGET)
+	rm -f $(libdir)/$(SDLMAIN_TARGET)
 uninstall-data:
 	rm -f $(datadir)/aclocal/sdl.m4
 uninstall-man:
@@ -121,6 +136,7 @@
 	rm -rf `find $(distdir) -name CVS`
 	rm -f `find $(distdir) -name '.cvsignore'`
 	rm -f `find $(distdir) -name '.#*'`
+	rmdir `find $(distdir) -type d -empty`
 	tar cvf - $(distdir) | gzip --best >$(distfile)
 	rm -rf $(distdir)