Loggytronic Forum

VOMP => VOMP for Raspberry Pi => Topic started by: davep on November 18, 2012, 09:52:17

Title: Shutdown / Reboot fix
Post by: davep on November 18, 2012, 09:52:17
The option in GNUMakefile which gives the choice of shutting down or rebooting the Pi from the remote doesn't work. The #define VOMP_HAS_EXIT is never passed to the compiler. I don't really understand Makefiles so this is a quick fix:

diff --git a/GNUmakefile b/GNUmakefile
index f759c16..a7684b1 100644
--- a/GNUmakefile
+++ b/GNUmakefile
@@ -68,6 +68,7 @@ CXXFLAGS_DEV += -D__STDC_CONSTANT_MACROS
CXXFLAGS_REL += -D__STDC_CONSTANT_MACROS

endif
+INCLUDES += $(vomp_options)

.PHONY: clean fresh all install strip


Title: Re: Shutdown / Reboot fix
Post by: MartenR on November 18, 2012, 12:33:27
Thanks for reporting this, I have fixed it in a different way.

Marten
Title: Re: Shutdown / Reboot fix
Post by: davep on November 20, 2012, 20:05:04
Unfortunately that does not work, as the vomp_options parameter is only being applied to the link step. This works:

diff --git a/GNUmakefile b/GNUmakefile
index e52ff4d..34f4df0 100644
--- a/GNUmakefile
+++ b/GNUmakefile
@@ -26,8 +26,8 @@ endif



-CXXFLAGS_DEV = -g -O0 -Wall -Wshadow -DDEV -D_GNU_SOURCE $(INCLUDES)
-CXXFLAGS_REL = -O3 -Wall -Wshadow  -D_GNU_SOURCE $(INCLUDES)
+CXXFLAGS_DEV = -g -O0 -Wall -Wshadow -DDEV -D_GNU_SOURCE $(INCLUDES) $(vomp_options)
+CXXFLAGS_REL = -O3 -Wall -Wshadow  -D_GNU_SOURCE $(INCLUDES) $(vomp_options)


LIBPATHS =
@@ -75,7 +75,7 @@ default: dev
fresh:   clean default

vompclient: $(OBJECTS) $(TIOBJECT) $(CROSSLIBS)
-       $(LD) $(LDFLAGS) $(LIBPATHS) $(RELEASE) $(vomp_options) -o vompclient $(TIOBJECT) $(OBJECTS) $(CROSSLIBS) $(LIBS)
+       $(LD) $(LDFLAGS) $(LIBPATHS) $(RELEASE) -o vompclient $(TIOBJECT) $(OBJECTS) $(CROSSLIBS) $(LIBS)

# A slight hash up
ticonfig.o:

Title: Re: Shutdown / Reboot fix
Post by: MartenR on November 23, 2012, 07:12:32
Ok, second attempt, is in a few minutes in git