From: Ira W. Snyder Date: Sun, 7 Oct 2007 03:57:17 +0000 (-0700) Subject: Get Ready for the main program X-Git-Url: https://irasnyder.com/gitweb/?a=commitdiff_plain;ds=inline;h=a3b0112117bfb69d7d2053e0f4f5b1220b95379b;p=cs356-p1-elevator.git Get Ready for the main program Rename test.cpp to main.cpp Create main.hpp Modify Makefile accordingly Signed-off-by: Ira W. Snyder --- diff --git a/Makefile b/Makefile index acc9a11..d24a57c 100644 --- 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 diff --git a/test.cpp b/main.cpp similarity index 100% rename from test.cpp rename to main.cpp diff --git a/main.hpp b/main.hpp new file mode 100644 index 0000000..570ca17 --- /dev/null +++ b/main.hpp @@ -0,0 +1,12 @@ +#ifndef MAIN_HPP +#define MAIN_HPP + +#include "elevatorgui.hpp" +#include +#include + +extern ElevatorGUI *thegui; + +#endif /* MAIN_HPP */ + +/* vim: set ts=4 sts=4 sw=4 noexpandtab textwidth=112: */