-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmakefile
45 lines (32 loc) · 1.22 KB
/
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
34
35
36
37
38
39
40
41
42
43
44
45
CC = gcc
FLAGS = -g -Wall --std=c99 -O3
PROG = lmd
export PATH := $(PATH):$$HOME/myProgs
all : $(PROG)
clean :
rm *.o
cleanall : clean
rm $(PROG)
exe : $(PROG) clean
$(PROG) : main.o compiler.o preamble.o usefulFunctions.o pile.o files.o texToPdf.o
$(CC) $(FLAGS) -o $(PROG) main.o compiler.o preamble.o usefulFunctions.o pile.o files.o texToPdf.o
main.o : main.c error.h compiler.o files.o texToPdf.o usefulFunctions.o
$(CC) $(FLAGS) -c main.c
compiler.o : compiler.c compiler.h error.h preamble.o pile.o usefulFunctions.o files.o
$(CC) $(FLAGS) -c compiler.c
preamble.o : preamble.h preamble.c error.h usefulFunctions.o
$(CC) $(FLAGS) -c preamble.c
usefulFunctions.o : usefulFunctions.h usefulFunctions.c
$(CC) $(FLAGS) -c usefulFunctions.c
pile.o : pile.h pile.c
$(CC) $(FLAGS) -c pile.c
files.o : files.h files.c error.h
$(CC) $(FLAGS) -c files.c
texToPdf.o : texToPdf.h texToPdf.c error.h files.o
$(CC) $(FLAGS) -c texToPdf.c
install : $(PROG)
mkdir -p ~/myProgs;
cp lmd ~/myProgs
@echo
@echo 'Add this line to ~/.bashrc : "export PATH="$$PATH:$$HOME/myProgs"" and run "source ~/.bashrc"'
@echo 'This will add directory "~/myProgs" to $$PATH variable, to be able to use "lmd" instead of "~/myProgs/lmd" in command line'