diff --git a/tests/C/forloop/Makefile b/tests/C/forloop/Makefile index 1b54a52..9db9d24 100644 --- a/tests/C/forloop/Makefile +++ b/tests/C/forloop/Makefile @@ -9,7 +9,6 @@ CFLAGS = -Wall -I. -O0 -nostdlib -march=rv32i -mabi=ilp32 --entry main #CFLAGS = -Wall -I. -O0 -nodefaultlibs -march=rv32i -mabi=ilp32 -LINKER = riscv32-unknown-linux-gnu-gcc # linking flags here LFLAGS = -I. --entry main LIBS = $(EXTRA_LIBS) diff --git a/tests/C/func1/Makefile b/tests/C/func1/Makefile index 7bbc725..245ab11 100644 --- a/tests/C/func1/Makefile +++ b/tests/C/func1/Makefile @@ -7,7 +7,6 @@ CC = riscv32-unknown-elf-gcc CFLAGS = -Wall -L. -O0 -g -static -LINKER = riscv32-unknown-linux-gnu-gcc # linking flags here LFLAGS = -I. --entry main LIBS = $(EXTRA_LIBS) diff --git a/tests/C/func2/Makefile b/tests/C/func2/Makefile index 049a267..9069887 100644 --- a/tests/C/func2/Makefile +++ b/tests/C/func2/Makefile @@ -6,8 +6,6 @@ CC = riscv32-unknown-elf-gcc # compiling flags here CFLAGS = -Wall -I. -O0 -march=rv32i -mabi=ilp32 - -LINKER = riscv32-unknown-linux-gnu-gcc # linking flags here LFLAGS = -I. --entry main LIBS = $(EXTRA_LIBS) @@ -28,8 +26,7 @@ rm = rm -f $(BINDIR)/$(TARGET): $(OBJECTS) -# $(LINKER) $(OBJECTS) $(LFLAGS) $(LIBS) $(LIBDIR) -o $@ - riscv32-unknown-linux-gnu-objdump -d $< > dump + riscv32-unknown-elf-objdump -d $< > dump objcopy -Oihex $< $(TARGET).hex # @echo "Linking complete!" diff --git a/tests/C/func3/Makefile b/tests/C/func3/Makefile index 2313792..291c541 100644 --- a/tests/C/func3/Makefile +++ b/tests/C/func3/Makefile @@ -7,7 +7,6 @@ CC = riscv32-unknown-elf-gcc # compiling flags here CFLAGS = -Wall -I. -O0 -static -march=rv32imac -mabi=ilp32 --specs=nosys.specs -LINKER = riscv32-unknown-linux-gnu-gcc LIBS = $(EXTRA_LIBS) # change these to proper directories where each file should be @@ -24,7 +23,7 @@ rm = rm -f $(BINDIR)/$(TARGET): $(OBJECTS) # $(LINKER) $(OBJECTS) $(LDFLAGS) $(LIBS) $(LIBDIR) -o $@ - riscv32-unknown-linux-gnu-objdump -d $< > dump + riscv32-unknown-elf-objdump -d $< > dump objcopy -Oihex $< $(TARGET).hex @echo "Linking complete!" diff --git a/tests/C/func4/Makefile b/tests/C/func4/Makefile index 8ee871f..9d0b28c 100644 --- a/tests/C/func4/Makefile +++ b/tests/C/func4/Makefile @@ -7,7 +7,6 @@ CC = riscv32-unknown-elf-gcc CFLAGS = -Wall -I. -O0 -Xlinker --gc-sections -lgcc -lc -static --specs=nano.specs -LINKER = riscv32-unknown-linux-gnu-gcc # linking flags here LDFLAGS = -I. --entry main -L/opt/riscv/riscv32-unknown-elf/lib/ -T ld_script.ld LIBS = $(EXTRA_LIBS) diff --git a/tests/C/func5/Makefile b/tests/C/func5/Makefile index d8ab0a5..bb5577e 100644 --- a/tests/C/func5/Makefile +++ b/tests/C/func5/Makefile @@ -7,7 +7,6 @@ CC = riscv32-unknown-elf-gcc # compiling flags here CFLAGS = -Wall -I. -O0 -static --specs=nosys.specs -LINKER = riscv32-unknown-linux-gnu-gcc # linking flags here LDFLAGS = -I. --entry main -L/opt/riscv/riscv32-unknown-elf/lib/ -T ld_script.ld LIBS = $(EXTRA_LIBS) @@ -28,7 +27,6 @@ rm = rm -f $(BINDIR)/$(TARGET): $(OBJECTS) -# $(LINKER) $(OBJECTS) $(LDFLAGS) $(LIBS) $(LIBDIR) -o $@ riscv32-unknown-elf-objdump -d $< > dump objcopy -Oihex $< $(TARGET).hex # @echo "Linking complete!" diff --git a/tests/C/stdlibs/Makefile b/tests/C/stdlibs/Makefile index 6a8b281..8fd29c9 100644 --- a/tests/C/stdlibs/Makefile +++ b/tests/C/stdlibs/Makefile @@ -6,8 +6,6 @@ CC = riscv32-unknown-elf-gcc # compiling flags here CFLAGS = -Wall -I. -O0 -march=rv32i -mabi=ilp32 --specs=nosys.specs - -LINKER = riscv32-unknown-linux-gnu-gcc # linking flags here LFLAGS = -I. LIBS = $(EXTRA_LIBS) diff --git a/tests/C/timer/Makefile b/tests/C/timer/Makefile deleted file mode 100644 index 31ab2f9..0000000 --- a/tests/C/timer/Makefile +++ /dev/null @@ -1,56 +0,0 @@ -TARGET = timer - -TARGET_ARCH=riscv32 - -CC = riscv32-unknown-elf-gcc - -# compiling flags here -CFLAGS = -Wall -I. -O0 -static --specs=nosys.specs - -LINKER = riscv32-unknown-linux-gnu-gcc -# linking flags here -LDFLAGS = -I. --entry main -L/opt/riscv/riscv32-unknown-elf/lib/ -T ld_script.ld -LIBS = $(EXTRA_LIBS) - - -# change these to proper directories where each file should be -SRCDIR = ./ -OBJDIR = . -BINDIR = ./ -INCDIR = -I. -LIBDIR = -L. - - -SOURCES := $(wildcard $(SRCDIR)/*.c) -INCLUDES := $(wildcard $(INCDIR)/*.h) -OBJECTS := $(SOURCES:$(SRCDIR)/%.c=$(OBJDIR)/%.o) -rm = rm -f - - -$(BINDIR)/$(TARGET): $(OBJECTS) -# $(LINKER) $(OBJECTS) $(LDFLAGS) $(LIBS) $(LIBDIR) -o $@ - riscv32-unknown-linux-gnu-objdump -d $< > dump - objcopy -Oihex $< $(TARGET).hex -# @echo "Linking complete!" - -$(OBJECTS): $(OBJDIR)/%.o : $(SRCDIR)/%.c - @echo "Compiling "$<" ..." -# $(CC) $(CFLAGS) $(INCDIR) -c $< -o $@ - $(CC) $(CFLAGS) $(INCDIR) $< -o $@ - @echo "Done!" - -#$(OBJECTS): $(OBJDIR)/%.o : $(SRCDIR)/%.S -# @echo "Assembling "$<" ..." -# $(CC) $(CFLAGS) $(INCDIR) -c $< -o $@ -# $(CC) $(CFLAGS) $(INCDIR) $< -o $@ -# @echo "Done!" - -.PHONY: clean -clean: - @$(rm) $(OBJECTS) *.hex dump - @echo "Cleanup complete!" - -.PHONY: remove -remove: clean - @$(rm) $(BINDIR)/$(TARGET) - @echo "Executable removed!" diff --git a/tests/C/trace/Makefile b/tests/C/trace/Makefile index c0aa67c..82b69d3 100644 --- a/tests/C/trace/Makefile +++ b/tests/C/trace/Makefile @@ -31,7 +31,7 @@ rm = rm -f $(BINDIR)/$(TARGET): $(OBJECTS) # $(LINKER) $(OBJECTS) $(LFLAGS) $(LIBS) $(LIBDIR) -o $@ - riscv32-unknown-linux-gnu-objdump -d $< > dump + riscv32-unknown-elf-objdump -d $< > dump objcopy -Oihex $< $(TARGET).hex # @echo "Linking complete!" diff --git a/tests/C/trace2/Makefile b/tests/C/trace2/Makefile index a6b7721..2311a1f 100644 --- a/tests/C/trace2/Makefile +++ b/tests/C/trace2/Makefile @@ -31,7 +31,7 @@ rm = rm -f $(BINDIR)/$(TARGET): $(OBJECTS) # $(LINKER) $(OBJECTS) $(LFLAGS) $(LIBS) $(LIBDIR) -o $@ - riscv32-unknown-linux-gnu-objdump -d $< > dump + riscv32-unknown-elf-objdump -d $< > dump objcopy -Oihex $< $(TARGET).hex # @echo "Linking complete!" diff --git a/tests/C/trace3/Makefile b/tests/C/trace3/Makefile index fa92738..a65a902 100644 --- a/tests/C/trace3/Makefile +++ b/tests/C/trace3/Makefile @@ -31,7 +31,7 @@ rm = rm -f $(BINDIR)/$(TARGET): $(OBJECTS) # $(LINKER) $(OBJECTS) $(LFLAGS) $(LIBS) $(LIBDIR) -o $@ - riscv32-unknown-linux-gnu-objdump -d $< > dump + riscv32-unknown-elf-objdump -d $< > dump objcopy -Oihex $< $(TARGET).hex # @echo "Linking complete!"