Makefile 318 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. all: main.c dmesg.c
  8. $(CC) -static -o dmesg main.c dmesg.c
  9. .PHONY: install clean
  10. install: all
  11. mv dmesg $(DADK_CURRENT_BUILD_DIR)/dmesg
  12. clean:
  13. rm dmesg *.o
  14. fmt: