summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorDaniil Baturin <daniil@baturin.org>2015-04-05 23:41:04 +0600
committerDaniil Baturin <daniil@baturin.org>2015-04-05 23:41:04 +0600
commit1b1b3717674ca0fb9b015e8988e1e04ed29868de (patch)
tree2a1b59c066cc943d13f8153964f478f49160f5c1 /Makefile
parentcd6b058755901dfdce6b1804b4a1cb3e9e6bbf17 (diff)
downloadhvinfo-1b1b3717674ca0fb9b015e8988e1e04ed29868de.tar.gz
hvinfo-1b1b3717674ca0fb9b015e8988e1e04ed29868de.zip
Use build/ dir for object files.
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile10
1 files changed, 7 insertions, 3 deletions
diff --git a/Makefile b/Makefile
index 6a7ee91..f3bcac9 100644
--- a/Makefile
+++ b/Makefile
@@ -3,6 +3,8 @@ BINDIR = bin
TARGET_DIR = $(PREFIX)/$(BINDIR)
+BUILD_DIR = build
+
GPRBUILD = gprbuild
GPRCLEAN = gprclean
GPRINSTALL = gprinstall
@@ -10,18 +12,20 @@ GNATPREP = gnatprep
INSTALL = install
-all: src/config.ads src/hvinfo
+all: src/config.ads hvinfo
src/config.ads: VERSION mkconfig.sh src/config.ads.in
GNATPREP=$(GNATPREP) ./mkconfig.sh
.PHONY: src/hvinfo
-src/hvinfo:
+hvinfo:
+ mkdir -p $(BUILD_DIR)
$(GPRBUILD) -Phvinfo
clean:
$(GPRCLEAN)
+ rm -rf $(BUILD_DIR)
install:
$(INSTALL) -d $(TARGET_DIR)
- $(INSTALL) src/hvinfo $(TARGET_DIR)
+ $(INSTALL) $(BUILD_DIR)/hvinfo $(TARGET_DIR)