forked from devinus/markdown
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile.win
61 lines (50 loc) · 1.5 KB
/
Makefile.win
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
!IF [where /Q Makefile.auto.win]
# The file doesn't exist, so don't include it.
!ELSE
!INCLUDE Makefile.auto.win
!ENDIF
!IF [cmd /C IF NOT EXIST src\hoedown EXIT 1]
HOEDOWN_PATH = ..\hoedown
!ELSE
HOEDOWN_PATH = src\hoedown
!ENDIF
NMAKE = nmake /$(MAKEFLAGS)
MIX = mix
CFLAGS = /O2 /EHsc /I"$(HOEDOWN_PATH)\src"
all: markdown
markdown:
$(MIX) compile
Makefile.auto.win:
echo # Auto-generated as part of Makefile.win, do not modify. > $@
erl -eval "io:format(\"~s~n\", [lists:concat([\"ERTS_INCLUDE_PATH=\", code:root_dir(), \"/erts-\", erlang:system_info(version), \"/include\"])])" -s init stop -noshell >> $@
HOEDOWN_SRC = \
$(HOEDOWN_PATH)\src\autolink.obj \
$(HOEDOWN_PATH)\src\buffer.obj \
$(HOEDOWN_PATH)\src\document.obj \
$(HOEDOWN_PATH)\src\escape.obj \
$(HOEDOWN_PATH)\src\html.obj \
$(HOEDOWN_PATH)\src\html_blocks.obj \
$(HOEDOWN_PATH)\src\html_smartypants.obj \
$(HOEDOWN_PATH)\src\stack.obj \
$(HOEDOWN_PATH)\src\version.obj
hoedown.dll:
cd $(HOEDOWN_PATH)
$(NMAKE) /F Makefile.win hoedown.dll
cd $(MAKEDIR)
!IFDEF ERTS_INCLUDE_PATH
priv\markdown.dll: hoedown.dll
$(CC) $(CFLAGS) /I"$(ERTS_INCLUDE_PATH)" /LD /MD /Fe$@ $(HOEDOWN_SRC) src\markdown.c
!ELSE
priv\markdown.dll: Makefile.auto.win
$(NMAKE) /F Makefile.win priv\markdown.dll
!ENDIF
.c.obj:
$(CC) $(CFLAGS) /c $< /Fo$@
.IGNORE:
clean:
$(MIX) clean
cd $(HOEDOWN_PATH)
$(NMAKE) /F Makefile.win clean
cd $(MAKEDIR)
del /Q /F priv\markdown.dll priv\markdown.exp priv\markdown.lib markdown.obj
del /Q /F Makefile.auto.win