Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

add Makefile for bundled C libyaml library

It is now possible to load up Text/Libyaml.hs into GHCi. First, run
`make yaml` under libyaml/, then do

    ghci Text/Libyaml.hs -L./libyaml -lyaml -L. -lhelper

. The libhelper.so file necessary for this command is already taken care
of with the Makefile that lives in the project's root directory.
  • Loading branch information...
commit 7c175b914c204d134bfeea37dc50bd92e6768034 1 parent fd60250
@listx listx authored
Showing with 9 additions and 0 deletions.
  1. +9 −0 libyaml/Makefile
View
9 libyaml/Makefile
@@ -0,0 +1,9 @@
+CC = gcc
+CFLAGS = -shared
+OBJECTS = api.o dumper.o emitter.o loader.o parser.o reader.o scanner.o writer.o
+LIB = libyaml.so
+LFLAGS = -shared -Wl,-soname,libyaml.so
+%.o: %.c
+ $(CC) $(CFLAGS) -c -fPIC $<
+yaml: $(OBJECTS)
+ $(CC) $(LFLAGS) -o $(LIB) $(OBJECTS)
Please sign in to comment.
Something went wrong with that request. Please try again.