From b22e52ae6f93af14cfe8e6eae795ac021559aa5b Mon Sep 17 00:00:00 2001 From: Damjan Adamic Date: Sun, 9 Nov 2014 21:29:00 +0100 Subject: [PATCH] Solution for Windows Companion compile problem (lua_exports) --- radio/src/Makefile | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/radio/src/Makefile b/radio/src/Makefile index e8068d759..220106882 100644 --- a/radio/src/Makefile +++ b/radio/src/Makefile @@ -1327,9 +1327,15 @@ bitmaps/sticks.lbm: bitmaps/sticks_4x1.xbm bitmaps/splash_9x.xbm bitmaps/splash_ $(IMG2LBM) bitmaps/about_9x.png bitmaps/about_9x.lbm img $(IMG2LBM) bitmaps/asterisk_4bits.png bitmaps/asterisk_4bits.lbm bmp +ifeq ($(OS),Windows_NT) + PARSER = avr-cpp +else + PARSER = gcc -E -x c++ +endif + lua_exports.cpp: myeeprom.h ../util/luaexport.py @echo "Generating a list of Lua exported constants in lua_exports.txt" - @gcc -E -x c++ -DPCBTARANIS -DCPUARM -DLUA -DEXPORT myeeprom.h | grep LEXP > lua_exports.txt + @$(PARSER) -DPCBTARANIS -DCPUARM -DLUA -DEXPORT myeeprom.h | grep LEXP > lua_exports.txt @echo "Parsing and generating C Lua exports in lua_exports.cpp" @python ../util/luaexport.py $(VERSION) lua_exports.txt lua_exports.cpp lua_fields.txt @rm lua_exports.txt