diff options
author | epoch <epoch@hacking.allowed.org> | 2018-01-02 06:02:45 -0600 |
---|---|---|
committer | epoch <epoch@hacking.allowed.org> | 2018-01-02 06:02:45 -0600 |
commit | ecdf070d79d479655f2a75936845a454cbed84b3 (patch) | |
tree | 423d8d30a2e90cb751348e5f8d50a57abaee6768 | |
parent | 44d8f3acca9a236373df1ced55dd9ddaf76e5d2b (diff) | |
download | hackvr-ecdf070d79d479655f2a75936845a454cbed84b3.tar.gz hackvr-ecdf070d79d479655f2a75936845a454cbed84b3.zip |
added install and uninstall and a Makefile to the root dir.
-rw-r--r-- | Makefile | 22 | ||||
-rw-r--r-- | hackvr_term/Makefile | 17 | ||||
-rw-r--r-- | src/Makefile | 12 |
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 |