X-Git-Url: https://irasnyder.com/gitweb/?a=blobdiff_plain;f=Makefile;h=d24a57ce222248be0da7b45549e453faa9360eb0;hb=2172ce055533d5865d58538ee00bf609e59b0f99;hp=8062d9a301b7d83cbbaebc6d3f5cb9255dfc0b59;hpb=28c9908e524bd7bd51e4141e21046e2a60b83bd0;p=cs356-p1-elevator.git diff --git a/Makefile b/Makefile index 8062d9a..d24a57c 100644 --- a/Makefile +++ b/Makefile @@ -1,12 +1,21 @@ -test: position.o stop.o elevator.o test.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