Skip to content

Instantly share code, notes, and snippets.

@listx
Created June 27, 2012 21:05
Show Gist options
  • Save listx/3006843 to your computer and use it in GitHub Desktop.
Save listx/3006843 to your computer and use it in GitHub Desktop.
libyaml makefile
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 libyaml.so $(OBJECTS)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment