This repository was archived by the owner on Nov 9, 2022. It is now read-only.
File tree Expand file tree Collapse file tree 5 files changed +27
-6
lines changed Expand file tree Collapse file tree 5 files changed +27
-6
lines changed Original file line number Diff line number Diff line change @@ -52,9 +52,13 @@ libs: ./include/rule_type.h src/parser.c src/dialect.c $(SRC_FILES) src/Makefile
5252 cd src; $(MAKE ) CC=$(CC ) $@
5353.PHONY : libs
5454
55+ libs_so : ./include/rule_type.h src/parser.c src/dialect.c $(SRC_FILES ) src/Makefile
56+ cd src; $(MAKE ) CC=$(CC ) $@
57+ .PHONY : libs_so
58+
5559.run : cli $(GHERKIN ) $(GOOD_FEATURE_FILES )
5660 $(RUN_GHERKIN ) $(GOOD_FEATURE_FILES ) | jq . > /dev/null
57- touch .run
61+ touch $@
5862
5963./include/rule_type.h : gherkin.berp gherkin-c-rule-type.razor
6064 mono berp/berp.exe -g gherkin.berp -t gherkin-c-rule-type.razor -o $@
@@ -96,3 +100,4 @@ acceptance/testdata/%.feature.source.ndjson: testdata/%.feature testdata/%.featu
96100 mkdir -p ` dirname $@ `
97101 $(RUN_GHERKIN ) --no-ast --no-pickles $< | jq --sort-keys --compact-output " ." > $@
98102 diff --unified <( jq " ." $< .source.ndjson) <( jq " ." $@ )
103+
Original file line number Diff line number Diff line change 1+ 5.0.1
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change 1- GCC_FLAGS =-c -Wall -Werror -g
2- CLANG_FLAGS =-c -Wall -Werror -g
1+ GCC_FLAGS =-c -Wall -Werror -g -fPIC
2+ CLANG_FLAGS =-c -Wall -Werror -g -fPIC
3+ GCC_SO_FLAGS =-shared
4+ MINGW_FLAGS =-c -Wall -Werror -g
35
46ifeq ($(CC ) ,i686-w64-mingw32-gcc)
57 CC=i686-w64-mingw32-gcc
68 LD=i686-w64-mingw32-gcc
7- CC_FLAGS=$(GCC_FLAGS )
9+ CC_FLAGS=$(MINGW_FLAGS )
810 AR=i686-w64-mingw32-ar
911 EXT=.exe
1012else ifeq ($(CC),clang)
@@ -25,13 +27,22 @@ LD_LIBS=-lm
2527RM_CMD =rm -rf
2628MKDIR_CMD =mkdir -p
2729
30+ VERSION =$(shell cat ../VERSION)
31+
2832all : \
29- cli \
30- ../bin/gherkin_generate_tokens$(EXT)
33+ cli \
34+ ../bin/gherkin_generate_tokens$(EXT) \
35+ libs_so
36+ .PHONY : all
3137
3238cli : ../bin/gherkin$(EXT )
39+ .PHONY : cli
3340
3441libs : ../libs/libgherkin.a
42+ .PHONY : libs
43+
44+ libs_so : ../libs/libgherkin.so.$(VERSION )
45+ .PHONY : libs_so
3546
3647clean :
3748 $(RM_CMD ) ../bin ../objs ../libs
@@ -121,6 +132,10 @@ GHERKIN_CLI_OBJS= \
121132 $(MKDIR_CMD ) $(dir $@ )
122133 $(AR ) $(AR_FLAGS ) $@ $(UTILITIES_OBJS ) $(PARSER_OBJS ) $(AST_OBJS ) $(COMPILER_OBJS ) $(PICKLES_OBJS ) $(EVENT_OBJS )
123134
135+ ../libs/libgherkin.so.$(VERSION ) : $(UTILITIES_OBJS ) $(PARSER_OBJS ) $(AST_OBJS ) $(COMPILER_OBJS ) $(PICKLES_OBJS ) $(EVENT_OBJS ) Makefile
136+ $(MKDIR_CMD ) $(dir $@ )
137+ $(CC ) $(GCC_SO_FLAGS ) $(UTILITIES_OBJS ) $(PARSER_OBJS ) $(AST_OBJS ) $(COMPILER_OBJS ) $(PICKLES_OBJS ) $(EVENT_OBJS ) -o $@
138+
124139../bin/gherkin_generate_tokens$(EXT ) : ../libs/libgherkin.a $(GENERATE_TOKEN_OBJS ) Makefile
125140 $(MKDIR_CMD ) $(dir $@ )
126141 $(LD ) $(LD_FLAGS ) $(GENERATE_TOKEN_OBJS ) -L../libs/ -lgherkin $(LD_LIBS ) -o $@
You can’t perform that action at this time.
0 commit comments