Support scons build on Mac (#1034)
	
		
	
				
					
				
			* fix clock and add Darwin sconstruct
* it builds, this changes should be simplifications too
* fix boardd build
* that's the real type of EGLClientBuffer
* remove extra lines
* ui needs opencl on phone
old-commit-hash: f72f78f2b9
			
			
				commatwo_master
			
			
		
							parent
							
								
									0d0f17aad2
								
							
						
					
					
						commit
						b846f88ade
					
				
				 14 changed files with 106 additions and 41 deletions
			
			
		@ -1,8 +1,21 @@ | 
				
			||||
#ifndef COMMON_GLUTIL_H | 
				
			||||
#define COMMON_GLUTIL_H | 
				
			||||
 | 
				
			||||
#ifdef __APPLE__ | 
				
			||||
  #include <OpenGL/gl3.h> | 
				
			||||
#else | 
				
			||||
  #include <GLES3/gl3.h> | 
				
			||||
#endif | 
				
			||||
 | 
				
			||||
#ifdef __cplusplus | 
				
			||||
extern "C" { | 
				
			||||
#endif | 
				
			||||
 | 
				
			||||
GLuint load_shader(GLenum shaderType, const char *src); | 
				
			||||
GLuint load_program(const char *vert_src, const char *frag_src); | 
				
			||||
 | 
				
			||||
#ifdef __cplusplus | 
				
			||||
} | 
				
			||||
#endif | 
				
			||||
 | 
				
			||||
#endif | 
				
			||||
 | 
				
			||||
@ -1,15 +1,17 @@ | 
				
			||||
Import('env', 'arch', 'common', 'messaging', 'gpucommon', 'visionipc', 'cereal') | 
				
			||||
 | 
				
			||||
src = ['ui.cc', 'paint.cc', '#phonelibs/nanovg/nanovg.c'] | 
				
			||||
libs = [common, 'zmq', 'czmq', 'capnp', 'capnp_c', 'm', cereal, 'json', messaging, 'OpenCL', gpucommon, visionipc] | 
				
			||||
libs = [common, 'zmq', 'czmq', 'capnp', 'capnp_c', 'm', cereal, 'json', messaging, gpucommon, visionipc] | 
				
			||||
 | 
				
			||||
if arch == "aarch64": | 
				
			||||
  src += ['sound.cc', 'slplay.c'] | 
				
			||||
  libs += ['EGL', 'GLESv3', 'gnustl_shared', 'log', 'utils', 'gui', 'hardware', 'ui', 'CB', 'gsl', 'adreno_utils', 'OpenSLES', 'cutils', 'uuid'] | 
				
			||||
  libs += ['EGL', 'GLESv3', 'gnustl_shared', 'log', 'utils', 'gui', 'hardware', 'ui', 'CB', 'gsl', 'adreno_utils', 'OpenSLES', 'cutils', 'uuid', 'OpenCL'] | 
				
			||||
  linkflags = ['-Wl,-rpath=/system/lib64,-rpath=/system/comma/usr/lib'] | 
				
			||||
else: | 
				
			||||
  src += ['linux.cc'] | 
				
			||||
  libs += ['EGL', 'pthread', 'X11-xcb', 'xcb', 'X11', 'glfw'] | 
				
			||||
  libs += ['pthread', 'glfw'] | 
				
			||||
  linkflags = [] | 
				
			||||
   | 
				
			||||
env.Program('_ui', src, | 
				
			||||
  LINKFLAGS=['-Wl,-rpath=/system/lib64,-rpath=/system/comma/usr/lib'], | 
				
			||||
  LINKFLAGS=linkflags, | 
				
			||||
  LIBS=libs) | 
				
			||||
 | 
				
			||||
					Loading…
					
					
				
		Reference in new issue