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 file necessary for this command is already taken care
of with the Makefile that lives in the project's root directory.
  • Loading branch information...
1 parent fd60250 commit 7c175b914c204d134bfeea37dc50bd92e6768034 @listx listx committed Jun 28, 2012
Showing with 9 additions and 0 deletions.
  1. +9 −0 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 =
+LFLAGS = -shared -Wl,-soname,
+%.o: %.c
+ $(CC) $(CFLAGS) -c -fPIC $<
+yaml: $(OBJECTS)
+ $(CC) $(LFLAGS) -o $(LIB) $(OBJECTS)

0 comments on commit 7c175b9

Please sign in to comment.