1libc_arch_objs:= $(shell find ./*.c) 2 3ECHO: 4 @echo "$@" 5 6 7$(libc_arch_objs): ECHO 8 $(CC) $(CFLAGS) -c $@ -o $@.o 9 10# 由于目前使用的是raw的gcc,所以不需要crti.o和crtn.o(待更换为x86_64-dragonos-gcc后再改这里) 11# all: $(libc_arch_objs) crti.o crtn.o 12all: $(libc_arch_objs) 13 mv crt0.c.o crt0.o 14 15# crti.o: crti.S 16# $(CC) -E crti.S > _crti.s # 预处理 17# $(AS) $(ASFLAGS) -o crti.o _crti.s 18 19# crtn.o: crtn.S 20# $(CC) -E crtn.S > _crtn.s # 预处理 21# $(AS) $(ASFLAGS) -o crtn.o _crtn.s 22 23clean: 24 25 echo "Done."