From 9073a8b7ed60de7fb135710f3a42fea9f9b0c120 Mon Sep 17 00:00:00 2001 From: Terraneo Federico <fede.tft@hotmail.it> Date: Sat, 4 Jan 2014 22:28:42 +0000 Subject: [PATCH] Completed makefile cleanup --- Makefile | 2 +- app_template/Makefile | 3 --- app_template_withlibs/Makefile | 3 --- miosix/testsuite/mpu_testsuite/test1/Makefile | 5 +---- miosix/testsuite/mpu_testsuite/test10_1/Makefile | 16 +++++++--------- miosix/testsuite/mpu_testsuite/test10_2/Makefile | 5 +---- miosix/testsuite/mpu_testsuite/test2/Makefile | 5 +---- miosix/testsuite/mpu_testsuite/test3/Makefile | 5 +---- miosix/testsuite/mpu_testsuite/test4/Makefile | 5 +---- miosix/testsuite/mpu_testsuite/test5/Makefile | 5 +---- miosix/testsuite/mpu_testsuite/test6/Makefile | 5 +---- miosix/testsuite/mpu_testsuite/test7/Makefile | 5 +---- miosix/testsuite/mpu_testsuite/test8_1/Makefile | 16 +++++++--------- miosix/testsuite/mpu_testsuite/test8_2/Makefile | 16 +++++++--------- miosix/testsuite/mpu_testsuite/test9/Makefile | 16 +++++++--------- miosix_np_processes/nbproject/configurations.xml | 2 +- 16 files changed, 38 insertions(+), 76 deletions(-) diff --git a/Makefile b/Makefile index 0a524976..1f741a86 100644 --- a/Makefile +++ b/Makefile @@ -81,7 +81,7 @@ main.elf: $(OBJ) miosix/libmiosix.a $(CC) $(DFLAGS) $(CFLAGS) $< -o $@ %.o : %.cpp - $(CXX) $(DFLAGS) $(CXXFLAGS) $< -o $@ + $(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 b0605b7e..a13942e6 100644 --- a/app_template/Makefile +++ b/app_template/Makefile @@ -36,15 +36,12 @@ clean: -rm $(OBJ) crt0.o main.elf main.map main.txt prog3.h $(OBJ:.o=.d) %.o: %.s - @echo "========Compiling $<========" $(AS) $(AFLAGS) $< -o $@ %.o : %.c - @echo "========Compiling $<========" $(CC) $(DFLAGS) $(CFLAGS) $< -o $@ %.o : %.cpp - @echo "========Compiling $<========" $(CXX) $(DFLAGS) $(CXXFLAGS) $< -o $@ #pull in dependecy info for existing .o files diff --git a/app_template_withlibs/Makefile b/app_template_withlibs/Makefile index 96bd2c51..05bd567d 100644 --- a/app_template_withlibs/Makefile +++ b/app_template_withlibs/Makefile @@ -40,15 +40,12 @@ clean: -rm $(OBJ) crt0.o main.elf main.map $(OBJ:.o=.d) %.o: %.s - @echo "========Compiling $<========" $(AS) $(AFLAGS) $< -o $@ %.o : %.c - @echo "========Compiling $<========" $(CC) $(DFLAGS) $(CFLAGS) $< -o $@ %.o : %.cpp - @echo "========Compiling $<========" $(CXX) $(DFLAGS) $(CXXFLAGS) $< -o $@ #pull in dependecy info for existing .o files diff --git a/miosix/testsuite/mpu_testsuite/test1/Makefile b/miosix/testsuite/mpu_testsuite/test1/Makefile index ac9e07ca..1523e24b 100644 --- a/miosix/testsuite/mpu_testsuite/test1/Makefile +++ b/miosix/testsuite/mpu_testsuite/test1/Makefile @@ -36,16 +36,13 @@ clean: -rm $(OBJ) crt0.o test.elf test.map test.txt mpuTest.h $(OBJ:.o=.d) %.o: %.s - @echo "========Compiling $<========" $(AS) $(AFLAGS) $< -o $@ %.o : %.c - @echo "========Compiling $<========" $(CC) $(DFLAGS) $(CFLAGS) $< -o $@ %.o : %.cpp - @echo "========Compiling $<========" - $(CXX) $(DFLAGS) $(CXXFLAGS) $< -o $@ + $(CXX) $(DFLAGS) $(CXXFLAGS) $< -o $@ #pull in dependecy info for existing .o files -include $(OBJ:.o=.d) diff --git a/miosix/testsuite/mpu_testsuite/test10_1/Makefile b/miosix/testsuite/mpu_testsuite/test10_1/Makefile index 994dae76..1523e24b 100644 --- a/miosix/testsuite/mpu_testsuite/test10_1/Makefile +++ b/miosix/testsuite/mpu_testsuite/test10_1/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,16 @@ 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 $(AS) $(AFLAGS) $< -o $@ %.o : %.c - $(CC) $(CFLAGS) $< -o $@ - $(CC) $(DFLAGS) $(CFLAGS) $*.c > $*.d + $(CC) $(DFLAGS) $(CFLAGS) $< -o $@ %.o : %.cpp - $(CXX) $(CXXFLAGS) $< -o $@ - $(CXX) $(DFLAGS) $(CXXFLAGS) $*.cpp > $*.d + $(CXX) $(DFLAGS) $(CXXFLAGS) $< -o $@ + +#pull in dependecy info for existing .o files +-include $(OBJ:.o=.d) diff --git a/miosix/testsuite/mpu_testsuite/test10_2/Makefile b/miosix/testsuite/mpu_testsuite/test10_2/Makefile index ac9e07ca..1523e24b 100644 --- a/miosix/testsuite/mpu_testsuite/test10_2/Makefile +++ b/miosix/testsuite/mpu_testsuite/test10_2/Makefile @@ -36,16 +36,13 @@ clean: -rm $(OBJ) crt0.o test.elf test.map test.txt mpuTest.h $(OBJ:.o=.d) %.o: %.s - @echo "========Compiling $<========" $(AS) $(AFLAGS) $< -o $@ %.o : %.c - @echo "========Compiling $<========" $(CC) $(DFLAGS) $(CFLAGS) $< -o $@ %.o : %.cpp - @echo "========Compiling $<========" - $(CXX) $(DFLAGS) $(CXXFLAGS) $< -o $@ + $(CXX) $(DFLAGS) $(CXXFLAGS) $< -o $@ #pull in dependecy info for existing .o files -include $(OBJ:.o=.d) diff --git a/miosix/testsuite/mpu_testsuite/test2/Makefile b/miosix/testsuite/mpu_testsuite/test2/Makefile index ac9e07ca..1523e24b 100644 --- a/miosix/testsuite/mpu_testsuite/test2/Makefile +++ b/miosix/testsuite/mpu_testsuite/test2/Makefile @@ -36,16 +36,13 @@ clean: -rm $(OBJ) crt0.o test.elf test.map test.txt mpuTest.h $(OBJ:.o=.d) %.o: %.s - @echo "========Compiling $<========" $(AS) $(AFLAGS) $< -o $@ %.o : %.c - @echo "========Compiling $<========" $(CC) $(DFLAGS) $(CFLAGS) $< -o $@ %.o : %.cpp - @echo "========Compiling $<========" - $(CXX) $(DFLAGS) $(CXXFLAGS) $< -o $@ + $(CXX) $(DFLAGS) $(CXXFLAGS) $< -o $@ #pull in dependecy info for existing .o files -include $(OBJ:.o=.d) diff --git a/miosix/testsuite/mpu_testsuite/test3/Makefile b/miosix/testsuite/mpu_testsuite/test3/Makefile index ac9e07ca..1523e24b 100644 --- a/miosix/testsuite/mpu_testsuite/test3/Makefile +++ b/miosix/testsuite/mpu_testsuite/test3/Makefile @@ -36,16 +36,13 @@ clean: -rm $(OBJ) crt0.o test.elf test.map test.txt mpuTest.h $(OBJ:.o=.d) %.o: %.s - @echo "========Compiling $<========" $(AS) $(AFLAGS) $< -o $@ %.o : %.c - @echo "========Compiling $<========" $(CC) $(DFLAGS) $(CFLAGS) $< -o $@ %.o : %.cpp - @echo "========Compiling $<========" - $(CXX) $(DFLAGS) $(CXXFLAGS) $< -o $@ + $(CXX) $(DFLAGS) $(CXXFLAGS) $< -o $@ #pull in dependecy info for existing .o files -include $(OBJ:.o=.d) diff --git a/miosix/testsuite/mpu_testsuite/test4/Makefile b/miosix/testsuite/mpu_testsuite/test4/Makefile index ac9e07ca..1523e24b 100644 --- a/miosix/testsuite/mpu_testsuite/test4/Makefile +++ b/miosix/testsuite/mpu_testsuite/test4/Makefile @@ -36,16 +36,13 @@ clean: -rm $(OBJ) crt0.o test.elf test.map test.txt mpuTest.h $(OBJ:.o=.d) %.o: %.s - @echo "========Compiling $<========" $(AS) $(AFLAGS) $< -o $@ %.o : %.c - @echo "========Compiling $<========" $(CC) $(DFLAGS) $(CFLAGS) $< -o $@ %.o : %.cpp - @echo "========Compiling $<========" - $(CXX) $(DFLAGS) $(CXXFLAGS) $< -o $@ + $(CXX) $(DFLAGS) $(CXXFLAGS) $< -o $@ #pull in dependecy info for existing .o files -include $(OBJ:.o=.d) diff --git a/miosix/testsuite/mpu_testsuite/test5/Makefile b/miosix/testsuite/mpu_testsuite/test5/Makefile index ac9e07ca..1523e24b 100644 --- a/miosix/testsuite/mpu_testsuite/test5/Makefile +++ b/miosix/testsuite/mpu_testsuite/test5/Makefile @@ -36,16 +36,13 @@ clean: -rm $(OBJ) crt0.o test.elf test.map test.txt mpuTest.h $(OBJ:.o=.d) %.o: %.s - @echo "========Compiling $<========" $(AS) $(AFLAGS) $< -o $@ %.o : %.c - @echo "========Compiling $<========" $(CC) $(DFLAGS) $(CFLAGS) $< -o $@ %.o : %.cpp - @echo "========Compiling $<========" - $(CXX) $(DFLAGS) $(CXXFLAGS) $< -o $@ + $(CXX) $(DFLAGS) $(CXXFLAGS) $< -o $@ #pull in dependecy info for existing .o files -include $(OBJ:.o=.d) diff --git a/miosix/testsuite/mpu_testsuite/test6/Makefile b/miosix/testsuite/mpu_testsuite/test6/Makefile index ac9e07ca..1523e24b 100644 --- a/miosix/testsuite/mpu_testsuite/test6/Makefile +++ b/miosix/testsuite/mpu_testsuite/test6/Makefile @@ -36,16 +36,13 @@ clean: -rm $(OBJ) crt0.o test.elf test.map test.txt mpuTest.h $(OBJ:.o=.d) %.o: %.s - @echo "========Compiling $<========" $(AS) $(AFLAGS) $< -o $@ %.o : %.c - @echo "========Compiling $<========" $(CC) $(DFLAGS) $(CFLAGS) $< -o $@ %.o : %.cpp - @echo "========Compiling $<========" - $(CXX) $(DFLAGS) $(CXXFLAGS) $< -o $@ + $(CXX) $(DFLAGS) $(CXXFLAGS) $< -o $@ #pull in dependecy info for existing .o files -include $(OBJ:.o=.d) diff --git a/miosix/testsuite/mpu_testsuite/test7/Makefile b/miosix/testsuite/mpu_testsuite/test7/Makefile index ac9e07ca..1523e24b 100644 --- a/miosix/testsuite/mpu_testsuite/test7/Makefile +++ b/miosix/testsuite/mpu_testsuite/test7/Makefile @@ -36,16 +36,13 @@ clean: -rm $(OBJ) crt0.o test.elf test.map test.txt mpuTest.h $(OBJ:.o=.d) %.o: %.s - @echo "========Compiling $<========" $(AS) $(AFLAGS) $< -o $@ %.o : %.c - @echo "========Compiling $<========" $(CC) $(DFLAGS) $(CFLAGS) $< -o $@ %.o : %.cpp - @echo "========Compiling $<========" - $(CXX) $(DFLAGS) $(CXXFLAGS) $< -o $@ + $(CXX) $(DFLAGS) $(CXXFLAGS) $< -o $@ #pull in dependecy info for existing .o files -include $(OBJ:.o=.d) diff --git a/miosix/testsuite/mpu_testsuite/test8_1/Makefile b/miosix/testsuite/mpu_testsuite/test8_1/Makefile index 994dae76..1523e24b 100644 --- a/miosix/testsuite/mpu_testsuite/test8_1/Makefile +++ b/miosix/testsuite/mpu_testsuite/test8_1/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,16 @@ 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 $(AS) $(AFLAGS) $< -o $@ %.o : %.c - $(CC) $(CFLAGS) $< -o $@ - $(CC) $(DFLAGS) $(CFLAGS) $*.c > $*.d + $(CC) $(DFLAGS) $(CFLAGS) $< -o $@ %.o : %.cpp - $(CXX) $(CXXFLAGS) $< -o $@ - $(CXX) $(DFLAGS) $(CXXFLAGS) $*.cpp > $*.d + $(CXX) $(DFLAGS) $(CXXFLAGS) $< -o $@ + +#pull in dependecy info for existing .o files +-include $(OBJ:.o=.d) diff --git a/miosix/testsuite/mpu_testsuite/test8_2/Makefile b/miosix/testsuite/mpu_testsuite/test8_2/Makefile index 994dae76..1523e24b 100644 --- a/miosix/testsuite/mpu_testsuite/test8_2/Makefile +++ b/miosix/testsuite/mpu_testsuite/test8_2/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,16 @@ 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 $(AS) $(AFLAGS) $< -o $@ %.o : %.c - $(CC) $(CFLAGS) $< -o $@ - $(CC) $(DFLAGS) $(CFLAGS) $*.c > $*.d + $(CC) $(DFLAGS) $(CFLAGS) $< -o $@ %.o : %.cpp - $(CXX) $(CXXFLAGS) $< -o $@ - $(CXX) $(DFLAGS) $(CXXFLAGS) $*.cpp > $*.d + $(CXX) $(DFLAGS) $(CXXFLAGS) $< -o $@ + +#pull in dependecy info for existing .o files +-include $(OBJ:.o=.d) diff --git a/miosix/testsuite/mpu_testsuite/test9/Makefile b/miosix/testsuite/mpu_testsuite/test9/Makefile index 994dae76..1523e24b 100644 --- a/miosix/testsuite/mpu_testsuite/test9/Makefile +++ b/miosix/testsuite/mpu_testsuite/test9/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,16 @@ 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 $(AS) $(AFLAGS) $< -o $@ %.o : %.c - $(CC) $(CFLAGS) $< -o $@ - $(CC) $(DFLAGS) $(CFLAGS) $*.c > $*.d + $(CC) $(DFLAGS) $(CFLAGS) $< -o $@ %.o : %.cpp - $(CXX) $(CXXFLAGS) $< -o $@ - $(CXX) $(DFLAGS) $(CXXFLAGS) $*.cpp > $*.d + $(CXX) $(DFLAGS) $(CXXFLAGS) $< -o $@ + +#pull in dependecy info for existing .o files +-include $(OBJ:.o=.d) diff --git a/miosix_np_processes/nbproject/configurations.xml b/miosix_np_processes/nbproject/configurations.xml index 87cad711..4cb9f7cf 100644 --- a/miosix_np_processes/nbproject/configurations.xml +++ b/miosix_np_processes/nbproject/configurations.xml @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="UTF-8"?> <configurationDescriptor version="84"> <logicalFolder name="root" displayName="root" projectFiles="true" kind="ROOT"> - <df name="embeddedmiosix" root=".."> + <df name="miosix_np_2" root=".."> <df name="app_template"> <in>crt0.s</in> <in>main.c</in> -- GitLab