Find our JIT'ed function and run it
[kaleidoscope-hs.git] / Makefile
1 stdlib.dylib: stdlib.c
2         clang -shared $< -o $@
3
4 # for statically linking the stdlib:
5 # make sure to change in Main.hs
6 #   loadLibraryPermanently (Just "stdlib.dylib")
7 # to
8 #   loadLibraryPermanently Nothing
9 stdlib.o: stdlib.c
10         clang -c $< -o $@
11
12 Main: Main.hs stdlib.o
13         ghc $^ -o $@ -optl -Wl,-exported_symbols_list,stdlib.syms \
14                 -no-keep-hi-files -no-keep-o-files