fixed Makefile for distribution package (which has no Makefile for graphics)
[rocksndiamonds.git] / src / Makefile
index 0f8c0997fe9dcff77db7005332cc9ce10e8a5f1a..63206959173e9699675b5ebb46f2b8dc522fd4f5 100644 (file)
@@ -117,6 +117,8 @@ OPTIONS = $(DEBUG) -Wall                    # only for debugging purposes
 # OPTIONS = -O3
 
 ifdef BUILD_DIST                       # distribution build
+SYS_LDFLAGS := $(shell echo $(SYS_LDFLAGS) |   \
+                      sed -e "s%-rpath,[^ ]*%-rpath,'\$$ORIGIN/lib'%")
 OPTIONS = -O3 -Wall
 endif
 
@@ -265,7 +267,7 @@ $(ICON):
        $(CC) $(PROFILING) $(CFLAGS) -c $*.c
 
 graphics_dir:
-       @$(MAKE) -C $(GRAPHICS_DIR)
+       @test -f $(GRAPHICS_DIR)/Makefile && $(MAKE) -C $(GRAPHICS_DIR) || true
 
 clean-obj:
        $(MAKE) -C $(LIBGAME_DIR) clean