summaryrefslogtreecommitdiff
path: root/src/Makefile
diff options
context:
space:
mode:
authorepoch <epoch@hack.thebackupbox.net>2020-04-14 11:50:30 +0000
committerepoch <epoch@hack.thebackupbox.net>2020-04-14 11:50:30 +0000
commit459bff40e078a3979573000a903b288bcc9a8d3f (patch)
treecd8e75a66129042803729924352de80d7a5f5041 /src/Makefile
parentede4c08f4f15a516a748f8ed89b4f6b06b845c2a (diff)
parent9f5c79eff1a3fae473bbdd12afcb77875d8548af (diff)
downloadhackvr-459bff40e078a3979573000a903b288bcc9a8d3f.tar.gz
hackvr-459bff40e078a3979573000a903b288bcc9a8d3f.zip
Merge branch 'master' of /var/git/hackvr
Diffstat (limited to 'src/Makefile')
-rw-r--r--src/Makefile39
1 files changed, 25 insertions, 14 deletions
diff --git a/src/Makefile b/src/Makefile
index 5c83e45..5803a1a 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_fb 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
+
nonblocktail: override LDLIBS+=-lidc
nonblocktail: nonblocktail.c
@@ -20,7 +23,8 @@ hackvr_headless: override LDLIBS+=-lm -lidc -lhashtable
hackvr_headless: hackvr_headless.o math.o physics.o
hackvr_x11: override LDLIBS+=-lm -lidc -lX11 -lhashtable
-hackvr_x11: hackvr_x11.o graphics_c3.o graphics_c2.o graphics_cs_x11.o math.o physics.o keyboard.o mouse_x11.o keyboard_x11.o input.o
+hackvr_x11: hackvr_x11.o graphics_c3.o graphics_c2.o graphics_cs_x11.o math.o physics.o keyboard.o mouse_x11.o keyboard_x11.o
+
#notice how all the targets have generic graphics objects up until a specific one.
hackvr_fb: override LDLIBS+=-lm -lidc -lhashtable
@@ -34,33 +38,40 @@ 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_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: