From 768a06613e38194e58d37ab3b1c5bb4a326f0e2b Mon Sep 17 00:00:00 2001 From: ultramn Date: Thu, 16 Mar 2017 17:17:07 -0700 Subject: Almost compiles on Apple (not quite there) --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 525f7c5..cac4135 100644 --- a/Makefile +++ b/Makefile @@ -3,7 +3,7 @@ all : lib data_recorder test calibrate calibrate_client CC:=gcc CFLAGS:=-Iinclude/libsurvive -I. -fPIC -g -O3 -Iredist -flto -DUSE_DOUBLE -std=gnu99 -rdynamic -LDFLAGS:=-lpthread -lusb-1.0 -lz -lX11 -lm -flto -g +LDFLAGS:=-L/usr/local/lib -lpthread -lusb-1.0 -lz -lX11 -lm -flto -g POSERS:=src/poser_dummy.o src/poser_daveortho.o src/poser_charlesslow.o REDISTS:=redist/json_helpers.o redist/linmath.o redist/jsmn.o -- cgit v1.2.3 From 5cc41bddc37f8ed116575dddab34b514a417c883 Mon Sep 17 00:00:00 2001 From: ultramn Date: Thu, 16 Mar 2017 18:17:40 -0700 Subject: Modified Makefile to compile on Mac --- Makefile | 29 ++++++++++++++++++++++++----- 1 file changed, 24 insertions(+), 5 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index cac4135..11f18f9 100644 --- a/Makefile +++ b/Makefile @@ -2,11 +2,31 @@ all : lib data_recorder test calibrate calibrate_client CC:=gcc + CFLAGS:=-Iinclude/libsurvive -I. -fPIC -g -O3 -Iredist -flto -DUSE_DOUBLE -std=gnu99 -rdynamic -LDFLAGS:=-L/usr/local/lib -lpthread -lusb-1.0 -lz -lX11 -lm -flto -g +LDFLAGS:=-L/usr/local/lib -lpthread -lusb-1.0 -lz -lm -flto -g + +#---------- +# Platform specific changes to CFLAGS/LDFLAGS +#---------- +UNAME=$(shell uname) + +# Mac OSX +ifeq ($(UNAME), Darwin) +DRAWFUNCTIONS_C=redist/RawDrawNull.c +GRAPHICS_LOFI:=redist/RawDrawNull.o + +# Linux / FreeBSD +else +LDFLAGS:=$(LDFLAGS) -lX11 +DRAWFUNCTIONS_C=redist/XDriver.c redist/DrawFunctions.c +GRAPHICS_LOFI:=redist/DrawFunctions.o redist/XDriver.o + +endif + POSERS:=src/poser_dummy.o src/poser_daveortho.o src/poser_charlesslow.o -REDISTS:=redist/json_helpers.o redist/linmath.o redist/jsmn.o +REDISTS:=redist/json_helpers.o redist/linmath.o redist/jsmn.o redist/os_generic.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_vive.o src/survive_config.o src/survive_cal.o LIBSURVIVE_CORE:=$(LIBSURVIVE_CORE) LIBSURVIVE_O:=$(POSERS) $(REDISTS) $(LIBSURVIVE_CORE) @@ -21,7 +41,6 @@ LIBSURVIVE_C:=$(LIBSURVIVE_O:.o=.c) # -DRUNTIME_SYMNUM = Don't assume __attribute__((constructor)) works. Instead comb for anything starting with REGISTER. -GRAPHICS_LOFI:=redist/DrawFunctions.o redist/XDriver.o # unused: redist/crc32.c @@ -38,7 +57,7 @@ calibrate_client : calibrate_client.c ./lib/libsurvive.so redist/os_generic.c $ $(CC) -o $@ $^ $(LDFLAGS) $(CFLAGS) ## Still not working!!! Don't use. -static_calibrate : calibrate.c redist/os_generic.c redist/XDriver.c redist/DrawFunctions.c $(LIBSURVIVE_C) +static_calibrate : calibrate.c redist/os_generic.c $(DRAWFUNCTIONS) $(LIBSURVIVE_C) tcc -o $@ $^ $(CFLAGS) $(LDFLAGS) -DTCC lib: @@ -49,7 +68,7 @@ lib/libsurvive.so : $(LIBSURVIVE_O) calibrate_tcc : $(LIBSURVIVE_C) - tcc -DRUNTIME_SYMNUM $(CFLAGS) -o $@ $^ $(LDFLAGS) calibrate.c redist/XDriver.c redist/os_generic.c redist/DrawFunctions.c redist/symbol_enumerator.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 data_recorder lib/libsurvive.so redist/*.o redist/*~ -- cgit v1.2.3 From 1837afbe2aa17af10fa508d71807912b0da6ec50 Mon Sep 17 00:00:00 2001 From: ultramn Date: Thu, 16 Mar 2017 18:22:32 -0700 Subject: Makefile now compiles on Mac --- Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 11f18f9..03f37d6 100644 --- a/Makefile +++ b/Makefile @@ -13,13 +13,13 @@ UNAME=$(shell uname) # Mac OSX ifeq ($(UNAME), Darwin) -DRAWFUNCTIONS_C=redist/RawDrawNull.c -GRAPHICS_LOFI:=redist/RawDrawNull.o +DRAWFUNCTIONS=redist/DrawFunctions.c redist/RawDrawNull.c +GRAPHICS_LOFI:=redist/DrawFunctions.o redist/RawDrawNull.o # Linux / FreeBSD else LDFLAGS:=$(LDFLAGS) -lX11 -DRAWFUNCTIONS_C=redist/XDriver.c redist/DrawFunctions.c +DRAWFUNCTIONS=redist/DrawFunctions.c redist/XDriver.c GRAPHICS_LOFI:=redist/DrawFunctions.o redist/XDriver.o endif -- cgit v1.2.3 From 195053d034b2bca63db1f72be14bff9b2c7b1916 Mon Sep 17 00:00:00 2001 From: cnlohr Date: Fri, 17 Mar 2017 01:13:42 -0400 Subject: bump rawdraw to newest version. --- Makefile | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 03f37d6..a642877 100644 --- a/Makefile +++ b/Makefile @@ -13,14 +13,14 @@ UNAME=$(shell uname) # Mac OSX ifeq ($(UNAME), Darwin) -DRAWFUNCTIONS=redist/DrawFunctions.c redist/RawDrawNull.c -GRAPHICS_LOFI:=redist/DrawFunctions.o redist/RawDrawNull.o +DRAWFUNCTIONS=redist/CNFGFunctions.c redist/CNFGNullDriver.c +GRAPHICS_LOFI:=redist/CNFGFunctions.o redist/CNFGNullDriver.o # Linux / FreeBSD else LDFLAGS:=$(LDFLAGS) -lX11 -DRAWFUNCTIONS=redist/DrawFunctions.c redist/XDriver.c -GRAPHICS_LOFI:=redist/DrawFunctions.o redist/XDriver.o +DRAWFUNCTIONS=redist/CNFGFunctions.c redist/CNFGXDriver.c +GRAPHICS_LOFI:=redist/CNFGFunctions.o redist/CNFGXDriver.o endif -- cgit v1.2.3