aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTheRealKeto <therealketo@gmail.com>2021-08-30 16:08:28 -0400
committerCameron Katri <me@cameronkatri.com>2021-09-01 11:18:59 -0400
commitc2f1f6f76579b941c85dbb56d6b43068a8eea9cf (patch)
tree25b24e43a0f46b5fd07d9f20d157b99d86f07bc7
parent1f108fb70b859459f7a059af001c8914516b423b (diff)
downloadsnaprestore-c2f1f6f76579b941c85dbb56d6b43068a8eea9cf.tar.gz
snaprestore-c2f1f6f76579b941c85dbb56d6b43068a8eea9cf.tar.zst
snaprestore-c2f1f6f76579b941c85dbb56d6b43068a8eea9cf.zip
Use proper Makefile syntax in rules
- Refer to rule requisites using proper syntax for rules - Declare rules that don't refer to files as phony Signed-off-by: Cameron Katri <me@cameronkatri.com>
-rw-r--r--Makefile14
1 files changed, 8 insertions, 6 deletions
diff --git a/Makefile b/Makefile
index cb49dc1..ccb9b9c 100644
--- a/Makefile
+++ b/Makefile
@@ -16,13 +16,13 @@ all: build/snaprestore
build/snaprestore: src/snaprestore.m src/ent.xml
mkdir -p build
- $(CC) $(CFLAGS) -o build/snaprestore src/snaprestore.m -framework IOKit -framework Foundation -framework CoreServices -fobjc-arc
- $(STRIP) build/snaprestore
- $(LDID) -Ssrc/ent.xml build/snaprestore
+ $(CC) $(CFLAGS) -o $@ $< -framework IOKit -framework Foundation -framework CoreServices -fobjc-arc
+ $(STRIP) $@
+ $(LDID) -S$(word 2,$^) $@
-install: build/snaprestore
- $(INSTALL) -Dm755 build/snaprestore $(DESTDIR)$(PREFIX)/bin/snaprestore
- $(INSTALL) -Dm644 LICENSE $(DESTDIR)$(PREFIX)/share/snaprestore/LICENSE
+install: build/snaprestore LICENSE
+ $(INSTALL) -Dm755 $< $(DESTDIR)$(PREFIX)/bin/snaprestore
+ $(INSTALL) -Dm644 $(word 2,$^) $(DESTDIR)$(PREFIX)/share/snaprestore/$(word 2,$^)
package: install
rm -rf staging
@@ -46,3 +46,5 @@ uninstall:
clean:
rm -f build/snaprestore
+
+.PHONY: all package uninstall clean