Skip to content

Commit

Permalink
Linking to static hoedown library fails on my system, so directly lin…
Browse files Browse the repository at this point in the history
…king to its object files instead.
  • Loading branch information
zambal committed Feb 8, 2014
1 parent f9e0ae2 commit 38dba41
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,16 @@ MIX = mix
ERLANG_PATH = $(shell erl -eval 'io:format("~s", [lists:concat([code:root_dir(), "/erts-", erlang:system_info(version), "/include"])])' -s init stop -noshell)
CFLAGS = -g -O3 -ansi -pedantic -Wall -Wextra -Wno-unused-parameter -Ideps/hoedown/src -I$(ERLANG_PATH)

HOEDOWN_OBJS=\
deps/hoedown/src/html.o \
deps/hoedown/src/html_smartypants.o \
deps/hoedown/src/html_blocks.o \
deps/hoedown/src/buffer.o \
deps/hoedown/src/autolink.o \
deps/hoedown/src/stack.o \
deps/hoedown/src/escape.o \
deps/hoedown/src/markdown.o

ifneq ($(OS),Windows_NT)
CFLAGS += -fPIC

Expand All @@ -19,7 +29,7 @@ markdown:

priv/markdown.so: src/markdown.c
$(MAKE) -C deps/hoedown libhoedown.a
$(CC) $(CFLAGS) -shared $(LDFLAGS) -Ldeps/hoedown -lhoedown -o $@ src/markdown.c
$(CC) $(CFLAGS) -shared $(LDFLAGS) -o $@ $(HOEDOWN_OBJS) src/markdown.c

clean:
$(MIX) clean
Expand Down

0 comments on commit 38dba41

Please sign in to comment.