Makefile 361 B

1234567891011121314151617181920
  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 test_gettimeofday main.c
  10. .PHONY: install clean
  11. install: all
  12. mv test_gettimeofday $(DADK_CURRENT_BUILD_DIR)/test_gettimeofday
  13. clean:
  14. rm test_gettimeofday *.o
  15. fmt: