-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
33 lines (25 loc) · 831 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
# Variables
CXX = g++
CXXFLAGS = -Wall -std=c++17 -I./seats
DFLAGS = -g
TARGET = bookmyshow.exe
SRCS = main.cpp City.cpp Movie.cpp Theater.cpp Ticket.cpp BookingManager.cpp $(wildcard seats/*.cpp) $(wildcard screen/*.cpp) $(wildcard show/*.cpp) $(wildcard payment/*.cpp)
OBJS = $(SRCS:%.cpp=%.o)
# Default target
all: $(TARGET)
# Link object files to create the executable
$(TARGET): $(OBJS)
@echo ---------------------------------------------
@echo building $@ ...
$(CXX) $(CXXFLAGS) $(DFLAGS) -o $@ $^
@echo $@ built !
@echo ----------------------------------------------
clean:
@echo ----------------------------------------------
@echo cleaning
-rm -rf *.o
-rm -rf seats/*.o screen/*.o show/*.o payment/*.o
-rm $(TARGET)
-rm -f *~
@echo project cleaned!
@echo ----------------------------------------------