diff options
author | Teddy Wing | 2018-11-05 01:55:09 +0100 |
---|---|---|
committer | Teddy Wing | 2018-11-05 01:55:09 +0100 |
commit | 98061d85921ab843d1c442527212f61ab4ab919e (patch) | |
tree | 44c23c625796f8a8478a1c0bb9a6709fbee02564 /Makefile | |
parent | dc6afa5e23a849fa0aefbf69bafc0c9faaf844ed (diff) | |
download | DomeKey-98061d85921ab843d1c442527212f61ab4ab919e.tar.bz2 |
Makefile: Organise targets
Split the targets into more logical sections.
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 42 |
1 files changed, 31 insertions, 11 deletions
@@ -16,6 +16,8 @@ DEBUG_PRODUCT := build/Build/Products/Debug/DomeKey RELEASE_PRODUCT := build/Build/Products/Release/DomeKey +# Build debug + .PHONY: build build: $(DEBUG_PRODUCT) @@ -25,13 +27,8 @@ $(DEBUG_PRODUCT): $(SOURCE_FILES) $(RUST_LIB) $(RUST_LIB): $(RUST_SOURCE_FILES) $(MAKE) -C $(RUST_DIR) $(RUST_LOCAL_LIB) -.PHONY: clean -clean: - xcodebuild -scheme DomeKey -configuration Debug -derivedDataPath build clean -.PHONY: run -run: build - $(DEBUG_PRODUCT) --daemon +# Build release .PHONY: build-release build-release: $(RELEASE_PRODUCT) @@ -42,9 +39,8 @@ $(RELEASE_PRODUCT): $(SOURCE_FILES) $(RUST_LIB_RELEASE) $(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 + +# Sounds DomeKey/sound_data.h: sounds/*.mp3 : > $@ @@ -55,12 +51,36 @@ DomeKey/sound_data.h: sounds/*.mp3 echo >> $@ echo '#endif /* SOUND_DATA_H */' >> $@ -doc/dome-key.1: doc/dome-key.1.txt - a2x --no-xmllint --format manpage $< + +# Clean + +.PHONY: clean +clean: + xcodebuild -scheme DomeKey -configuration Debug -derivedDataPath build clean + +.PHONY: clean-release +clean-release: + xcodebuild -scheme DomeKey -configuration Release -derivedDataPath build clean + + +# Run + +.PHONY: run +run: build + $(DEBUG_PRODUCT) --daemon + + +# Documentation .PHONY: doc doc: doc/dome-key.1 +doc/dome-key.1: doc/dome-key.1.txt + a2x --no-xmllint --format manpage $< + + +# Distribution + .PHONY: dist-all dist-all: dist/dome-key |