-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
38 lines (26 loc) · 1.18 KB
/
Copy pathMakefile
File metadata and controls
38 lines (26 loc) · 1.18 KB
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
EXE := .exe # swap to `EXE := ` for linux
cc := gcc # swap for your prefered c compiler
all:
make textFixer$(EXE)
make wordCounter$(EXE)
textFixer$(EXE): textFixer.o mylib.a
$(cc) textFixer.o mylib.a -o textFixer$(EXE)
textFixer.o: src/textFixer.c src/debug/debug.h
$(cc) -c src/textFixer.c -o textFixer.o
wordCounter$(EXE): wordCounter.o mylib.a
$(cc) wordCounter.o mylib.a -o wordCounter$(EXE)
wordCounter.o: src/wordCounter.c src/debug/debug.h
$(cc) -c src/wordCounter.c -o wordCounter.o
libs := debug.o string_basic.o text_file.o string_list.o string_op.o
mylib.a: $(libs) src/debug/debug.h
ar rcs mylib.a $(libs)
debug.o: src/debug/debug.c src/debug/debug.h
$(cc) -c src/debug/debug.c -o debug.o
string_basic.o: src/string\ basic/string_basic.c src/debug/debug.h
$(cc) -c "src/string basic/string_basic.c" -o string_basic.o
text_file.o: src/string\ basic/text_file.c src/debug/debug.h
$(cc) -c "src/string basic/text_file.c" -o text_file.o
string_list.o: src/string\ list/string_list.c src/debug/debug.h
$(cc) -c "src/string list/string_list.c" -o string_list.o
string_op.o: src/string\ process/string_op.c src/debug/debug.h
$(cc) -c "src/string process/string_op.c" -o string_op.o