summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLeo (Sunpeng) Li <sunpeng.li@amd.com>2018-03-22 14:29:41 -0400
committerLeo (Sunpeng) Li <sunpeng.li@amd.com>2018-05-02 10:13:30 -0400
commit5b30790fa26a5291992e7e84ddc24a321f3d6fda (patch)
treec01b3a8ddc7a5b9da55477234ee71c8f3b940375
parent523785809d55f8f9e9f6658ab3e7788f31c398f1 (diff)
Build to root dir instead.
The build dir was suppose to contain any compiled objects for easy gitignoring. However, only we only ended up with one executable. Signed-off-by: Leo (Sunpeng) Li <sunpeng.li@amd.com>
-rw-r--r--.gitignore3
-rw-r--r--Makefile6
2 files changed, 5 insertions, 4 deletions
diff --git a/.gitignore b/.gitignore
index 8ec7cb1..60bcd8f 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,3 +1,6 @@
+# Custom executable
+demo
+
# Prerequisites
*.d
diff --git a/Makefile b/Makefile
index ebabe2c..4671f54 100644
--- a/Makefile
+++ b/Makefile
@@ -6,12 +6,10 @@ LDLIBS = $(shell pkg-config --libs libdrm) -lm
# All sources
SOURCES=demo.c
-# The build directory
-BUILD=build
# All executables to be cleaned
-EXECUTABLES=$(BUILD)/demo
+EXECUTABLES=demo
-$(BUILD)/demo: demo.c
+demo: demo.c
$(CC) $(CFLAGS) $(LDFLAGS) $< $(LDLIBS) -o $@
.PHONY: clean