-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
41 lines (27 loc) · 865 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
BINS := collatz-list-sys collatz-ivec-sys \
collatz-list-hw7 collatz-ivec-hw7 \
collatz-list-par collatz-ivec-par
HDRS := $(wildcard *.h)
SRCS := $(wildcard *.c)
OBJS := $(SRCS:.c=.o)
CFLAGS := -g -std=gnu99
LDLIBS := -lpthread
all: $(BINS)
collatz-list-sys: list_main.o sys_malloc.o
gcc $(CFLAGS) -o $@ $^ $(LDLIBS)
collatz-ivec-sys: ivec_main.o sys_malloc.o
gcc $(CFLAGS) -o $@ $^ $(LDLIBS)
collatz-list-hw7: list_main.o hw07_malloc.o hmalloc.o
gcc $(CFLAGS) -o $@ $^ $(LDLIBS)
collatz-ivec-hw7: ivec_main.o hw07_malloc.o hmalloc.o
gcc $(CFLAGS) -o $@ $^ $(LDLIBS)
collatz-list-par: list_main.o par_malloc.o
gcc $(CFLAGS) -o $@ $^ $(LDLIBS)
collatz-ivec-par: ivec_main.o par_malloc.o
gcc $(CFLAGS) -o $@ $^ $(LDLIBS)
%.o : %.c $(HDRS) Makefile
clean:
rm -f *.o $(BINS) time.tmp outp.tmp
test:
perl test.pl
.PHONY: clean test