From 38dace073c7bb4e793749e6dc512a5bda53030b5 Mon Sep 17 00:00:00 2001 From: Justin Berger Date: Wed, 14 Mar 2018 00:03:51 -0600 Subject: Allowed overriding of CC in makefile --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index c2aba18..1ab32d2 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,6 @@ all : lib data_recorder test calibrate calibrate_client simple_pose_test -CC:=gcc +CC?=gcc CFLAGS:=-Iinclude/libsurvive -fPIC -g -O3 -Iredist -flto -DUSE_DOUBLE -std=gnu99 -rdynamic -- cgit v1.2.3 From 3f8346dcc4b38116ea15543b62a1e859b6a47e85 Mon Sep 17 00:00:00 2001 From: Justin Berger Date: Thu, 15 Mar 2018 10:36:09 -0600 Subject: Added first draft of epnp code --- Makefile | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) (limited to 'Makefile') 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 -- cgit v1.2.3 From 2e980136715acd4692dd61be4442dc823219764d Mon Sep 17 00:00:00 2001 From: Justin Berger Date: Thu, 15 Mar 2018 14:43:58 -0600 Subject: Results out of epnp --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index c61ce8e..b619970 100644 --- a/Makefile +++ b/Makefile @@ -31,7 +31,7 @@ GRAPHICS_LOFI:=redist/CNFGFunctions.o redist/CNFGXDriver.o endif -POSERS:=src/poser_dummy.o src/poser_daveortho.o src/poser_charlesslow.o src/poser_octavioradii.o src/poser_turveytori.o +POSERS:=src/poser_dummy.o src/poser_daveortho.o src/poser_charlesslow.o src/poser_octavioradii.o src/poser_turveytori.o src/poser_epnp.o REDISTS:=redist/json_helpers.o redist/linmath.o redist/jsmn.o redist/os_generic.o ifeq ($(UNAME), Darwin) REDISTS:=$(REDISTS) redist/hid-osx.c -- cgit v1.2.3 From 49bade6bbcb351900f627f066b14a6826f6d7984 Mon Sep 17 00:00:00 2001 From: Justin Berger Date: Thu, 15 Mar 2018 15:59:08 -0600 Subject: Removed printfs, fixed a segfault --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index b619970..2eb4859 100644 --- a/Makefile +++ b/Makefile @@ -36,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 src/poser_imu.o src/survive_imu.o src/epnp/epnp.c src/epnp/opencv_shim.c +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 src/persistent_scene.o #If you want to use HIDAPI on Linux. -- cgit v1.2.3 From 0c3d7e1b48a209b4bdbb4553837fad419f0d0777 Mon Sep 17 00:00:00 2001 From: Justin Berger Date: Thu, 15 Mar 2018 16:30:12 -0600 Subject: Removed cruft from Makefile --- Makefile | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 2eb4859..4d492eb 100644 --- a/Makefile +++ b/Makefile @@ -2,7 +2,7 @@ all : lib data_recorder test calibrate calibrate_client simple_pose_test CC?=gcc -CFLAGS:=-Iinclude/libsurvive -fPIC -g -O0 -Iredist -flto -DUSE_DOUBLE -std=gnu99 -rdynamic -fsanitize=address -fsanitize=undefined -llapacke -lcblas -lm +CFLAGS:=-Iinclude/libsurvive -fPIC -g -O0 -Iredist -flto -DUSE_DOUBLE -std=gnu99 -rdynamic -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 @@ -92,14 +92,6 @@ test_epnp: ./src/epnp/test_epnp.c ./lib/libsurvive.so 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 @@ -111,7 +103,7 @@ calibrate_tcc : $(LIBSURVIVE_C) tcc -DRUNTIME_SYMNUM $(CFLAGS) -o $@ $^ $(LDFLAGS) calibrate.c redist/os_generic.c $(DRAWFUNCTIONS) redist/symbol_enumerator.c clean : - rm -rf *.o src/*.o *~ src/*~ test simple_pose_test data_recorder calibrate testCocoa lib/libsurvive.so redist/*.o redist/*~ + rm -rf *.o src/*.o *~ src/*~ test simple_pose_test data_recorder calibrate testCocoa lib/libsurvive.so test_minimal_cv test_epnp test_epnp_ocv calibrate_client redist/*.o redist/*~ -- cgit v1.2.3 From 26da6d75305d02e17e7b011ab88f6d50dcea02f0 Mon Sep 17 00:00:00 2001 From: Justin Berger Date: Thu, 15 Mar 2018 17:04:30 -0600 Subject: Refactored the minimal ocv to be in redist --- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 4d492eb..d0071a1 100644 --- a/Makefile +++ b/Makefile @@ -32,11 +32,11 @@ endif POSERS:=src/poser_dummy.o src/poser_daveortho.o src/poser_charlesslow.o src/poser_octavioradii.o src/poser_turveytori.o src/poser_epnp.o -REDISTS:=redist/json_helpers.o redist/linmath.o redist/jsmn.o redist/os_generic.o +REDISTS:=redist/json_helpers.o redist/linmath.o redist/jsmn.o redist/os_generic.o redist/minimal_opencv.o 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 src/poser_imu.o src/survive_imu.o src/epnp/epnp.c src/epnp/opencv_shim.c src/persistent_scene.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/persistent_scene.o #If you want to use HIDAPI on Linux. -- cgit v1.2.3 From 029b2909b37cc58ba35e0f46be1802866ee59730 Mon Sep 17 00:00:00 2001 From: Justin Berger Date: Thu, 15 Mar 2018 21:17:42 -0600 Subject: Forgot files --- Makefile | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index d0071a1..99d29a8 100644 --- a/Makefile +++ b/Makefile @@ -30,13 +30,12 @@ GRAPHICS_LOFI:=redist/CNFGFunctions.o redist/CNFGXDriver.o endif - POSERS:=src/poser_dummy.o src/poser_daveortho.o src/poser_charlesslow.o src/poser_octavioradii.o src/poser_turveytori.o src/poser_epnp.o REDISTS:=redist/json_helpers.o redist/linmath.o redist/jsmn.o redist/os_generic.o redist/minimal_opencv.o 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 src/poser_imu.o src/survive_imu.o src/epnp/epnp.c src/persistent_scene.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/epnp/epnp.c src/persistent_scene.o #If you want to use HIDAPI on Linux. -- cgit v1.2.3