FStarLang/karamel

generated Makefile.basic exe target needs .o's

briangmilnes opened this issue · 4 comments

%.exe: *.o
$(CC) $(CFLAGS) -o $@ $^ $(KRML_HOME)/krmllib/dist/generic/libkrmllib.a

Or the library.

Aren't those in the generated Makefile.include? Makefile.basic is hand-written in lives in misc/

Well almost, it has no concept of main so I had to add
cc -I /home/milnes/third-party/everest/karamel/include -I /home/milnes/third-party/everest/karamel/krmllib/dist/generic -o build/KRML/c/main.exe build/KRML/c/main.o build/KRML/c/libkrml-makefiles.a /home/milnes/third-party/everest/karamel/krmllib/dist/generic/libkrmllib.a
build/KRML/c/main.exe

and it puts main.o in the archive. Which CC will ignore it seems.

did you pass -o foobar.exe to krml?