440 fi |
440 fi |
441 SUB_EXE_CFLAGS=$SUB_EXE_CFLAGS\ -lpcan |
441 SUB_EXE_CFLAGS=$SUB_EXE_CFLAGS\ -lpcan |
442 fi |
442 fi |
443 |
443 |
444 if [ "$SUB_CAN_DRIVER" = "peak_win32" ]; then |
444 if [ "$SUB_CAN_DRIVER" = "peak_win32" ]; then |
445 if [ "PCAN_HEADER" = "" -o "PCAN_LIB" = "" ]; then |
445 if [ "$PCAN_HEADER" = "" -o "PCAN_LIB" = "" ]; then |
446 echo "!!! ERROR !!! Please set PCAN_LIB PCAN_HEADER [PCAN_INCLUDE] to appropriate paths ! " |
446 echo "!!! ERROR !!! Please set PCAN_LIB PCAN_HEADER [PCAN_INCLUDE] to appropriate paths ! " |
447 fi |
447 fi |
448 SUB_EXE_CFLAGS=$SUB_EXE_CFLAGS\ -liberty\ \'$PCAN_LIB\' |
448 SUB_EXE_CFLAGS=$SUB_EXE_CFLAGS\ -liberty\ \'$PCAN_LIB\' |
449 if [ "$PCAN_INCLUDE" != "" ]; then |
449 echo "Converting PcanLib header files for gcc -> /drivers/can_peak_win32/cancfg.h" |
450 SUB_PROG_CFLAGS=$SUB_PROG_CFLAGS\ -I$PCAN_INCLUDE |
450 cat include/can_peak_win32/cancfg.h.head $PCAN_INCLUDE/$PCAN_HEADER > include/can_peak_win32/cancfg.h |
451 fi |
451 # second port handling |
452 SUB_PROG_CFLAGS=$SUB_PROG_CFLAGS\ \'-DPCAN_HEADER_=\"$PCAN_HEADER\"\' |
452 if [ "$PCAN2_HEADER" != "" ]; then |
|
453 echo "Stripping down second Pcan Light header " |
|
454 echo >> include/can_peak_win32/cancfg.h |
|
455 echo "// Stripped PcanLight header to prevent typedef conflicts ">> include/can_peak_win32/cancfg.h |
|
456 echo >> include/can_peak_win32/cancfg.h |
|
457 grep __stdcall $PCAN_INCLUDE/$PCAN2_HEADER >> include/can_peak_win32/cancfg.h |
|
458 SUB_EXE_CFLAGS=$SUB_EXE_CFLAGS\ \'$PCAN2_LIB\' |
|
459 fi |
|
460 echo '#define PCAN2_HEADER_' >> include/can_peak_win32/cancfg.h |
|
461 cat include/can_peak_win32/cancfg.h.tail >> include/can_peak_win32/cancfg.h |
453 fi |
462 fi |
454 |
463 |
455 if [ "$SUB_CAN_DRIVER" = "none" ]; then |
464 if [ "$SUB_CAN_DRIVER" = "none" ]; then |
456 SUB_CAN_DRIVER= |
465 SUB_CAN_DRIVER= |
457 fi |
466 fi |