-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
32 lines (25 loc) · 834 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
OBJ = seat_main.o seat_functions.o # target
CC = g++ # compiler variable
DEBUG = -g # debugging flag
CFLAGS = -Wall -c $(DEBUG) # linking flag
LFLAGS = -Wall $(DEBUG) # flag used in compiling and creating object files
# All targets
all: seat run
# target to generate executable file.
seat: $(OBJ)
$(CC) $(LFLAGS) $(OBJ) -o seat
# target to run executable file
run:
./seat
# dependencies of seat_main.cpp
seat_main.o: seat_main.cpp seat_classes.h files.h
$(CC) $(CFLAGS) seat_main.cpp
# dependencies of seat_functions.cpp
seat_functions.o: seat_functions.cpp seat_classes.h files.h
$(CC) $(CFLAGS) seat_functions.cpp
# to destroy all the object and exectuable file
clean:
rm *.o seat
# to create tar file
tar:
tar cfv seat.tar seat_main.o seat_functions.o