diff --git a/bsp/abstract-machine/Makefile b/bsp/abstract-machine/Makefile index d38542f..8ecdb37 100644 --- a/bsp/abstract-machine/Makefile +++ b/bsp/abstract-machine/Makefile @@ -5,6 +5,7 @@ RTCONFIG_H = rtconfig.h NAME = rtthread SRCS = +CFLAGS += -DHAVE_CCONFIG_H -D__RTTHREAD__ -include $(FILE_MK) include $(AM_HOME)/Makefile @@ -18,6 +19,7 @@ $(FILE_MK): $(RTCONFIG_H) cat $(FILE_TMP) | grep -o '[^ ]*.c$$' | awk '{print "SRCS += " $$1}' > $@ cat $(FILE_TMP) | grep 'gcc ' | head -n 1 | grep -o " -I[^ ]*" | awk '{print "CFLAGS += " $$1}' >> $@ rm $(FILE_TMP) + if [ "`sed -n '3p' $^`"x = x ]; then sed -i -e '2a#include "extra.h"' $^; fi menuconfig: scons --menuconfig diff --git a/bsp/abstract-machine/include/extra.h b/bsp/abstract-machine/include/extra.h new file mode 100644 index 0000000..8c1cfe0 --- /dev/null +++ b/bsp/abstract-machine/include/extra.h @@ -0,0 +1,3 @@ +typedef long ssize_t; +typedef long suseconds_t; +typedef unsigned long useconds_t;