-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
39 lines (26 loc) · 857 Bytes
/
Makefile
File metadata and controls
39 lines (26 loc) · 857 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
28
29
30
31
32
33
34
35
36
37
38
39
# code details
EXE = ./bin/library
SRC = main.c library.c librarian.c listManagement.c reader.c utility.c
# generic build details
CC = gcc
CFLAGS = -std=c99 -Wall
CLINK=
# compile to object code
OBJ= $(SRC:.c=.o)
.c.o:
$(CC) $(CFLAGS) -c -o $@ $<
# build executable: type 'make'
$(EXE): $(OBJ)
$(CC) $(OBJ) $(CLINK) -o $(EXE)
# clean up and remove object code and executable: type 'make clean'
all: $(EXE)
.PHONY: all
clean:
rm -f $(OBJ) $(EXE)
# dependencies
main.o: main.c library.h
library.o: library.c book_management.h listManagement.h library.h librarian.h reader.h utility.c
librarian.o: librarian.c book_management.h librarian.h listManagement.h utility.h
listManagement.o: listManagement.c book_management.h listManagement.h
reader.o: reader.c book_management.h listManagement.h librarian.h utility.h
utility.o: utility.c utility.h