aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
blob: 687d70a8511fa3632350d78833698ecd523bd723 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
SOURCE_FILES := $(shell find DomeKey lib \
	-type f \
	-name '*.h' \
	-or -name '*.m' \
	-or -name '*.c')

RUST_DIR := lib/dome-key-map
RUST_LIB := target/debug/libdome_key_map.a

DEBUG_PRODUCT := ~/Library/Developer/Xcode/DerivedData/DomeKey-*/Build/Products/Debug/DomeKey


.PHONY: build
build: $(DEBUG_PRODUCT)

$(DEBUG_PRODUCT): $(SOURCE_FILES) | $(RUST_LIB)
	xcodebuild -scheme DomeKey -configuration Debug

$(RUST_LIB):
	$(MAKE) -C $(RUST_DIR) $@

.PHONY: run
run: build
	$(DEBUG_PRODUCT)