1OLD_LIBC_INSTALL_PATH=$(ROOT_PATH)/bin/sysroot/usr/old_libc 2 3all: shell.o cmd.o cmd_help.o cmd_test.o 4 5 $(LD) -b elf64-x86-64 -z muldefs -o $(tmp_output_dir)/shell $(shell find . -name "*.o") $(OLD_LIBC_INSTALL_PATH)/lib/libc.a -T shell.lds 6 7 $(OBJCOPY) -I elf64-x86-64 -R ".eh_frame" -R ".comment" -O elf64-x86-64 $(tmp_output_dir)/shell $(output_dir)/shell.elf 8shell.o: shell.c 9 $(CC) $(CFLAGS) -c shell.c -o shell.o 10 11cmd.o: cmd.c 12 $(CC) $(CFLAGS) -c cmd.c -o cmd.o 13 14cmd_test.o: cmd_test.c 15 $(CC) $(CFLAGS) -c cmd_test.c -o cmd_test.o 16 17cmd_help.o: cmd_help.c 18 $(CC) $(CFLAGS) -c cmd_help.c -o cmd_help.o 19