aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--DomeKey.xcodeproj/project.pbxproj2
-rw-r--r--DomeKey/HeadphoneKey.h2
-rw-r--r--Makefile23
3 files changed, 23 insertions, 4 deletions
diff --git a/DomeKey.xcodeproj/project.pbxproj b/DomeKey.xcodeproj/project.pbxproj
index 110ee5b..3a36d4a 100644
--- a/DomeKey.xcodeproj/project.pbxproj
+++ b/DomeKey.xcodeproj/project.pbxproj
@@ -407,6 +407,7 @@
isa = XCBuildConfiguration;
buildSettings = {
CODE_SIGN_STYLE = Automatic;
+ HEADER_SEARCH_PATHS = "$(PROJECT_DIR)/lib/DDHidLib/lib";
LIBRARY_SEARCH_PATHS = (
"$(inherited)",
"$(PROJECT_DIR)/lib/dome-key-map/target/debug",
@@ -421,6 +422,7 @@
isa = XCBuildConfiguration;
buildSettings = {
CODE_SIGN_STYLE = Automatic;
+ HEADER_SEARCH_PATHS = "$(PROJECT_DIR)/lib/DDHidLib/lib";
LIBRARY_SEARCH_PATHS = (
"$(inherited)",
"$(PROJECT_DIR)/lib/dome-key-map/target/debug",
diff --git a/DomeKey/HeadphoneKey.h b/DomeKey/HeadphoneKey.h
index 4496785..934def5 100644
--- a/DomeKey/HeadphoneKey.h
+++ b/DomeKey/HeadphoneKey.h
@@ -7,7 +7,7 @@
//
#import <Foundation/Foundation.h>
-#import <DDHidLib/DDHidAppleMikey.h>
+#import "DDHidAppleMikey.h"
#import "Mappings.h"
#import "Sounds.h"
diff --git a/Makefile b/Makefile
index b7d74f0..28583ea 100644
--- a/Makefile
+++ b/Makefile
@@ -9,26 +9,43 @@ RUST_LOCAL_LIB := target/debug/libdome_key_map.a
RUST_LIB := $(RUST_DIR)/$(RUST_LOCAL_LIB)
RUST_SOURCE_FILES := $(shell find $(RUST_DIR)/src -type f -name '*.rs')
-DEBUG_PRODUCT := ~/Library/Developer/Xcode/DerivedData/DomeKey-*/Build/Products/Debug/DomeKey
+RUST_LOCAL_LIB_RELEASE := target/release/libdome_key_map.a
+RUST_LIB_RELEASE := $(RUST_DIR)/$(RUST_LOCAL_LIB_RELEASE)
+
+DEBUG_PRODUCT := build/Build/Products/Debug/DomeKey
+RELEASE_PRODUCT := build/Build/Products/Release/DomeKey
.PHONY: build
build: $(DEBUG_PRODUCT)
$(DEBUG_PRODUCT): $(SOURCE_FILES) $(RUST_LIB)
- xcodebuild -scheme DomeKey -configuration Debug
+ xcodebuild -scheme DomeKey -configuration Debug -derivedDataPath build
$(RUST_LIB): $(RUST_SOURCE_FILES)
$(MAKE) -C $(RUST_DIR) $(RUST_LOCAL_LIB)
.PHONY: clean
clean:
- xcodebuild -scheme DomeKey -configuration Debug clean
+ xcodebuild -scheme DomeKey -configuration Debug -derivedDataPath build clean
.PHONY: run
run: build
$(DEBUG_PRODUCT) --daemon
+.PHONY: build-release
+build-release: $(RELEASE_PRODUCT)
+
+$(RELEASE_PRODUCT): $(SOURCE_FILES) $(RUST_LIB_RELEASE)
+ xcodebuild -scheme DomeKey -configuration Release -derivedDataPath build
+
+$(RUST_LIB_RELEASE): $(RUST_SOURCE_FILES)
+ $(MAKE) -C $(RUST_DIR) $(RUST_LOCAL_LIB_RELEASE)
+
+.PHONY: clean-release
+clean-release:
+ xcodebuild -scheme DomeKey -configuration Release -derivedDataPath build clean
+
DomeKey/sound_data.h: sounds/*.mp3
: > $@
echo '#ifndef SOUND_DATA_H' >> $@