xref: /DragonOS/user/apps/dmesg/Makefile (revision bc6f0a967c8cb1e9379ced184b25a7722fbda2a4)
18d72b68dSJomoifeq ($(ARCH), x86_64)
2*bc6f0a96S裕依	CROSS_COMPILE=x86_64-linux-musl-
38d72b68dSJomoelse ifeq ($(ARCH), riscv64)
4*bc6f0a96S裕依	CROSS_COMPILE=riscv64-linux-musl-
58d72b68dSJomoendif
68d72b68dSJomo
7*bc6f0a96S裕依CC=$(CROSS_COMPILE)gcc
88d72b68dSJomo
98d72b68dSJomo
10*bc6f0a96S裕依all: main.c dmesg.c
118d72b68dSJomo	$(CC) -static -o dmesg main.c dmesg.c
128d72b68dSJomo
13*bc6f0a96S裕依.PHONY: install clean
14*bc6f0a96S裕依install: all
15*bc6f0a96S裕依	mv dmesg $(DADK_CURRENT_BUILD_DIR)/dmesg
16*bc6f0a96S裕依
178d72b68dSJomoclean:
188d72b68dSJomo	rm dmesg *.o
19*bc6f0a96S裕依
20*bc6f0a96S裕依fmt:
21