forked from dulalsaurab/sorts
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
37 lines (26 loc) · 817 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
34
35
36
37
# a simple makefile for compiling C++ files
# optimization is on
CC = c++ -03
# for debuging use this
#CC = c++ -g -O0
all: sort
sort: bubble-sort.o insertion-sort.o selection-sort.o shell-sort.o \
option.o sort.o radix-sort.o
$(CC) -o sort bubble-sort.o insertion-sort.o selection-sort.o \
shell-sort.o option.o sort.o radix-sort.o
option.o: option.h option.cpp
$(CC) -c option.cpp
bubble-sort.o: sort.h bubble-sort.cpp
$(CC) -c bubble-sort.cpp
insertion-sort.o: sort.h insertion-sort.cpp
$(CC) -c insertion-sort.cpp
selection-sort.o: sort.h selection-sort.cpp
$(CC) -c selection-sort.cpp
shell-sort.o: sort.h shell-sort.cpp
$(CC) -c shell-sort.cpp
radix-sort.o: sort.h radix-sort.cpp
$(CC) -c radix-sort.cpp
sort.o: sort.h option.h sort.cpp
$(CC) -c sort.cpp
clean:
/bin/rm -f *.o sort