X-Git-Url: http://git.lukelau.me/?p=kaleidoscope-hs.git;a=blobdiff_plain;f=Makefile;fp=Makefile;h=1a37353a226b8671148a1e95db3fd049c37a9dc4;hp=0000000000000000000000000000000000000000;hb=58bc647a182a51f277577aa7c46381a2138a2e06;hpb=705b0b8458673edb7273e6e19914390a55e51d23 diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..1a37353 --- /dev/null +++ b/Makefile @@ -0,0 +1,14 @@ +stdlib.dylib: stdlib.c + clang -shared $< -o $@ + +# for statically linking the stdlib: +# make sure to change in Main.hs +# loadLibraryPermanently (Just "stdlib.dylib") +# to +# loadLibraryPermanently Nothing +stdlib.o: stdlib.c + clang -c $< -o $@ + +Main: Main.hs stdlib.o + ghc $^ -o $@ -optl -Wl,-exported_symbols_list,stdlib.syms \ + -no-keep-hi-files -no-keep-o-files