configure
changeset 391 7802a7d5584f
parent 381 854c43cdc24a
child 398 c928fd8cb759
equal deleted inserted replaced
390:31dc4ec8710c 391:7802a7d5584f
   102 	--cc=*)		CC=$optarg;;
   102 	--cc=*)		CC=$optarg;;
   103 	--cxx=*)	CXX=$optarg;;
   103 	--cxx=*)	CXX=$optarg;;
   104 	--ld=*)		LD=$optarg;;
   104 	--ld=*)		LD=$optarg;;
   105 	--arch=*)	SUB_ARCH_NAME=$optarg;;
   105 	--arch=*)	SUB_ARCH_NAME=$optarg;;
   106 	--os=*)		SUB_OS_NAME=$optarg;;
   106 	--os=*)		SUB_OS_NAME=$optarg;;
       
   107 	--kerneldir=*)	SUB_KERNELDIR=$optarg;;
   107 	--prefix=*)	SUB_PREFIX=$optarg;;
   108 	--prefix=*)	SUB_PREFIX=$optarg;;
   108 	--target=*)	SUB_TARGET=$optarg;;
   109 	--target=*)	SUB_TARGET=$optarg;;
   109 	--can=*)	SUB_CAN_DRIVER=$optarg;;
   110 	--can=*)	SUB_CAN_DRIVER=$optarg;;
   110 	--timers=*)	SUB_TIMERS_DRIVER=$optarg;;
   111 	--timers=*)	SUB_TIMERS_DRIVER=$optarg;;
   111 	--disable-Ox)	DISABLE_OPT=1;
   112 	--disable-Ox)	DISABLE_OPT=1;
   133 		echo 	" --cc=foo      Use C compiler 'foo' instead of defaults ${CC1} or ${CC2}."
   134 		echo 	" --cc=foo      Use C compiler 'foo' instead of defaults ${CC1} or ${CC2}."
   134 		echo 	" --cxx=foo     Use C++ compiler 'foo' instead of defaults g++."
   135 		echo 	" --cxx=foo     Use C++ compiler 'foo' instead of defaults g++."
   135 		echo 	" --ld=foo      Use linker 'foo' instead of ld."
   136 		echo 	" --ld=foo      Use linker 'foo' instead of ld."
   136 		echo 	" --arch=foo    Use architecture 'foo' instead of trying to autodetect."
   137 		echo 	" --arch=foo    Use architecture 'foo' instead of trying to autodetect."
   137 		echo 	" --os=foo      Use operative system 'foo' instead of trying to autodetect."
   138 		echo 	" --os=foo      Use operative system 'foo' instead of trying to autodetect."
       
   139 		echo 	" --kerneldir=foo   Use 'foo' as kernel source directory instead of default"
   138 		echo 	" --prefix=foo  Use prefix 'foo' instead of default ${SUB_PREFIX}."
   140 		echo 	" --prefix=foo  Use prefix 'foo' instead of default ${SUB_PREFIX}."
   139 		echo 	" --target=foo  Use 'foo' as build target."
   141 		echo 	" --target=foo  Use 'foo' as build target."
   140 		echo	"               \"unix\" for unix-like systems (Linux, Cygwin)"
   142 		echo	"               \"unix\" for unix-like systems (Linux, Cygwin)"
   141 		echo	"               \"win32\" for win32 systems (native, mingw or VC++)"
   143 		echo	"               \"win32\" for win32 systems (native, mingw or VC++)"
   142 		echo	"               \"hcs12\" for HCS12 micro-controller"
   144 		echo	"               \"hcs12\" for HCS12 micro-controller"
   144 		echo	"               \"peak_linux\" use Linux build host installed Peak driver and library"
   146 		echo	"               \"peak_linux\" use Linux build host installed Peak driver and library"
   145 		echo	"                 see http://www.peak-system.com/linux/"
   147 		echo	"                 see http://www.peak-system.com/linux/"
   146 		echo	"               \"peak_win32\" use win32 PcanLight Peak driver and library with Cygwin" 
   148 		echo	"               \"peak_win32\" use win32 PcanLight Peak driver and library with Cygwin" 
   147 		echo	"                 see http://www.peak-system.com/themen/download_gb.html"
   149 		echo	"                 see http://www.peak-system.com/themen/download_gb.html"
   148 		echo	"               \"virtual\" use unix pipe based virtual can driver"
   150 		echo	"               \"virtual\" use unix pipe based virtual can driver"
       
   151 		echo	"               \"virtual_kernel\" use kernel module virtual can driver"
   149 		echo	"               \"socket\" use socket-can  "
   152 		echo	"               \"socket\" use socket-can  "
   150 		echo	"                 see http://developer.berlios.de/projects/socketcan/"
   153 		echo	"                 see http://developer.berlios.de/projects/socketcan/"
   151 		echo	"               \"lincan\" lincan driver"
   154 		echo	"               \"lincan\" lincan driver"
   152 		echo	"                 see http://www.ocera.org/download/components/WP7/lincan-0.3.3.html"
   155 		echo	"                 see http://www.ocera.org/download/components/WP7/lincan-0.3.3.html"
   153 		echo	"               \"can4linux\" can4linux driver"
   156 		echo	"               \"can4linux\" can4linux driver"
   154 		echo	"                 see http://www.port.de/engl/canprod/hw_can4linux.html"
   157 		echo	"                 see http://www.port.de/engl/canprod/hw_can4linux.html"
   155 		echo 	" --timers=foo  Use 'foo' as TIMERS driver (can be either 'unix' or 'xeno')"
   158 		echo 	" --timers=foo  Use 'foo' as TIMERS driver (can be 'unix', 'xeno' or 'kernel')"
   156 		echo 	" --disable-dll Disable run-time dynamic linking of can, led and nvram drivers"
   159 		echo 	" --disable-dll Disable run-time dynamic linking of can, led and nvram drivers"
   157 		echo 	" --enable-lss  Enable the LSS services"
   160 		echo 	" --enable-lss  Enable the LSS services"
   158 		echo 	" --enable-lss-fs  Enable the LSS FastScan service"
   161 		echo 	" --enable-lss-fs  Enable the LSS FastScan service"
   159 		echo	" --disable-Ox  Disable gcc \"-Ox\" optimizations."
   162 		echo	" --disable-Ox  Disable gcc \"-Ox\" optimizations."
   160 		echo	" --debug=foo,foo,..   Enable debug messages, ERR -> only errors, WAR)."
   163 		echo	" --debug=foo,foo,..   Enable debug messages, ERR -> only errors, WAR)."
   383 
   386 
   384 if [ "$SUB_TIMERS_DRIVER" = "xeno" ]; then
   387 if [ "$SUB_TIMERS_DRIVER" = "xeno" ]; then
   385 	SUB_EXE_CFLAGS=$SUB_EXE_CFLAGS\ -lnative\ -lrtdm\ -L`$XENO_CONFIG --library-dir`
   388 	SUB_EXE_CFLAGS=$SUB_EXE_CFLAGS\ -lnative\ -lrtdm\ -L`$XENO_CONFIG --library-dir`
   386 	SUB_PROG_CFLAGS=$SUB_PROG_CFLAGS\ `$XENO_CONFIG --xeno-cflags`
   389 	SUB_PROG_CFLAGS=$SUB_PROG_CFLAGS\ `$XENO_CONFIG --xeno-cflags`
   387 	RTCAN_SOCKET=1
   390 	RTCAN_SOCKET=1
       
   391 fi
       
   392 
       
   393 if [ "$SUB_TIMERS_DRIVER" = "kernel" ]; then
       
   394 	DISABLE_DLL=1
       
   395 	if [ "$SUB_KERNELDIR" = "" ]; then
       
   396 		# use directory of current kernel
       
   397 		SUB_KERNELDIR=/lib/modules/$(uname -r)/build
       
   398 	fi
   388 fi
   399 fi
   389 
   400 
   390 if [ "$SUB_TIMERS_DRIVER" = "none" ]; then
   401 if [ "$SUB_TIMERS_DRIVER" = "none" ]; then
   391 	SUB_TIMERS_DRIVER=
   402 	SUB_TIMERS_DRIVER=
   392 fi
   403 fi
   668 fi
   679 fi
   669 
   680 
   670 # Target dependent Makefiles
   681 # Target dependent Makefiles
   671 MAKEFILES=$MAKEFILES\ drivers/$SUB_TARGET/Makefile.in
   682 MAKEFILES=$MAKEFILES\ drivers/$SUB_TARGET/Makefile.in
   672 
   683 
   673 if [ "$SUB_TARGET" = "unix" ]; then
   684 if [ "$SUB_TARGET" = "unix" -a "$SUB_TIMERS_DRIVER" = "kernel" ]; then
       
   685 	MAKEFILES=$MAKEFILES\
       
   686 \	examples/kerneltest/Makefile.in
       
   687 
       
   688 elif [ "$SUB_TARGET" = "unix" ]; then
   674 	MAKEFILES=$MAKEFILES\
   689 	MAKEFILES=$MAKEFILES\
   675 \	examples/TestMasterSlave/Makefile.in\
   690 \	examples/TestMasterSlave/Makefile.in\
   676 \	examples/TestMasterSlaveLSS/Makefile.in
   691 \	examples/TestMasterSlaveLSS/Makefile.in\
   677 fi
       
   678 
       
   679 if [ "$SUB_TARGET" = "unix" ]; then
       
   680 	MAKEFILES=$MAKEFILES\
       
   681 \	examples/TestMasterMicroMod/Makefile.in
   692 \	examples/TestMasterMicroMod/Makefile.in
   682 fi
   693 fi
   683 
   694 
   684 if [ "$SUB_TARGET" = "win32" ]; then
   695 if [ "$SUB_TARGET" = "win32" ]; then
   685 	MAKEFILES=$MAKEFILES\
   696 	MAKEFILES=$MAKEFILES\
   706 	s:SUB_CC:${CC}:
   717 	s:SUB_CC:${CC}:
   707 	s:SUB_CXX:${CXX}:
   718 	s:SUB_CXX:${CXX}:
   708 	s:SUB_LD:${LD}:
   719 	s:SUB_LD:${LD}:
   709 	s:SUB_PROG_CFLAGS:${SUB_PROG_CFLAGS}:
   720 	s:SUB_PROG_CFLAGS:${SUB_PROG_CFLAGS}:
   710 	s:SUB_EXE_CFLAGS:${SUB_EXE_CFLAGS}:
   721 	s:SUB_EXE_CFLAGS:${SUB_EXE_CFLAGS}:
       
   722 	s:SUB_KERNELDIR:${SUB_KERNELDIR}:
   711 	s:SUB_PREFIX:${SUB_PREFIX}:
   723 	s:SUB_PREFIX:${SUB_PREFIX}:
   712 	s:SUB_OS_NAME:${SUB_OS_NAME}:
   724 	s:SUB_OS_NAME:${SUB_OS_NAME}:
   713 	s:SUB_ARCH_NAME:${SUB_ARCH_NAME}:
   725 	s:SUB_ARCH_NAME:${SUB_ARCH_NAME}:
   714 	s:SUB_OPT_CFLAGS:${SUB_OPT_CFLAGS}:
   726 	s:SUB_OPT_CFLAGS:${SUB_OPT_CFLAGS}:
   715 	s:SUB_TARGET:${SUB_TARGET}:
   727 	s:SUB_TARGET:${SUB_TARGET}: