@@ -92,14 +92,7 @@ RUNTIME_CXXS_$(1)_$(2) := \
92
92
rt/rust_android_dummy.cpp \
93
93
rt/rust_test_helpers.cpp
94
94
95
- RUNTIME_CS_$(1 ) _$(2 ) := rt/sundown/src/autolink.c \
96
- rt/sundown/src/buffer.c \
97
- rt/sundown/src/stack.c \
98
- rt/sundown/src/markdown.c \
99
- rt/sundown/html/houdini_href_e.c \
100
- rt/sundown/html/houdini_html_e.c \
101
- rt/sundown/html/html_smartypants.c \
102
- rt/sundown/html/html.c
95
+ RUNTIME_CS_$(1 ) _$(2 ) :=
103
96
104
97
RUNTIME_S_$(1 ) _$(2 ) := rt/arch/$$(HOST_$(1 ) ) /_context.S \
105
98
rt/arch/$$(HOST_$(1 ) ) /record_sp.S
@@ -109,8 +102,6 @@ RT_BUILD_DIR_$(1)_$(2) := $$(RT_OUTPUT_DIR_$(1))/stage$(2)
109
102
RUNTIME_DEF_$(1 ) _$(2 ) := $$(RT_OUTPUT_DIR_$(1 ) ) /rustrt$$(CFG_DEF_SUFFIX_$(1 ) )
110
103
RUNTIME_INCS_$(1 ) _$(2 ) := -I $$(S ) src/rt -I $$(S ) src/rt/isaac -I $$(S ) src/rt/uthash \
111
104
-I $$(S ) src/rt/arch/$$(HOST_$(1 ) ) \
112
- -I $$(S ) src/rt/sundown/src \
113
- -I $$(S ) src/rt/sundown/html \
114
105
-I $$(S ) src/libuv/include
115
106
RUNTIME_OBJS_$(1 ) _$(2 ) := $$(RUNTIME_CXXS_$(1 ) _$(2 ) :rt/%.cpp=$$(RT_BUILD_DIR_$(1 ) _$(2 ) ) /%.o ) \
116
107
$$(RUNTIME_CS_$(1 ) _$(2 ) :rt/%.c=$$(RT_BUILD_DIR_$(1 ) _$(2 ) ) /%.o ) \
@@ -242,6 +233,33 @@ $$(LIBUV_LIB_$(1)): $$(LIBUV_DEPS) $$(LIBUV_MAKEFILE_$(1))
242
233
NO_LOAD=" $$ (LIBUV_NO_LOAD)" \
243
234
V=$$(VERBOSE )
244
235
endif
236
+
237
+ SUNDOWN_NAME_$(1 ) := $$(call CFG_STATIC_LIB_NAME_$(1 ) ,sundown)
238
+ SUNDOWN_DIR_$(1 ) := $$(RT_OUTPUT_DIR_$(1 ) ) /sundown
239
+ SUNDOWN_LIB_$(1 ) := $$(SUNDOWN_DIR_$(1 ) ) /$$(SUNDOWN_NAME_$(1 ) )
240
+
241
+ SUNDOWN_CS_$(1 ) := rt/sundown/src/autolink.c \
242
+ rt/sundown/src/buffer.c \
243
+ rt/sundown/src/stack.c \
244
+ rt/sundown/src/markdown.c \
245
+ rt/sundown/html/houdini_href_e.c \
246
+ rt/sundown/html/houdini_html_e.c \
247
+ rt/sundown/html/html_smartypants.c \
248
+ rt/sundown/html/html.c
249
+
250
+ SUNDOWN_OBJS_$(1 ) := $$(SUNDOWN_CS_$(1 ) :rt/%.c=$$(SUNDOWN_DIR_$(1 ) ) /%.o )
251
+
252
+ $$(SUNDOWN_DIR_$(1 ) ) /%.o: rt/%.c
253
+ @$$(call E, compile: $$@ )
254
+ @mkdir -p $$(@D )
255
+ $$(Q )$$(call CFG_COMPILE_C_$(1 ) , $$@ , \
256
+ -I $$(S ) src/rt/sundown/src -I $$(S ) src/rt/sundown/html \
257
+ $$(RUNTIME_CFLAGS_$(1 ) ) ) $$<
258
+
259
+ $$(SUNDOWN_LIB_$(1 ) ) : $$(SUNDOWN_OBJS_$(1 ) )
260
+ @$$(call E, link: $$@ )
261
+ $$(Q )$$(AR_$(1 ) ) rcs $$@ $$^
262
+
245
263
endef
246
264
247
265
# Instantiate template for all stages/targets
0 commit comments