Makefile 458 B

12345678910111213141516171819202122232425
  1. ifeq ($(ARCH), x86_64)
  2. CROSS_COMPILE=x86_64-linux-musl-
  3. else ifeq ($(ARCH), riscv64)
  4. CROSS_COMPILE=riscv64-linux-musl-
  5. endif
  6. CC=$(CROSS_COMPILE)gcc
  7. .PHONY: all
  8. all: main.c
  9. # $(CC) -static -o init main.c
  10. $(MAKE) -C riscv_rust_init ARCH=$(ARCH) install
  11. .PHONY: install clean
  12. install: all
  13. $(MAKE) -C riscv_rust_init ARCH=$(ARCH) install
  14. # mv init $(DADK_CURRENT_BUILD_DIR)/init
  15. clean:
  16. rm init *.o
  17. $(MAKE) -C riscv_rust_init ARCH=$(ARCH) clean
  18. fmt: