X-Git-Url: http://git.lukelau.me/?p=kaleidoscope-hs.git;a=blobdiff_plain;f=Makefile;fp=Makefile;h=1a37353a226b8671148a1e95db3fd049c37a9dc4;hp=4e533dcd9d103d5afe98c54f6eb4e2206c23ffcc;hb=894c2f2dcce94febb19d49af15c49b676ae78a98;hpb=73c0a2461c164d776e949e17f344e05dd9f6a4a2 diff --git a/Makefile b/Makefile index 4e533dc..1a37353 100644 --- a/Makefile +++ b/Makefile @@ -1,2 +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