-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile
More file actions
27 lines (24 loc) · 928 Bytes
/
Makefile
File metadata and controls
27 lines (24 loc) · 928 Bytes
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
# A simple Makefile to make the process of compilation easier for the user :-)
# With this makefile, instead of writing the cumbersome command for the whole project compilation into a single binary,
# simply write (on the terminal),~~
# make a : TO complile the project files
# make run: TO run the compiled binary files
# make clean: TO delete all the built binary files.
#~~~~~~~~~~~~~~~~~~VARIABLES~~~~~~~~~~~~~~~~~~~~~~~~~#
CC = g++
CFLAGS = -c -Wall
# argument Wall is used for giving warnings
#~~~~~~~~~~~~~~~~~COMMANDS~~~~~~~~~~~~~~~~~~~~~~~~~~~#
a: all
run: all
./all
all: main.o lexical.o syntax_analyser.o
$(CC) main.o lexical.o syntax_analyser.o -o all -lboost_system -lboost_filesystem
main.o: main.cpp
$(CC) $(CFLAGS) main.cpp
lexical.o: lexical.cpp
$(CC) $(CFLAGS) lexical.cpp
syntax_analyser.o: syntax_analyser.cpp
$(CC) $(CFLAGS) syntax_analyser.cpp
clean:
rm -rf *o all