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

!dumpNimCompilePragmas = |> 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
: $(CORE4FILES) |> !dumpNimCompilePragmas |> core4.nim
: $(CORE6FILES) |> !dumpNimCompilePragmas |> core6.nim
