-
Notifications
You must be signed in to change notification settings - Fork 4
/
makefile
50 lines (37 loc) · 860 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
# parallel tasks runtime
#
# makefile
#
# 2016.06.01 kiran.pamnany Initial code
#
CC=gcc
.SUFFIXES: .c .h .o .a
.PHONY: clean test
CFLAGS+=-DPERF_PROFILE
CFLAGS+=-Wall
CFLAGS+=-std=c11
CFLAGS+=-D_GNU_SOURCE
CFLAGS+=-I../hwloc/include
CFLAGS+=-I../libconcurrent/include
CFLAGS+=-I./include
CFLAGS+=-I./src
SRCS=src/partr.c src/synctreepool.c src/taskpools.c src/multiq.c src/congrng.c
INCS=include/partr.h src/task.h src/synctreepool.h src/taskpools.h src/multiq.h src/congrng.h src/log.h src/perfutil.h src/profile.h
OBJS=${SRCS:.c=.o}
ifeq ($(DEBUG),yes)
CFLAGS+=-O0 -g
else
CFLAGS+=-O3
endif
TARGET=libpartr.a
all: $(TARGET)
test: $(TARGET)
$(MAKE) -C test
$(TARGET): $(OBJS)
$(RM) $(TARGET)
$(AR) qvs $(TARGET) $(OBJS)
%.o: %.c $(INCS) makefile
$(CC) $(CFLAGS) -c $< -o $@
clean:
$(MAKE) -C test clean
$(RM) $(TARGET) $(OBJS)