summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile21
1 files changed, 21 insertions, 0 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..3b9a592
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,21 @@
+LIBS=libvirt ncurses
+override CXXFLAGS += -std=c++20 -MMD -Wall `pkg-config $(LIBS) --cflags`
+override LDFLAGS += -pthread -lbible `pkg-config $(LIBS) --libs`
+SOURCES=$(wildcard src/*.cc)
+OBJECTS=$(SOURCES:.cc=.o)
+DEPS = $(OBJECTS:.o=.d)
+EXECUTABLE=nerdhack
+prefix ?= /usr
+exec_prefix ?= $(prefix)
+bindir ?= $(exec_prefix)/bin
+
+$(EXECUTABLE): $(OBJECTS)
+ $(CXX) $(OBJECTS) -o $@ $(LDFLAGS)
+
+-include $(DEPS)
+
+#install: $(EXECUTABLE)
+
+.PHONY: clean
+clean:
+ $(RM) $(OBJECTS) $(DEPS) $(EXECUTABLE)