summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile10
-rw-r--r--hvinfo.gpr2
2 files changed, 8 insertions, 4 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)
diff --git a/hvinfo.gpr b/hvinfo.gpr
index 29952ad..00c0463 100644
--- a/hvinfo.gpr
+++ b/hvinfo.gpr
@@ -2,7 +2,7 @@ project hvinfo is
for Languages use ("Ada");
for Source_Dirs use ("src");
- for Object_Dir use "src";
+ for Object_Dir use "build";
for Main use ("hvinfo.adb");
end hvinfo;