Ver Fonte

Update main Makefile.

parazyd há 4 anos atrás
pai
commit
697e2f3ea6
1 ficheiros alterados com 14 adições e 20 exclusões
  1. 14 20
      Makefile

+ 14 - 20
Makefile

@@ -7,29 +7,23 @@ PREFIX = /usr/local
 CARGO = cargo
 
 # Binaries to be built
-BINS = drk darkfid gatewayd 
+BINS = drk darkfid gatewayd
 
-# Dependencies which should force the binaries to be rebuilt
+# Common dependencies which should force the binaries to be rebuilt
 BINDEPS = \
 	Cargo.toml \
 	$(shell find src -type f) \
 	$(shell find sql -type f) \
-	$(shell find contrib/token -type f) \
+	$(shell find contrib/token -type f)
 
-#all: $(BINS)
 all: $(BINS)
 
-check:
-	$(CARGO) hack check --feature-powerset --no-dev-deps
-
 $(BINS): $(BINDEPS)
-	$(CARGO) build --workspace --release --all-features
-	cp -f target/release/$@ $@
+	$(MAKE) -C bin/$@
+	cp -f bin/$@/$@ $@
 
-test:
-	$(CARGO) test --release --all-features
-	$(CARGO) build --release --all-features --bin tx
-	./target/release/tx
+check:
+	$(CARGO) hack check --release --feature-powerset --no-dev-deps
 
 fix:
 	$(CARGO) clippy --release --all-features --fix --allow-dirty
@@ -37,6 +31,12 @@ fix:
 clippy:
 	$(CARGO) clippy --release --all-features
 
+test:
+	$(CARGO) test --release --all-features
+
+clean:
+	rm -f $(BINS)
+
 install: all
 	mkdir -p $(DESTDIR)$(PREFIX)/bin
 	mkdir -p $(DESTDIR)$(PREFIX)/share/darkfi
@@ -55,10 +55,4 @@ uninstall:
 	rm -rf $(DESTDIR)$(PREFIX)/share/doc/darkfi
 	rm -rf $(DESTDIR)$(PREFIX)/share/darkfi
 
-clean:
-	rm -f $(BINS)
-
-distclean: clean
-	rm -rf target
-
-.PHONY: all check test fix clippy install uninstall clean distclean
+.PHONY: all check fix clippy test clean install uninstall