-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile
More file actions
29 lines (20 loc) · 874 Bytes
/
Copy pathMakefile
File metadata and controls
29 lines (20 loc) · 874 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
CC=gcc
INCLUDE=include/
CFLAGS = -g -O -Wall -MMD -I$(INCLUDE) -I./list/include/
LIBS=-lpthread
# use this line below if we want to use the libraries dynamically
# LIBS=-lpthread -Llib/ -lthreadsafe-mylib -L./list/lib/ -lmylib
all: library pc
library:
cd wrapper-library/; make
cd wrapper-library/; make install
# $@: The filename representing the target.
# $?: The names of all prerequisites that are newer than the target, separated by spaces.
pc: pc.o Item.o wrapper-library/ThreadsafeBoundedList.o list/lib/libmylib.a
$(CC) $(CFLAGS) -o $@ $? $(LIBS)
# if we do not use $? in the above line, then we need to use the following line so as to list every prerequisite file.
# $(CC) $(CFLAGS) -o $@ pc.o Item.o wrapper-library/ThreadsafeBoundedList.o list/lib/libmylib.a $(LIBS)
-include *.d
clean:
/bin/rm -f *.o pc *.d
cd wrapper-library/; make installclean