updated Makefiles to fully build/clean graphics and auto-conf files
authorHolger Schemel <info@artsoft.org>
Mon, 2 Mar 2015 16:04:40 +0000 (17:04 +0100)
committerHolger Schemel <info@artsoft.org>
Mon, 2 Mar 2015 16:04:40 +0000 (17:04 +0100)
Makefile
graphics/gfx_classic/Makefile
src/Makefile

index cbce7ef..03320a5 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -93,6 +93,9 @@ cross-win32:
 clean:
        @$(MAKE_CMD) clean
 
+clean-git:
+       @$(MAKE_CMD) clean-git
+
 
 # -----------------------------------------------------------------------------
 # development, test, distribution build and packaging targets
index 086aea5..54d446a 100644 (file)
@@ -13,7 +13,7 @@
 # configuration
 # -----------------------------------------------------------------------------
 
-RND = ../rocksndiamonds
+RND = ../../rocksndiamonds
 
 RM = rm -f
 
@@ -37,8 +37,6 @@ FILES = RocksBusy.$(EXT)      \
        RocksScreen.$(EXT)      \
        RocksToons.$(EXT)
 
-# FILES_GENERATED = RocksCE.$(EXT)
-
 
 # -----------------------------------------------------------------------------
 # build targets
@@ -57,7 +55,8 @@ RocksCE.ilbm: RocksCE-template.ilbm
        bmptoppm RocksCE.bmp | ppmtoilbm > RocksCE.ilbm
        $(RM) RocksCE.bmp
 
-clean-gfx:
+clean:
        @for i in $(FILES); do                  \
+               echo "$(RM) $$i";               \
                $(RM) $$i;                      \
        done
index de82a89..2a1afc9 100644 (file)
@@ -224,12 +224,14 @@ endif
 ICON = $(ICONBASE).o
 endif
 
+GRAPHICS_DIR = ../graphics
+
 
 # -----------------------------------------------------------------------------
 # build targets
 # -----------------------------------------------------------------------------
 
-all: $(AUTOCONF) libgame_dir game_em_dir game_sp_dir $(PROGNAME)
+all: $(AUTOCONF) libgame_dir game_em_dir game_sp_dir $(PROGNAME) graphics_dir
 
 $(PROGNAME): $(RNDLIBS) $(TIMESTAMP_FILE) $(OBJS) $(ICON)
        $(CC) $(PROFILING) $(OBJS) $(ICON) $(RNDLIBS) $(LDFLAGS) -o $(PROGNAME)
@@ -255,6 +257,12 @@ auto-conf:
                $(CNFS_CMD) $$i > $$i;          \
        done
 
+auto-conf-clean:
+       @for i in $(CNFS); do                   \
+               echo "$(RM) $$i";               \
+               $(RM) $$i;                      \
+       done
+
 conf_gfx.h: conf_gfx.c $(CNFS_CMD)
        @$(MAKE) auto-conf
 
@@ -278,6 +286,9 @@ $(ICON):
 .c.o:
        $(CC) $(PROFILING) $(CFLAGS) -c $*.c
 
+graphics_dir:
+       @$(MAKE) -C $(GRAPHICS_DIR)
+
 clean-obj:
        $(MAKE) -C $(LIBGAME_DIR) clean
        $(MAKE) -C $(GAME_EM_DIR) clean
@@ -298,6 +309,9 @@ clean-bin:
 
 clean: clean-obj clean-ico clean-bin
 
+clean-git: clean auto-conf-clean
+       @$(MAKE) -C $(GRAPHICS_DIR) clean
+
 
 # -----------------------------------------------------------------------------
 # run and test targets