summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile22
-rw-r--r--hackvr_term/Makefile17
-rw-r--r--src/Makefile12
3 files changed, 49 insertions, 2 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..5c9dc67
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,22 @@
+all: hackvr hackvr_term
+
+.PHONY: hackvr hackvr_term clean install uninstall all
+
+hackvr:
+ $(MAKE) -C src all
+
+hackvr_term:
+ $(MAKE) -C hackvr_term all
+
+clean:
+ $(MAKE) -C src clean
+ $(MAKE) -C hackvr_term clean
+
+install:
+ $(MAKE) -C src install
+ $(MAKE) -C hackvr_term install
+ install -D font/font.hackvr $(PREFIX)/share/hackvr/font.hackvr
+
+uninstall:
+ $(MAKE) -C src uninstall
+ $(MAKE) -C hackvr_term uninstall
diff --git a/hackvr_term/Makefile b/hackvr_term/Makefile
index dd063f4..fb33227 100644
--- a/hackvr_term/Makefile
+++ b/hackvr_term/Makefile
@@ -1,6 +1,19 @@
-CFLAGS=-pedantic
+.PHONY: all clean install uninstall
-hackvr_term: hackvr_term.c libtmt/tmt.c
+all: hackvr_term
+
+hackvr_term.o: CFLAGS=-pedantic -Wall
+libtmt/tmt.o: CFLAGS=-pedantic
+
+hackvr_term: hackvr_term.o libtmt/tmt.o
clean:
+ rm *.o
+ rm */*.o
rm hackvr_term
+
+install:
+ install hackvr_term $(PREFIX)/bin/hackvr_term
+
+uninstall:
+ [ -e $(PREFIX)/bin/hackvr_term ] && rm -i $(PREFIX)/bin/hackvr_term || echo "nothing to uninstall"
diff --git a/src/Makefile b/src/Makefile
index b7aec54..5e233f7 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -1,3 +1,5 @@
+.PHONY: all install clean uninstall
+
CFLAGS=-Wall -pedantic -std=c99 -DGRAPHICAL -ffast-math
#all: hackvr_headless hackvr_x11 hackvr_opengl slowcat ### when hackvr_opengl gets useful at all I'll start including it in default build.
@@ -29,6 +31,16 @@ graphics_c2_opengl.o: LDLIBS=-lm -lGL -lGLU -lglut
graphics_cs_opengl.o: LDLIBS=-lm -lGL -lGLU -lglut
math.o: LDLIBS=-lm
+install:
+ install hackvr $(PREFIX)/bin/hackvr
+ install hackvr_x11 $(PREFIX)/bin/hackvr_x11
+ install slowcat $(PREFIX)/bin/slowcat
+
+uninstall:
+ rm $(PREFIX)/bin/hackvr
+ rm $(PREFIX)/bin/hackvr_x11
+ rm $(PREFIX)/bin/slowcat
+
clean:
rm -f hackvr
rm -f hackvr_headless