]> rtime.felk.cvut.cz Git - pes-rpp/rpp-lib.git/commitdiff
Add proper dependency to rpp-lib into rpp-test-suite Makefiles
authorMichal Sojka <sojkam1@fel.cvut.cz>
Tue, 29 Jul 2014 08:31:15 +0000 (10:31 +0200)
committerMichal Sojka <sojkam1@fel.cvut.cz>
Tue, 29 Jul 2014 08:31:15 +0000 (10:31 +0200)
Now, the test is re-linked if the library changes

apps/rpp-test-suite/Debug/GNUmakefile
apps/rpp-test-suite/POSIX/GNUmakefile

index a823bc7553f78e97131816540472290311d9e453..bbe292385036d203199ac76a74e5b423b82b8874 100644 (file)
@@ -25,8 +25,6 @@ LDFLAGS = $(rpp-test-suite_CFLAGS) -z -m"${@:%.obj=%.map}" --be32       \
            --reread_libs --warn_sections    \
           --display_error_number --rom_model                            \
                  --search_path=$(ARM_COMPILER_DIR)/lib                                                 \
-          --search_path=../../../Debug                                                                 \
-          --library=rpp-lib.lib                                                                                        \
           --library="rtsv7R4_T_be_v3D16_eabi.lib"                       \
           --generate_dead_funcs_list=$(@:%.out=%.deadfuncs.xml)
 
@@ -35,8 +33,11 @@ rpp-test-suite_DEPS = $(rpp-test-suite_OBJS:%.obj=%.dep)
 
 all:: rpp-test-suite.out
 
-rpp-test-suite.out: $(rpp-test-suite_OBJS) ../../../rpp/TMS570LS313xFlashLnk.cmd
-       $(MAKE) -C ../../../Debug       # Compile the library
+.PHONY: FORCE
+../../../Debug/rpp-lib.lib: FORCE
+       $(MAKE) -C ../../../Debug
+
+rpp-test-suite.out: $(rpp-test-suite_OBJS) ../../../Debug/rpp-lib.lib ../../../rpp/TMS570LS313xFlashLnk.cmd
        $(LD) $(LDFLAGS) -o $@ $^
 
 -include $(rpp-test-suite_OBJS:%.obj=%.dep)
index 225d78353af3ac09384de113391297fb3ab39d04..fb1b82a755c0ca22a118a48b08352e28c14b37fe 100644 (file)
@@ -13,8 +13,11 @@ LDFLAGS = -lpthread -lm
 
 all:: rpp-test-suite
 
-rpp-test-suite: $(rpp-test-suite_OBJS) ../../../POSIX/rpp-lib.a
+.PHONY: FORCE
+../../../POSIX/rpp-lib.a: FORCE
        $(MAKE) -C ../../../POSIX       # Compile the library
+
+rpp-test-suite: $(rpp-test-suite_OBJS) ../../../POSIX/rpp-lib.a
        $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^
 
 -include $(rpp-test-suite_DEPS)