FStarLang / karamel

KaRaMeL is a tool for extracting low-level F* programs to readable C code
Apache License 2.0
394 stars 58 forks source link

generated Makefile.basic exe target needs .o's #461

Open briangmilnes opened 4 weeks ago

briangmilnes commented 4 weeks ago

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

briangmilnes commented 4 weeks ago

Or the library.

msprotz commented 4 weeks ago

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

briangmilnes commented 4 weeks ago

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.

msprotz commented 3 weeks ago

did you pass -o foobar.exe to krml?