aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorJustin Berger <j.david.berger@gmail.com>2018-03-15 10:36:09 -0600
committerJustin Berger <j.david.berger@gmail.com>2018-03-15 10:36:09 -0600
commit3f8346dcc4b38116ea15543b62a1e859b6a47e85 (patch)
tree67bb19611859eed904ded5f400cc90a841cf4b8a /Makefile
parentf7420a8a77e1de0480ffbc4d725869dbe28147e9 (diff)
downloadlibsurvive-3f8346dcc4b38116ea15543b62a1e859b6a47e85.tar.gz
libsurvive-3f8346dcc4b38116ea15543b62a1e859b6a47e85.tar.bz2
Added first draft of epnp code
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile22
1 files changed, 19 insertions, 3 deletions
diff --git a/Makefile b/Makefile
index 1ab32d2..c61ce8e 100644
--- a/Makefile
+++ b/Makefile
@@ -2,8 +2,7 @@ all : lib data_recorder test calibrate calibrate_client simple_pose_test
CC?=gcc
-
-CFLAGS:=-Iinclude/libsurvive -fPIC -g -O3 -Iredist -flto -DUSE_DOUBLE -std=gnu99 -rdynamic
+CFLAGS:=-Iinclude/libsurvive -fPIC -g -O0 -Iredist -flto -DUSE_DOUBLE -std=gnu99 -rdynamic -fsanitize=address -fsanitize=undefined -llapacke -lcblas -lm
#LDFLAGS:=-L/usr/local/lib -lpthread -lusb-1.0 -lz -lm -flto -g
LDFLAGS:=-L/usr/local/lib -lpthread -lz -lm -flto -g
@@ -37,7 +36,7 @@ REDISTS:=redist/json_helpers.o redist/linmath.o redist/jsmn.o redist/os_generic.
ifeq ($(UNAME), Darwin)
REDISTS:=$(REDISTS) redist/hid-osx.c
endif
-LIBSURVIVE_CORE:=src/survive.o src/survive_usb.o src/survive_data.o src/survive_process.o src/ootx_decoder.o src/survive_driverman.o src/survive_default_devices.o src/survive_vive.o src/survive_playback.o src/survive_config.o src/survive_cal.o src/survive_reproject.o src/poser.o
+LIBSURVIVE_CORE:=src/survive.o src/survive_usb.o src/survive_data.o src/survive_process.o src/ootx_decoder.o src/survive_driverman.o src/survive_default_devices.o src/survive_vive.o src/survive_playback.o src/survive_config.o src/survive_cal.o src/survive_reproject.o src/poser.o src/poser_imu.o src/survive_imu.o src/epnp/epnp.c src/epnp/opencv_shim.c
#If you want to use HIDAPI on Linux.
@@ -84,6 +83,23 @@ calibrate_client : calibrate_client.c ./lib/libsurvive.so redist/os_generic.c $
static_calibrate : calibrate.c redist/os_generic.c $(DRAWFUNCTIONS) $(LIBSURVIVE_C)
tcc -o $@ $^ $(CFLAGS) $(LDFLAGS) -DTCC
+test_minimal_cv: ./src/epnp/test_minimal_cv.c ./lib/libsurvive.so
+ $(CC) -o $@ $^ $(LDFLAGS) $(CFLAGS)
+
+test_epnp: ./src/epnp/test_epnp.c ./lib/libsurvive.so
+ $(CC) -o $@ $^ $(LDFLAGS) $(CFLAGS)
+
+test_epnp_ocv: ./src/epnp/test_epnp.c ./src/epnp/epnp.c
+ $(CC) -o $@ $^ -DWITH_OPENCV -lpthread -lz -lm -flto -g -lX11 -lusb-1.0 -Iinclude/libsurvive -fPIC -g -O4 -Iredist -flto -DUSE_DOUBLE -std=gnu99 -rdynamic -fsanitize=address -fsanitize=undefined -llapack -lm -lopencv_core
+
+
+unit_test_epnp: ./src/epnp/unit_test_epnp.c ./lib/libsurvive.so
+ $(CC) -o $@ $^ $(LDFLAGS) $(CFLAGS)
+
+test_epnp_results: test_epnp test_epnp_ocv
+ -./test_epnp_ocv > opencv_output
+ -./test_epnp > our_output
+
lib:
mkdir lib