## Generate some Nim files that tell the compiler
## to compile the LwIP sources.
## This output should be checked into Git.

!dumpNimCompilePragmas = |> ^o^ for f in %f; do echo "{.compile: \"$f\".}" >> %o; done |>

LWIPDIR = $(TUP_CWD)/upstream/src
include $(LWIPDIR)/Filelists.mk

: *.c $(COREFILES) $(APIFILES) $(LWIPDIR)/netif/ethernet.c \
	|> !dumpNimCompilePragmas |> core.nim ../../../<sources>
: $(CORE4FILES) |> !dumpNimCompilePragmas |> core4.nim ../../../<sources>
: $(CORE6FILES) |> !dumpNimCompilePragmas |> core6.nim ../../../<sources>
