forked from apiaryio/drafter
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
62 lines (47 loc) · 1.28 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
-include config.mk
BUILDTYPE ?= Release
BUILD_DIR ?= ./build
PYTHON ?= python
GYP ?= ./ext/snowcrash/tools/gyp/gyp
DESTDIR ?= /usr/local
BINDIR ?= $(DESTDIR)/bin
# Default to verbose builds
V ?= 1
# Targets
all: drafter
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: libdrafter test-libdrafter test-capi drafter
./bin/test-libdrafter
./bin/test-capi
ifdef INTEGRATION_TESTS
bundle exec cucumber
endif
.PHONY: all libdrafter drafter test test-libdrafter install