This repository has been archived by the owner on Nov 8, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 54
/
Makefile
88 lines (67 loc) · 2.22 KB
/
Makefile
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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
-include config.mk
BUILDTYPE ?= Release
BUILD_DIR ?= ./build
PYTHON ?= python
GYP ?= ./tools/gyp/gyp
DESTDIR ?= /usr/local
BINDIR ?= $(DESTDIR)/bin
# Default to verbose builds
V ?= 1
# Targets
all: drafter
libapib: config.gypi $(BUILD_DIR)/Makefile
$(MAKE) -C $(BUILD_DIR) V=$(V) $@
test-libapib: config.gypi $(BUILD_DIR)/Makefile
$(MAKE) -C $(BUILD_DIR) V=$(V) $@
mkdir -p ./bin
cp -f $(BUILD_DIR)/out/$(BUILDTYPE)/$@ ./bin/$@
libapib-parser: config.gypi $(BUILD_DIR)/Makefile
$(MAKE) -C $(BUILD_DIR) V=$(V) $@
test-libapib-parser: config.gypi $(BUILD_DIR)/Makefile
$(MAKE) -C $(BUILD_DIR) V=$(V) $@
mkdir -p ./bin
cp -f $(BUILD_DIR)/out/$(BUILDTYPE)/$@ ./bin/$@
test-libapib-parser-perf: config.gypi $(BUILD_DIR)/Makefile
$(MAKE) -C $(BUILD_DIR) V=$(V) $@
mkdir -p ./bin
cp -f $(BUILD_DIR)/out/$(BUILDTYPE)/$@ ./bin/$@
libdrafter: config.gypi $(BUILD_DIR)/Makefile
$(MAKE) -C $(BUILD_DIR) V=$(V) $@
test-libdrafter: config.gypi $(BUILD_DIR)/Makefile
$(MAKE) -C $(BUILD_DIR) V=$(V) $@
mkdir -p ./bin
cp -f $(BUILD_DIR)/out/$(BUILDTYPE)/$@ ./bin/$@
drafter: config.gypi $(BUILD_DIR)/Makefile
$(MAKE) -C $(BUILD_DIR) V=$(V) $@
mkdir -p ./bin
cp -f $(BUILD_DIR)/out/$(BUILDTYPE)/$@ ./bin/$@
test-capi: config.gypi $(BUILD_DIR)/Makefile
$(MAKE) -C $(BUILD_DIR) V=$(V) $@
mkdir -p ./bin
cp -f $(BUILD_DIR)/out/$(BUILDTYPE)/$@ ./bin/$@
install: drafter
mkdir -p $(BINDIR)
cp -f $(BUILD_DIR)/out/$(BUILDTYPE)/drafter $(BINDIR)/drafter
config.gypi: configure
$(PYTHON) ./configure
$(BUILD_DIR)/Makefile:
$(GYP) -f make --generator-output $(BUILD_DIR) --depth=.
clean:
rm -rf $(BUILD_DIR)/out
rm -rf ./bin
distclean:
rm -rf ./build
rm -f ./config.mk
rm -f ./config.gypi
rm -rf ./bin
test: libapib test-libapib libapib-parser test-libapib-parser libdrafter test-libdrafter test-capi drafter
./bin/test-libapib
./bin/test-libapib-parser
./bin/test-libdrafter
./bin/test-capi
ifdef INTEGRATION_TESTS
bundle exec cucumber
endif
perf: libapib-parser test-libapib-parser-perf
./bin/test-libapib-parser-perf ./packages/apib-parser/test/snowcrash/performance/fixtures/fixture-1.apib
.PHONY: all libapib test-libapib libapib-parser libdrafter drafter test test-libapib-parser test-libdrafter perf test-libapib-parser-perf install