summaryrefslogtreecommitdiff
path: root/src/Makefile
diff options
context:
space:
mode:
authorepoch <epoch@thebackupbox.net>2020-04-12 23:50:54 -0500
committerepoch <epoch@thebackupbox.net>2020-04-12 23:50:54 -0500
commit9bd65a27745012087eb4546d77ef4964663a96a2 (patch)
treecd75158b973924794226c497a504acb2542c626e /src/Makefile
parentd9d998644defec48172fde353f0a339933800cce (diff)
downloadhackvr-9bd65a27745012087eb4546d77ef4964663a96a2.tar.gz
hackvr-9bd65a27745012087eb4546d77ef4964663a96a2.zip
added a new idea of using X11 video and /dev/input/event for input. moved hackvr script to bin like it should be. changed makefile stuff to have more consistent ordering of stuff.
Diffstat (limited to 'src/Makefile')
-rw-r--r--src/Makefile37
1 files changed, 24 insertions, 13 deletions
diff --git a/src/Makefile b/src/Makefile
index 5c83e45..045f82c 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -2,7 +2,7 @@
PREFIX:=/usr/local/
-BASE_CFLAGS=-Wall -pedantic -std=c99 -ffast-math -I$(PREFIX)/include
+BASE_CFLAGS=-g -Wall -pedantic -std=c99 -ffast-math -I$(PREFIX)/include
CFLAGS+=$(BASE_CFLAGS)
CFLAGS+=-DGRAPHICAL
@@ -10,9 +10,12 @@ CFLAGS+=-DGRAPHICAL
LDFLAGS+=-L$(PREFIX)/lib
#all: hackvr_headless hackvr_x11 hackvr_opengl slowcat ### when hackvr_opengl gets useful at all I'll start including it in default build.
-all: hackvr_headless hackvr_x11 slowcat nonblocktail
+all: hackvr_xdie hackvr_headless hackvr_x11 slowcat nonblocktail
# hackvr_fb hackvr_freeglut slowcat
+hackvr_xdie: override LDLIBS+=-lm -lidc -lX11 -lhashtable
+hackvr_xdie: hackvr_xdie.o graphics_c3.o graphics_c2.o graphics_cs_x11.o math.o physics.o keyboard.o mouse_die.o keyboard_die.o input.o
+
nonblocktail: override LDLIBS+=-lidc
nonblocktail: nonblocktail.c
@@ -34,33 +37,41 @@ hackvr_freeglut: hackvr_freeglut.o graphics_c3_freeglut.o math.o physics.o keybo
hackvr_fb.o: CFLAGS+='-DHVR_VERSION="framebuffer"'
hackvr_x11.o: CFLAGS+='-DHVR_VERSION="x11"'
+hackvr_xdie.o: CFLAGS+='-DHVR_VERSION="x11+die"'
hackvr_headless.o: CFLAGS=$(BASE_CFLAGS)
hackvr_headless.o: CFLAGS+='-DHVR_VERSION="headless"'
install: all
mkdir -p $(PREFIX)/bin
- install hackvr $(PREFIX)/bin/hackvr
- install hackvr_headless $(PREFIX)/bin/hackvr_headless
- install hackvr_x11 $(PREFIX)/bin/hackvr_x11
- install slowcat $(PREFIX)/bin/slowcat
- install nonblocktail $(PREFIX)/bin/nonblocktail
-# install hackvr_fb $(PREFIX)/bin/hackvr_fb
-# install hackvr_freeglut $(PREFIX)/bin/hackvr_freeglut
+ install -t $(PREFIX)/bin hackvr
+ install -t $(PREFIX)/bin hackvr_headless
+ install -t $(PREFIX)/bin hackvr_x11
+ install -t $(PREFIX)/bin slowcat
+ install -t $(PREFIX)/bin nonblocktail
+ install -t $(PREFIX)/bin hackvr_xdie
+# install -t $(PREFIX)/bin hackvr_fb
+# install -t $(PREFIX)/bin hackvr_freeglut
uninstall:
rm $(PREFIX)/bin/hackvr
rm $(PREFIX)/bin/hackvr_headless
rm $(PREFIX)/bin/hackvr_x11
- rm $(PREFIX)/bin/hackvr_fb
rm $(PREFIX)/bin/slowcat
+ rm $(PREFIX)/bin/nonblocktail
+ rm $(PREFIX)/bin/hackvr_xdie
+# rm $(PREFIX)/bin/hackvr_fb
+# rm $(PREFIX)/bin/hackvr_freeglut
clean:
- rm -f hackvr_freeglut
+# do *not* rm hackvr. it is a script which doesn't actually belong in this dir so...
rm -f hackvr_headless
- rm -f hackvr_opengl
rm -f hackvr_x11
- rm -f hackvr_fb
rm -f slowcat
+ rm -f nonblocktail
+ rm -f hackvr_xdie
+# rm -f hackvr_opengl
+# rm -f hackvr_fb
+# rm -f hackvr_freeglut
rm -f *.o
status: