diff --git a/Makefile b/Makefile index 3e615d0e76d932f2d05158f3a552b89e84039252..a8efb9024bba1d482fccb45557035c8b600135d0 100644 --- a/Makefile +++ b/Makefile @@ -40,7 +40,7 @@ CFLAGS := $(CFLAGS_BASE) -I. -Imiosix -Imiosix/arch/common \ -Imiosix/$(ARCH_INC) -Imiosix/$(BOARD_INC) $(INCLUDE_DIRS) AFLAGS := $(AFLAGS_BASE) LFLAGS := $(LFLAGS_BASE) -DFLAGS := -MM +DFLAGS := -MMD -MP LINK_LIBS := $(LIBS) -L./miosix -Wl,--start-group -lmiosix -lstdc++ -lc -lm \ -lgcc -Wl,--end-group @@ -63,7 +63,7 @@ clean-recursive: done clean-topdir: - -rm $(OBJ) main.elf main.hex main.bin main.map *.d + -rm $(OBJ) main.elf main.hex main.bin main.map $(OBJ:.o=.d) main: main.elf $(CP) -O ihex main.elf main.hex @@ -71,19 +71,20 @@ main: main.elf $(SZ) main.elf main.elf: $(OBJ) miosix/libmiosix.a - @ echo "linking" + @ echo "========Linking========" $(CXX) $(LFLAGS) -o main.elf $(OBJ) miosix/$(BOOT_FILE) $(LINK_LIBS) -#pull in dependecy info for existing .o files --include $(OBJ:.o=.d) - %.o: %.s + @echo "========Compiling $<========" $(AS) $(AFLAGS) $< -o $@ %.o : %.c - $(CC) $(CFLAGS) $< -o $@ - $(CC) $(DFLAGS) $(CFLAGS) $*.c > $*.d + @echo "========Compiling $<========" + $(CC) $(DFLAGS) $(CFLAGS) $< -o $@ %.o : %.cpp - $(CXX) $(CXXFLAGS) $< -o $@ - $(CXX) $(DFLAGS) $(CXXFLAGS) $*.cpp > $*.d + @echo "========Compiling $<========" + $(CXX) $(DFLAGS) $(CXXFLAGS) $< -o $@ + +#pull in dependecy info for existing .o files +-include $(OBJ:.o=.d) diff --git a/app_template/Makefile b/app_template/Makefile index 7a0c7f8e375865f8ae1a864faebf35664973270c..b0605b7e6e6324770ed1542f5d6594ef2058b997 100644 --- a/app_template/Makefile +++ b/app_template/Makefile @@ -21,7 +21,7 @@ CXXFLAGS := $(CFLAGS) LFLAGS := -mcpu=cortex-m3 -mthumb -mfix-cortex-m3-ldrd -fpie -msingle-pic-base \ -Wl,--gc-sections,-Map,main.map,-T./miosix.ld,-n,-pie,--spare-dynamic-tags,3 \ -O2 -nostdlib -DFLAGS := -MM +DFLAGS := -MMD -MP LINK_LIBS := -Wl,--start-group -lstdc++ -lc -lm -lgcc -Wl,--end-group @@ -33,18 +33,19 @@ all: $(OBJ) crt0.o @xxd -i main.elf | sed 's/unsigned char/const unsigned char __attribute__((aligned(8)))/' > prog3.h clean: - -rm $(OBJ) crt0.o main.elf main.map main.txt prog3.h *.d - -#pull in dependecy info for existing .o files --include $(OBJ:.o=.d) + -rm $(OBJ) crt0.o main.elf main.map main.txt prog3.h $(OBJ:.o=.d) %.o: %.s + @echo "========Compiling $<========" $(AS) $(AFLAGS) $< -o $@ %.o : %.c - $(CC) $(CFLAGS) $< -o $@ - $(CC) $(DFLAGS) $(CFLAGS) $*.c > $*.d + @echo "========Compiling $<========" + $(CC) $(DFLAGS) $(CFLAGS) $< -o $@ %.o : %.cpp - $(CXX) $(CXXFLAGS) $< -o $@ - $(CXX) $(DFLAGS) $(CXXFLAGS) $*.cpp > $*.d \ No newline at end of file + @echo "========Compiling $<========" + $(CXX) $(DFLAGS) $(CXXFLAGS) $< -o $@ + +#pull in dependecy info for existing .o files +-include $(OBJ:.o=.d) diff --git a/app_template_withlibs/Makefile b/app_template_withlibs/Makefile index 6d6bad5fe21847a0c38f8fd1b757511ae0680bba..96bd2c51fd44a4e17a460a03293e3ca715015d22 100644 --- a/app_template_withlibs/Makefile +++ b/app_template_withlibs/Makefile @@ -22,7 +22,7 @@ CXXFLAGS := $(CFLAGS) LFLAGS := -mcpu=cortex-m3 -mthumb -fpie -msingle-pic-base \ -Wl,--gc-sections,-Map,main.map,-T./miosix.ld,-n,-pie,--spare-dynamic-tags,3 \ -O2 -nostdlib -DFLAGS := -MM +DFLAGS := -MMD -MP # LFLAGS := -mcpu=cortex-m3 -mthumb -fpie -msingle-pic-base \ # -Wl,--gc-sections,-Map,main.map,-T./miosix.ld,-n,-pie,--spare-dynamic-tags,3 \ @@ -37,18 +37,19 @@ all: $(OBJ) crt0.o @xxd -i main.elf | sed 's/unsigned char/const unsigned char __attribute__((aligned(8)))/' > prog3.h clean: - -rm $(OBJ) crt0.o main.elf main.map *.d - -#pull in dependecy info for existing .o files --include $(OBJ:.o=.d) + -rm $(OBJ) crt0.o main.elf main.map $(OBJ:.o=.d) %.o: %.s + @echo "========Compiling $<========" $(AS) $(AFLAGS) $< -o $@ %.o : %.c - $(CC) $(CFLAGS) $< -o $@ - $(CC) $(DFLAGS) $(CFLAGS) $*.c > $*.d + @echo "========Compiling $<========" + $(CC) $(DFLAGS) $(CFLAGS) $< -o $@ %.o : %.cpp - $(CXX) $(CXXFLAGS) $< -o $@ - $(CXX) $(DFLAGS) $(CXXFLAGS) $*.cpp > $*.d + @echo "========Compiling $<========" + $(CXX) $(DFLAGS) $(CXXFLAGS) $< -o $@ + +#pull in dependecy info for existing .o files +-include $(OBJ:.o=.d) diff --git a/miosix/Makefile b/miosix/Makefile index 9a0675eedd2d72536bfa2ddd1d33efc49074bc5e..f2d3f2801398a834e6c6eb9ccd7ea10c6c2cf857 100644 --- a/miosix/Makefile +++ b/miosix/Makefile @@ -44,7 +44,7 @@ OBJ := $(addsuffix .o, $(basename $(SRC))) CXXFLAGS := $(CXXFLAGS_BASE) -I. -Iarch/common -I$(ARCH_INC) -I$(BOARD_INC) CFLAGS := $(CFLAGS_BASE) -I. -Iarch/common -I$(ARCH_INC) -I$(BOARD_INC) AFLAGS := $(AFLAGS_BASE) -DFLAGS := -MM +DFLAGS := -MMD -MP ## Build libmiosix.a and stage_1_boot.o (whose path is in BOOT_FILE) ## The file stage_1_boot.o is compiled separately because @@ -53,18 +53,19 @@ all: $(OBJ) $(BOOT_FILE) $(AR) rcs libmiosix.a $(OBJ) clean: - -rm $(OBJ) $(BOOT_FILE) libmiosix.a *.d - -#pull in dependecy info for existing .o files --include $(OBJ:.o=.cpp.d) + -rm $(OBJ) $(BOOT_FILE) libmiosix.a $(OBJ:.o=.d) %.o: %.s + @echo "========Compiling $<========" $(AS) $(AFLAGS) $< -o $@ %.o : %.c - $(CC) $(CFLAGS) $< -o $@ - $(CC) $(DFLAGS) $(CFLAGS) $*.c > $*.d + @echo "========Compiling $<========" + $(CC) $(DFLAGS) $(CFLAGS) $< -o $@ %.o : %.cpp - $(CXX) $(CXXFLAGS) $< -o $@ - $(CXX) $(DFLAGS) $(CXXFLAGS) $*.cpp > $*.d + @echo "========Compiling $<========" + $(CXX) $(DFLAGS) $(CXXFLAGS) $< -o $@ + +#pull in dependecy info for existing .o files +-include $(OBJ:.o=.d) diff --git a/mpu_testsuite/mpu_apps/test1/Makefile b/mpu_testsuite/mpu_apps/test1/Makefile index 994dae769111406b691bede0d34d103f82607323..ac9e07cadcfeec3d524aef5a7a198cce0b24573f 100644 --- a/mpu_testsuite/mpu_apps/test1/Makefile +++ b/mpu_testsuite/mpu_apps/test1/Makefile @@ -21,7 +21,7 @@ CXXFLAGS := $(CFLAGS) LFLAGS := -mcpu=cortex-m3 -mthumb -mfix-cortex-m3-ldrd -fpie -msingle-pic-base \ -Wl,--gc-sections,-Map,test.map,-T./miosix.ld,-n,-pie,--spare-dynamic-tags,3 \ -O2 -nostdlib -DFLAGS := -MM +DFLAGS := -MMD -MP LINK_LIBS := -Wl,--start-group -lstdc++ -lc -lm -lgcc -Wl,--end-group @@ -33,18 +33,19 @@ all: $(OBJ) crt0.o @xxd -i test.elf | sed 's/unsigned char/const unsigned char __attribute__((aligned(8)))/' > mpuTest.h clean: - -rm $(OBJ) crt0.o test.elf test.map test.txt mpuTest.h *.d - -#pull in dependecy info for existing .o files --include $(OBJ:.o=.d) + -rm $(OBJ) crt0.o test.elf test.map test.txt mpuTest.h $(OBJ:.o=.d) %.o: %.s + @echo "========Compiling $<========" $(AS) $(AFLAGS) $< -o $@ %.o : %.c - $(CC) $(CFLAGS) $< -o $@ - $(CC) $(DFLAGS) $(CFLAGS) $*.c > $*.d + @echo "========Compiling $<========" + $(CC) $(DFLAGS) $(CFLAGS) $< -o $@ %.o : %.cpp - $(CXX) $(CXXFLAGS) $< -o $@ - $(CXX) $(DFLAGS) $(CXXFLAGS) $*.cpp > $*.d + @echo "========Compiling $<========" + $(CXX) $(DFLAGS) $(CXXFLAGS) $< -o $@ + +#pull in dependecy info for existing .o files +-include $(OBJ:.o=.d) diff --git a/mpu_testsuite/mpu_apps/test2/Makefile b/mpu_testsuite/mpu_apps/test2/Makefile index 994dae769111406b691bede0d34d103f82607323..ac9e07cadcfeec3d524aef5a7a198cce0b24573f 100644 --- a/mpu_testsuite/mpu_apps/test2/Makefile +++ b/mpu_testsuite/mpu_apps/test2/Makefile @@ -21,7 +21,7 @@ CXXFLAGS := $(CFLAGS) LFLAGS := -mcpu=cortex-m3 -mthumb -mfix-cortex-m3-ldrd -fpie -msingle-pic-base \ -Wl,--gc-sections,-Map,test.map,-T./miosix.ld,-n,-pie,--spare-dynamic-tags,3 \ -O2 -nostdlib -DFLAGS := -MM +DFLAGS := -MMD -MP LINK_LIBS := -Wl,--start-group -lstdc++ -lc -lm -lgcc -Wl,--end-group @@ -33,18 +33,19 @@ all: $(OBJ) crt0.o @xxd -i test.elf | sed 's/unsigned char/const unsigned char __attribute__((aligned(8)))/' > mpuTest.h clean: - -rm $(OBJ) crt0.o test.elf test.map test.txt mpuTest.h *.d - -#pull in dependecy info for existing .o files --include $(OBJ:.o=.d) + -rm $(OBJ) crt0.o test.elf test.map test.txt mpuTest.h $(OBJ:.o=.d) %.o: %.s + @echo "========Compiling $<========" $(AS) $(AFLAGS) $< -o $@ %.o : %.c - $(CC) $(CFLAGS) $< -o $@ - $(CC) $(DFLAGS) $(CFLAGS) $*.c > $*.d + @echo "========Compiling $<========" + $(CC) $(DFLAGS) $(CFLAGS) $< -o $@ %.o : %.cpp - $(CXX) $(CXXFLAGS) $< -o $@ - $(CXX) $(DFLAGS) $(CXXFLAGS) $*.cpp > $*.d + @echo "========Compiling $<========" + $(CXX) $(DFLAGS) $(CXXFLAGS) $< -o $@ + +#pull in dependecy info for existing .o files +-include $(OBJ:.o=.d) diff --git a/mpu_testsuite/mpu_apps/test3/Makefile b/mpu_testsuite/mpu_apps/test3/Makefile index 994dae769111406b691bede0d34d103f82607323..ac9e07cadcfeec3d524aef5a7a198cce0b24573f 100644 --- a/mpu_testsuite/mpu_apps/test3/Makefile +++ b/mpu_testsuite/mpu_apps/test3/Makefile @@ -21,7 +21,7 @@ CXXFLAGS := $(CFLAGS) LFLAGS := -mcpu=cortex-m3 -mthumb -mfix-cortex-m3-ldrd -fpie -msingle-pic-base \ -Wl,--gc-sections,-Map,test.map,-T./miosix.ld,-n,-pie,--spare-dynamic-tags,3 \ -O2 -nostdlib -DFLAGS := -MM +DFLAGS := -MMD -MP LINK_LIBS := -Wl,--start-group -lstdc++ -lc -lm -lgcc -Wl,--end-group @@ -33,18 +33,19 @@ all: $(OBJ) crt0.o @xxd -i test.elf | sed 's/unsigned char/const unsigned char __attribute__((aligned(8)))/' > mpuTest.h clean: - -rm $(OBJ) crt0.o test.elf test.map test.txt mpuTest.h *.d - -#pull in dependecy info for existing .o files --include $(OBJ:.o=.d) + -rm $(OBJ) crt0.o test.elf test.map test.txt mpuTest.h $(OBJ:.o=.d) %.o: %.s + @echo "========Compiling $<========" $(AS) $(AFLAGS) $< -o $@ %.o : %.c - $(CC) $(CFLAGS) $< -o $@ - $(CC) $(DFLAGS) $(CFLAGS) $*.c > $*.d + @echo "========Compiling $<========" + $(CC) $(DFLAGS) $(CFLAGS) $< -o $@ %.o : %.cpp - $(CXX) $(CXXFLAGS) $< -o $@ - $(CXX) $(DFLAGS) $(CXXFLAGS) $*.cpp > $*.d + @echo "========Compiling $<========" + $(CXX) $(DFLAGS) $(CXXFLAGS) $< -o $@ + +#pull in dependecy info for existing .o files +-include $(OBJ:.o=.d) diff --git a/mpu_testsuite/mpu_apps/test4/Makefile b/mpu_testsuite/mpu_apps/test4/Makefile index 994dae769111406b691bede0d34d103f82607323..ac9e07cadcfeec3d524aef5a7a198cce0b24573f 100644 --- a/mpu_testsuite/mpu_apps/test4/Makefile +++ b/mpu_testsuite/mpu_apps/test4/Makefile @@ -21,7 +21,7 @@ CXXFLAGS := $(CFLAGS) LFLAGS := -mcpu=cortex-m3 -mthumb -mfix-cortex-m3-ldrd -fpie -msingle-pic-base \ -Wl,--gc-sections,-Map,test.map,-T./miosix.ld,-n,-pie,--spare-dynamic-tags,3 \ -O2 -nostdlib -DFLAGS := -MM +DFLAGS := -MMD -MP LINK_LIBS := -Wl,--start-group -lstdc++ -lc -lm -lgcc -Wl,--end-group @@ -33,18 +33,19 @@ all: $(OBJ) crt0.o @xxd -i test.elf | sed 's/unsigned char/const unsigned char __attribute__((aligned(8)))/' > mpuTest.h clean: - -rm $(OBJ) crt0.o test.elf test.map test.txt mpuTest.h *.d - -#pull in dependecy info for existing .o files --include $(OBJ:.o=.d) + -rm $(OBJ) crt0.o test.elf test.map test.txt mpuTest.h $(OBJ:.o=.d) %.o: %.s + @echo "========Compiling $<========" $(AS) $(AFLAGS) $< -o $@ %.o : %.c - $(CC) $(CFLAGS) $< -o $@ - $(CC) $(DFLAGS) $(CFLAGS) $*.c > $*.d + @echo "========Compiling $<========" + $(CC) $(DFLAGS) $(CFLAGS) $< -o $@ %.o : %.cpp - $(CXX) $(CXXFLAGS) $< -o $@ - $(CXX) $(DFLAGS) $(CXXFLAGS) $*.cpp > $*.d + @echo "========Compiling $<========" + $(CXX) $(DFLAGS) $(CXXFLAGS) $< -o $@ + +#pull in dependecy info for existing .o files +-include $(OBJ:.o=.d) diff --git a/mpu_testsuite/mpu_apps/test5/Makefile b/mpu_testsuite/mpu_apps/test5/Makefile index 994dae769111406b691bede0d34d103f82607323..ac9e07cadcfeec3d524aef5a7a198cce0b24573f 100644 --- a/mpu_testsuite/mpu_apps/test5/Makefile +++ b/mpu_testsuite/mpu_apps/test5/Makefile @@ -21,7 +21,7 @@ CXXFLAGS := $(CFLAGS) LFLAGS := -mcpu=cortex-m3 -mthumb -mfix-cortex-m3-ldrd -fpie -msingle-pic-base \ -Wl,--gc-sections,-Map,test.map,-T./miosix.ld,-n,-pie,--spare-dynamic-tags,3 \ -O2 -nostdlib -DFLAGS := -MM +DFLAGS := -MMD -MP LINK_LIBS := -Wl,--start-group -lstdc++ -lc -lm -lgcc -Wl,--end-group @@ -33,18 +33,19 @@ all: $(OBJ) crt0.o @xxd -i test.elf | sed 's/unsigned char/const unsigned char __attribute__((aligned(8)))/' > mpuTest.h clean: - -rm $(OBJ) crt0.o test.elf test.map test.txt mpuTest.h *.d - -#pull in dependecy info for existing .o files --include $(OBJ:.o=.d) + -rm $(OBJ) crt0.o test.elf test.map test.txt mpuTest.h $(OBJ:.o=.d) %.o: %.s + @echo "========Compiling $<========" $(AS) $(AFLAGS) $< -o $@ %.o : %.c - $(CC) $(CFLAGS) $< -o $@ - $(CC) $(DFLAGS) $(CFLAGS) $*.c > $*.d + @echo "========Compiling $<========" + $(CC) $(DFLAGS) $(CFLAGS) $< -o $@ %.o : %.cpp - $(CXX) $(CXXFLAGS) $< -o $@ - $(CXX) $(DFLAGS) $(CXXFLAGS) $*.cpp > $*.d + @echo "========Compiling $<========" + $(CXX) $(DFLAGS) $(CXXFLAGS) $< -o $@ + +#pull in dependecy info for existing .o files +-include $(OBJ:.o=.d)