X-Git-Url: https://irasnyder.com/gitweb/?a=blobdiff_plain;ds=sidebyside;f=Makefile;h=d24a57ce222248be0da7b45549e453faa9360eb0;hb=ff557197cf33a848ad2750d515f67f51113b8403;hp=c13f766fc4c6a0330cfc0fa54e2626e80070ee42;hpb=90cabce172856326923f36c9a05fae01138d25aa;p=cs356-p1-elevator.git diff --git a/Makefile b/Makefile index c13f766..d24a57c 100644 --- a/Makefile +++ b/Makefile @@ -1,12 +1,21 @@ -test: test.o elevator.o position.o stop.o - g++ -o $@ $^ +CC=g++ +CFLAGS=`pkg-config gtkmm-2.4 --cflags` +LIBS=`pkg-config gtkmm-2.4 --libs` -run: test - ./test +SRCS=position.cpp stop.cpp elevator.cpp elevatorcontroller.cpp elevatordoor.cpp callbutton.cpp positionlabel.cpp requestbutton.cpp elevatorgui.cpp main.cpp + +main: $(SRCS:.cpp=.o) + $(CC) -o $@ $^ $(LIBS) + +.cpp.o: + $(CC) $(CFLAGS) -c -o $@ $< + +run: main + ./main clean: - rm -f *.o test + rm -f *.o main -all: test +all: main .PHONY: run clean all