Fixed Makefile dirname: missing operand and implementation warnings
This commit is contained in:
parent
bccacd0a21
commit
c41f3b0d5f
|
@ -3,9 +3,14 @@ CC = arm-none-eabi-gcc
|
|||
# The location of the C compiler
|
||||
# ARMGCC_ROOT is used by some makefiles that need to know where the compiler
|
||||
# is installed.
|
||||
ARMGCC_ROOT := ${shell dirname ${shell readlink ${shell which ${CC}}}}/..
|
||||
ARMGCC_BIN := ${shell which ${CC}}
|
||||
ifeq (${shell test -h ${ARMGCC_BIN} && echo "true" || echo "false"}, true)
|
||||
ARMGCC_ROOT := ${shell dirname ${shell readlink ${ARMGCC_BIN}}}/..
|
||||
else
|
||||
ARMGCC_ROOT := ${shell dirname ${ARMGCC_BIN}}/..
|
||||
endif
|
||||
|
||||
OBJECTS = main.o system.o startup.o
|
||||
OBJECTS = main.o system.o startup.o syscalls.o
|
||||
|
||||
NAME = lab
|
||||
|
||||
|
@ -40,6 +45,7 @@ LFLAGS = -Wl,-T,../config.lds \
|
|||
--specs=nano.specs
|
||||
|
||||
all: $(NAME).out
|
||||
@echo "SUCCESS: Compilation completed successfully."
|
||||
|
||||
main.o: main.c
|
||||
@$(CC) $(CFLAGS) -g $< -c -o $@
|
||||
|
@ -50,6 +56,9 @@ system.o: ../system.c
|
|||
startup.o: ../startup.c
|
||||
@$(CC) $(CFLAGS) $< -c -o $@
|
||||
|
||||
syscalls.o: ../syscalls.c
|
||||
@$(CC) $(CFLAGS) $< -c -o $@
|
||||
|
||||
$(NAME).out: $(OBJECTS)
|
||||
@$(CC) $(OBJECTS) $(LFLAGS) -o $(NAME).out
|
||||
|
||||
|
|
|
@ -3,9 +3,14 @@ CC = arm-none-eabi-gcc
|
|||
# The location of the C compiler
|
||||
# ARMGCC_ROOT is used by some makefiles that need to know where the compiler
|
||||
# is installed.
|
||||
ARMGCC_ROOT := ${shell dirname ${shell readlink ${shell which ${CC}}}}/..
|
||||
ARMGCC_BIN := ${shell which ${CC}}
|
||||
ifeq (${shell test -h ${ARMGCC_BIN} && echo "true" || echo "false"}, true)
|
||||
ARMGCC_ROOT := ${shell dirname ${shell readlink ${ARMGCC_BIN}}}/..
|
||||
else
|
||||
ARMGCC_ROOT := ${shell dirname ${ARMGCC_BIN}}/..
|
||||
endif
|
||||
|
||||
OBJECTS = main.o bump.o delay.o clock.o system.o startup.o
|
||||
OBJECTS = main.o bump.o delay.o clock.o system.o startup.o syscalls.o
|
||||
|
||||
NAME = lab
|
||||
|
||||
|
@ -40,6 +45,7 @@ LFLAGS = -Wl,-T,../config.lds \
|
|||
--specs=nano.specs
|
||||
|
||||
all: $(NAME).out
|
||||
@echo "SUCCESS: Compilation completed successfully."
|
||||
|
||||
main.o: main.c
|
||||
@$(CC) $(CFLAGS) -g $< -c -o $@
|
||||
|
@ -59,6 +65,9 @@ system.o: ../system.c
|
|||
startup.o: ../startup.c
|
||||
@$(CC) $(CFLAGS) $< -c -o $@
|
||||
|
||||
syscalls.o: ../syscalls.c
|
||||
@$(CC) $(CFLAGS) $< -c -o $@
|
||||
|
||||
$(NAME).out: $(OBJECTS)
|
||||
@$(CC) $(OBJECTS) $(LFLAGS) -o $(NAME).out
|
||||
|
||||
|
|
|
@ -3,9 +3,14 @@ CC = arm-none-eabi-gcc
|
|||
# The location of the C compiler
|
||||
# ARMGCC_ROOT is used by some makefiles that need to know where the compiler
|
||||
# is installed.
|
||||
ARMGCC_ROOT := ${shell dirname ${shell readlink ${shell which ${CC}}}}/..
|
||||
ARMGCC_BIN := ${shell which ${CC}}
|
||||
ifeq (${shell test -h ${ARMGCC_BIN} && echo "true" || echo "false"}, true)
|
||||
ARMGCC_ROOT := ${shell dirname ${shell readlink ${ARMGCC_BIN}}}/..
|
||||
else
|
||||
ARMGCC_ROOT := ${shell dirname ${ARMGCC_BIN}}/..
|
||||
endif
|
||||
|
||||
OBJECTS = main.o bump.o delay.o clock.o reflectance.o cpu.o system.o startup.o
|
||||
OBJECTS = main.o bump.o delay.o clock.o reflectance.o cpu.o system.o startup.o syscalls.o
|
||||
|
||||
NAME = lab
|
||||
|
||||
|
@ -40,6 +45,7 @@ LFLAGS = -Wl,-T,../config.lds \
|
|||
--specs=nano.specs
|
||||
|
||||
all: $(NAME).out
|
||||
@echo "SUCCESS: Compilation completed successfully."
|
||||
|
||||
main.o: main.c
|
||||
@$(CC) $(CFLAGS) -g $< -c -o $@
|
||||
|
@ -65,6 +71,9 @@ system.o: ../system.c
|
|||
startup.o: ../startup.c
|
||||
@$(CC) $(CFLAGS) $< -c -o $@
|
||||
|
||||
syscalls.o: ../syscalls.c
|
||||
@$(CC) $(CFLAGS) $< -c -o $@
|
||||
|
||||
$(NAME).out: $(OBJECTS)
|
||||
@$(CC) $(OBJECTS) $(LFLAGS) -o $(NAME).out
|
||||
|
||||
|
|
|
@ -0,0 +1,17 @@
|
|||
// Minimal implementations to supress the warnings
|
||||
|
||||
int _close(int file) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
int _lseek(int file, int ptr, int dir) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
int _read(int file, char *ptr, int len) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
int _write(int file, char *ptr, int len) {
|
||||
return len;
|
||||
}
|
Loading…
Reference in New Issue