Get Ready for the main program
authorIra W. Snyder <devel@irasnyder.com>
Sun, 7 Oct 2007 03:57:17 +0000 (20:57 -0700)
committerIra W. Snyder <devel@irasnyder.com>
Sun, 7 Oct 2007 03:57:17 +0000 (20:57 -0700)
Rename test.cpp to main.cpp
Create main.hpp
Modify Makefile accordingly

Signed-off-by: Ira W. Snyder <devel@irasnyder.com>
Makefile
main.cpp [moved from test.cpp with 100% similarity]
main.hpp [new file with mode: 0644]

index acc9a11..d24a57c 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -2,20 +2,20 @@ CC=g++
 CFLAGS=`pkg-config gtkmm-2.4 --cflags`
 LIBS=`pkg-config gtkmm-2.4 --libs`
 
-SRCS=position.cpp stop.cpp elevator.cpp elevatorcontroller.cpp elevatordoor.cpp callbutton.cpp positionlabel.cpp requestbutton.cpp elevatorgui.cpp test.cpp
+SRCS=position.cpp stop.cpp elevator.cpp elevatorcontroller.cpp elevatordoor.cpp callbutton.cpp positionlabel.cpp requestbutton.cpp elevatorgui.cpp main.cpp
 
-test: $(SRCS:.cpp=.o)
+main: $(SRCS:.cpp=.o)
        $(CC) -o $@ $^ $(LIBS)
 
 .cpp.o:
        $(CC) $(CFLAGS) -c -o $@ $<
 
-run: test
-       ./test
+run: main
+       ./main
 
 clean:
-       rm -f *.o test
+       rm -f *.o main
 
-all: test
+all: main
 
 .PHONY: run clean all
similarity index 100%
rename from test.cpp
rename to main.cpp
diff --git a/main.hpp b/main.hpp
new file mode 100644 (file)
index 0000000..570ca17
--- /dev/null
+++ b/main.hpp
@@ -0,0 +1,12 @@
+#ifndef MAIN_HPP
+#define MAIN_HPP
+
+#include "elevatorgui.hpp"
+#include <iostream>
+#include <gtkmm/main.h>
+
+extern ElevatorGUI *thegui;
+
+#endif /* MAIN_HPP */
+
+/* vim: set ts=4 sts=4 sw=4 noexpandtab textwidth=112: */