summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorepoch <epoch@hacking.allowed.org>2019-07-01 05:04:11 -0500
committerepoch <epoch@hacking.allowed.org>2019-07-01 05:04:11 -0500
commitfe813996b6692b07e3b34aeb366dd57e5a8ae862 (patch)
tree0b55c3cd5da1364a2fc83425f2e67f6229c8ca20 /src
parentc5ce69a867a915fc8c6993705ab36c454616319f (diff)
downloadhackvr-fe813996b6692b07e3b34aeb366dd57e5a8ae862.tar.gz
hackvr-fe813996b6692b07e3b34aeb366dd57e5a8ae862.zip
added libidc and input.o to targets
Diffstat (limited to 'src')
-rw-r--r--src/GNUmakefile60
1 files changed, 36 insertions, 24 deletions
diff --git a/src/GNUmakefile b/src/GNUmakefile
index 1799f95..01d2db6 100644
--- a/src/GNUmakefile
+++ b/src/GNUmakefile
@@ -1,55 +1,63 @@
-.PHONY: all install clean uninstall
+.PHONY: all install clean uninstall status
-CFLAGS=-Wall -pedantic -std=c99 -DGRAPHICAL -ffast-math
+PREFIX:=/usr/local/
+
+CFLAGS=-Wall -pedantic -std=c99 -DGRAPHICAL -ffast-math -I$(PREFIX)/include
+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 hackvr_fb hackvr_freeglut slowcat
+all: hackvr_headless hackvr_x11
+# hackvr_fb hackvr_freeglut slowcat
-hackvr_headless: LDLIBS=-lm
+hackvr_headless: LDLIBS=-lm -lidc
hackvr_headless: hackvr_headless.o math.o physics.o
-hackvr_x11: LDLIBS=-lm -lX11
-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
+hackvr_x11: LDLIBS=-lm -lidc -lX11
+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
#notice how all the targets have generic graphics objects up until a specific one.
-hackvr_fb: LDLIBS=-lm
+hackvr_fb: LDLIBS=-lm -lidc
hackvr_fb: hackvr_fb.o graphics_c3.o graphics_c2.o graphics_cs_fb.o math.o physics.o keyboard_die.o keyboard.o mouse_die.o
-hackvr_opengl: LDLIBS=-lm -lGL -lGLU -lglut
+hackvr_opengl: LDLIBS=-lm -lidc -lGL -lGLU -lglut
hackvr_opengl: hackvr_opengl.o graphics_c3.o graphics_c2_opengl.o graphics_cs_opengl.o math.o physics.o
-hackvr_freeglut: LDLIBS=-lm -lGL -lGLU -lglut
+hackvr_freeglut: LDLIBS=-lm -lidc -lGL -lGLU -lglut
hackvr_freeglut: hackvr_freeglut.o graphics_c3_freeglut.o math.o physics.o keyboard.o mouse_die.o keyboard_die.o
-hackvr_freeglut.o: LDLIBS=-lm -lGL -lGLU -lglut
+hackvr_freeglut.o: LDLIBS=-lm -lidc -lGL -lGLU -lglut
hackvr_freeglut.o: CFLAGS+='-DHVR_VERSION="freeglut"'
hackvr_fb.o: CFLAGS+='-DHVR_VERSION="framebuffer"'
-graphics_c3_freeglut.o: LDLIBS=-lm -lGL -lGLU -lglut
+graphics_c3_freeglut.o: LDLIBS=-lm -lidc -lGL -lGLU -lglut
-hackvr_opengl.o: LDLIBS=-lm -lGL -lGLU -lglut
+hackvr_opengl.o: LDLIBS=-lm -lidc -lGL -lGLU -lglut
hackvr_opengl.o: CFLAGS+='-DHVR_VERSION="opengl"'
-hackvr_x11.o: LDLIBS=-lm -lX11
+hackvr_x11.o: LDLIBS=-lm -lidc -lX11
hackvr_x11.o: CFLAGS+='-DHVR_VERSION="x11"'
-hackvr_headless.o: CFLAGS=-Wall -pedantic -std=c99 -ffast-math
+hackvr_headless.o: CFLAGS=-Wall -pedantic -std=c99 -ffast-math -I/home/epoch/.local/include
hackvr_headless.o: CFLAGS+='-DHVR_VERSION="headless"'
-hackvr_headless.o: LDLIBS=-lm
+hackvr_headless.o: LDLIBS=-lm -lidc
+
+graphics_c3.o: LDLIBS=-lm -lidc
+graphics_c2.o: LDLIBS=-lm -lidc
+
+physics.o: LDLIBS=-lm -lidc
-graphics_c3.o: LDLIBS=-lm
-graphics_c2.o: LDLIBS=-lm
-physics.o: LDLIBS=-lm
-keyboard.o: LDLIBS=-lm
+keyboard.o: LDLIBS=-lm -lidc
-graphics_cs_x11.o: LDLIBS=-lm -lX11
-xmouse_x11.o:LDLIBS=-lX11
+input.o: LDLIBS=-lm -lidc
+
+graphics_cs_x11.o: LDLIBS=-lm -lidc -lX11
+mouse_x11.o:LDLIBS=-lX11
keyboard_x11.o:LDLIBS=-lX11
-graphics_c2_opengl.o: LDLIBS=-lm -lGL -lGLU -lglut
-graphics_cs_opengl.o: LDLIBS=-lm -lGL -lGLU -lglut
-math.o: LDLIBS=-lm
+graphics_c2_opengl.o: LDLIBS=-lm -lidc -lGL -lGLU -lglut
+graphics_cs_opengl.o: LDLIBS=-lm -lidc -lGL -lGLU -lglut
+math.o: LDLIBS=-lm -lidc
install:
mkdir -p $(PREFIX)/bin
@@ -75,3 +83,7 @@ clean:
rm -f hackvr_fb
rm -f slowcat
rm -f *.o
+
+status:
+ cmp hackvr $(PREFIX)/bin/hackvr
+ cmp hackvr_x11 $(PREFIX)/bin/hackvr_x11