changeset 407:3c0cb7e84e0d trunk

[svn] - update to Objective-Make II
author nenolod
date Fri, 05 Jan 2007 19:31:47 -0800
parents c625465183e9
children 290588854a9d
files .depend ChangeLog mk/objective.mk
diffstat 2 files changed, 40 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Fri Jan 05 04:54:33 2007 -0800
+++ b/ChangeLog	Fri Jan 05 19:31:47 2007 -0800
@@ -1,3 +1,10 @@
+2007-01-05 12:54:33 +0000  Giacomo Lozito <james@develia.org>
+  revision [890]
+  - removed gdk_threads_enter/leave from song_change.c, it's not needed here and brings troubles too
+  trunk/src/song_change/song_change.c |    4 ----
+  1 file changed, 4 deletions(-)
+
+
 2007-01-04 22:15:14 +0000  William Pitcock <nenolod@nenolod.net>
   revision [886]
   - new default preset
--- a/mk/objective.mk	Fri Jan 05 04:54:33 2007 -0800
+++ b/mk/objective.mk	Fri Jan 05 19:31:47 2007 -0800
@@ -85,7 +85,7 @@
 		done; \
 	fi
 	$(MAKE) clean-posthook
-	rm -f *.o *.lo *.so *.a *.sl
+	rm -f *.o *.lo *.so *.a *.sl .depend-done
 	@if [ "x$(OBJECTIVE_BINS)" != "x" ]; then \
 		for i in $(OBJECTIVE_BINS); do \
 			rm -f $$i; \
@@ -129,7 +129,7 @@
 		rm -f mk/rules.mk; \
 	fi
 
-build:
+build: depend
 	$(MAKE) build-prehook
 	@if [ "x$(OVERLAYS)" != "x" ]; then \
 		for i in `find $(OVERLAYS) -type d -maxdepth 1 -mindepth 1`; do \
@@ -211,11 +211,11 @@
 	if [ "x$(OBJECTS)" != "x" ]; then \
 		$(MAKE) $(OBJECTS) || exit;		\
 		printf "%10s     %-20s\n" LINK $@; \
-		(if [ "x$(SHARED_SUFFIX)" = "xso" ]; then \
+		(if [ "x$(SHARED_SUFFIX)" = "x.so" ]; then \
 			(if [ "x$(OBJECTIVE_SONAME_SUFFIX)" != "x" ]; then \
-				$(CC) $(PICLDFLAGS) -o $@ -Wl,-soname=$@.$(OBJECTIVE_SONAME_SUFFIX) $(OBJECTS) $(LDFLAGS) $(LIBADD); \
+				$(CC) $(PICLDFLAGS) -o $@ -Wl,-h$@.$(OBJECTIVE_SONAME_SUFFIX) $(OBJECTS) $(LDFLAGS) $(LIBADD); \
 			else \
-				$(CC) $(PICLDFLAGS) -o $@ -Wl,-soname=$@ $(OBJECTS) $(LDFLAGS) $(LIBADD); \
+				$(CC) $(PICLDFLAGS) -o $@ -Wl,-h$@ $(OBJECTS) $(LDFLAGS) $(LIBADD); \
 			fi;) \
 		 else \
 			$(CC) $(PICLDFLAGS) -o $@ $(OBJECTS) $(LDFLAGS) $(LIBADD); \
@@ -243,9 +243,6 @@
 install-prehook:
 install-posthook:
 
-# compatibility with automake follows
-am--refresh:
-
 mk/rules.mk:
 	@if [ -f "configure" ]; then \
 		echo "[building rules.mk for posix target, run configure manually if you do not want this]"; \
@@ -253,3 +250,31 @@
 		echo "[complete]"; \
 	fi
 
+.PHONY: .depend depend clean distclean
+.depend:
+
+# default depend rule. if something else is needed -- override depend target
+depend:
+	@if [ "x$(SUBDIRS)" != "x" ]; then \
+		for i in $(SUBDIRS); do \
+			if [ $(VERBOSITY) -gt 0 ]; then \
+				echo "[building depend file for subobjective: $$i]"; \
+			fi; \
+			cd $$i; touch .depend; $(MAKE) || exit; cd ..; \
+			if [ $(VERBOSITY) -gt 0 ]; then \
+				echo "[finished subobjective: $$i]"; \
+			fi; \
+		done; \
+	fi
+	if [ ! -f .depend-done ]; then \
+		for i in ${SOURCES}; do \
+			echo "[generating dependencies for objective: $$i]"; \
+			${CC} -MM ${PICFLAGS} ${CPPFLAGS} ${CFLAGS} $$i >> .depend; \
+		done; \
+		touch .depend-done; \
+	fi;
+
+# compatibility with automake follows
+am--refresh:
+
+include .depend