-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
50 lines (31 loc) · 981 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
38
39
40
41
42
43
44
45
46
47
48
49
50
# Makefile for UD CISC user-level thread library
CC = gcc
CFLAGS = -g
LIBOBJS = t_lib.o
TSTOBJS = test00.o
# specify the executable
EXECS = test00
# specify the source files
LIBSRCS = t_lib.c
TSTSRCS = test00.c
# ar creates the static thread library
t_lib.a: ${LIBOBJS} Makefile
ar rcs t_lib.a ${LIBOBJS}
# here, we specify how each file should be compiled, what
# files they depend on, etc.
t_lib.o: t_lib.c t_lib.h Makefile
${CC} ${CFLAGS} -c t_lib.c
test00.o: test00.c ud_thread.h Makefile
${CC} ${CFLAGS} -c test00.c
test00: test00.o t_lib.a Makefile
${CC} ${CFLAGS} test00.o t_lib.a -o test00
test01.o: test01.c ud_thread.h Makefile
${CC} ${CFLAGS} -c test01.c
test01: test01.o t_lib.a Makefile
${CC} ${CFLAGS} test01.o t_lib.a -o test01
test01x.o: test01x.c ud_thread.h Makefile
${CC} ${CFLAGS} -c test01x.c
test01x: test01x.o t_lib.a Makefile
${CC} ${CFLAGS} test01x.o t_lib.a -o test01x
clean:
rm -f t_lib.a ${EXECS} ${LIBOBJS} ${TSTOBJS}