nixos-riscv/dts/Makefile
Rodrigo Arias Mallo 2f48ad5f40 Define DT constants in a C header file
Allows writing baremetal programs that can read the correct offsets of
devices or clock frequencies.
2024-09-05 16:59:06 +02:00

18 lines
234 B
Makefile

CC?=gcc
DTC?=dtc
CPPFLAGS=-E -C -P -nostdinc -undef -x assembler-with-cpp
all: lagarto_ox.dtb
clean:
rm -f *.pp.dts *.dtb
%.pp.dts: %.dts *.h
$(CC) $(CPPFLAGS) $< -o $@
%.dtb: %.pp.dts
dtc -O dtb -o $@ $^
.PRECIOUS: %.pp.dts