[rtems-graphics-toolkit commit] Hello World building and running for rtems

Gedare Bloom gedare at rtems.org
Tue Dec 24 15:24:06 UTC 2013


Module:    rtems-graphics-toolkit
Branch:    master
Commit:    46c28a161b2dbae75324893ea09e61fe266bf4bc
Changeset: http://git.rtems.org/rtems-graphics-toolkit/commit/?id=46c28a161b2dbae75324893ea09e61fe266bf4bc

Author:    Alexandru-Sever Horin <alex.sever.h at gmail.com>
Date:      Sun Jul  8 16:00:23 2012 +0300

Hello World building and running for rtems

---

 fltk-1.3.0/test/Makefile  |   12 ++++++++++--
 fltk-1.3.0/test/demo.cxx  |    2 +-
 fltk-1.3.0/test/hello.cxx |    4 ++--
 3 files changed, 13 insertions(+), 5 deletions(-)

diff --git a/fltk-1.3.0/test/Makefile b/fltk-1.3.0/test/Makefile
index 547698d..cc99346 100644
--- a/fltk-1.3.0/test/Makefile
+++ b/fltk-1.3.0/test/Makefile
@@ -27,6 +27,10 @@
 
 include ../makeinclude
 
+include $(RTEMS_MAKEFILE_PATH)/Makefile.inc
+include $(RTEMS_CUSTOM)
+include $(PROJECT_ROOT)/make/leaf.cfg
+
 CPPFILES =\
 	unittests.cxx \
 	adjuster.cxx \
@@ -181,6 +185,7 @@ GLALL = \
 	shape$(EXEEXT)
 
 all:	$(ALL) $(GLDEMOS)
+	$(make-cxx-exe)
 
 gldemos:	$(GLALL)
 
@@ -274,6 +279,8 @@ uninstall-osx:
 # All demos depend on the FLTK library...
 $(ALL): $(LIBNAME)
 
+
+
 # General demos...
 unittests$(EXEEXT): unittests.o
 
@@ -320,7 +327,7 @@ curve$(EXEEXT): curve.o
 
 demo$(EXEEXT): demo.o
 	echo Linking $@...
-	$(CXX) $(ARCHFLAGS) $(LDFLAGS) -o $@ demo.o $(LINKFLTKFORMS) $(LDLIBS)
+	$(CXX) $(ARCHFLAGS) $(LDFLAGS) -o $@ demo.o $(LINKFLTKFORMS) $(LDLIBS) ../../microwin/src/obj/rtems_init.o ../../microwin/src/obj/FilesystemImage.o 
 
 device$(EXEEXT): device.o $(IMGLIBNAME)
 	echo Linking $@...
@@ -345,7 +352,8 @@ forms$(EXEEXT): forms.o
 	echo Linking $@...
 	$(CXX) $(ARCHFLAGS) $(LDFLAGS) -o $@ forms.o $(LINKFLTKFORMS) $(LDLIBS)
 
-hello$(EXEEXT): hello.o
+hello$(EXEEXT): hello.o  
+	$(CXX) $(ARCHFLAGS) $(LDFLAGS) -o $@ hello.o $(LINKFLTKFORMS) $(LDLIBS) ../../microwin/src/obj/rtems_init.o ../../microwin/src/obj/FilesystemImage.o 
 
 help$(EXEEXT): help.o $(IMGLIBNAME)
 	echo Linking $@...
diff --git a/fltk-1.3.0/test/demo.cxx b/fltk-1.3.0/test/demo.cxx
index 49e544c..155cddd 100644
--- a/fltk-1.3.0/test/demo.cxx
+++ b/fltk-1.3.0/test/demo.cxx
@@ -395,7 +395,7 @@ int load_the_menu(const char* fname)
   return 1;
 }
 
-int main(int argc, char **argv) {
+extern "C" int rtems_main(int argc, char **argv) {
   putenv((char *)"FLTK_DOCDIR=../documentation/html");
   char buf[FL_PATH_MAX];
   strcpy(buf, argv[0]);
diff --git a/fltk-1.3.0/test/hello.cxx b/fltk-1.3.0/test/hello.cxx
index e87faab..dbb85bb 100644
--- a/fltk-1.3.0/test/hello.cxx
+++ b/fltk-1.3.0/test/hello.cxx
@@ -29,13 +29,13 @@
 #include <FL/Fl_Window.H>
 #include <FL/Fl_Box.H>
 
-int main(int argc, char **argv) {
+extern "C" int rtems_main(int argc, char **argv) {
   Fl_Window *window = new Fl_Window(340,180);
   Fl_Box *box = new Fl_Box(20,40,300,100,"Hello, World!");
   box->box(FL_UP_BOX);
   box->labelfont(FL_BOLD+FL_ITALIC);
   box->labelsize(36);
-  box->labeltype(FL_SHADOW_LABEL);
+  box->labeltype(FL_NORMAL_LABEL);
   window->end();
   window->show(argc, argv);
   return Fl::run();




More information about the vc mailing list