karamel icon indicating copy to clipboard operation
karamel copied to clipboard

generated Makefile.basic exe target needs .o's

Open briangmilnes opened this issue 1 year ago • 4 comments

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

briangmilnes avatar Aug 16 '24 03:08 briangmilnes

Or the library.

briangmilnes avatar Aug 16 '24 03:08 briangmilnes

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

msprotz avatar Aug 16 '24 04:08 msprotz

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.

briangmilnes avatar Aug 16 '24 04:08 briangmilnes

did you pass -o foobar.exe to krml?

msprotz avatar Aug 16 '24 15:08 msprotz