projects
/
urcu.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Change API
[urcu.git]
/
Makefile
diff --git
a/Makefile
b/Makefile
index 8a699a7f63d6659c67caa04eae63c0311b6c3e02..1bc089f2948246770898e3a5405481321748c371 100644
(file)
--- a/
Makefile
+++ b/
Makefile
@@
-1,6
+1,26
@@
+CFLAGS=-Wall -O2
+#debug
+#CFLAGS=-Wall -g
+LDFLAGS=-lpthread
+
+SRC_DEP=`echo $^ | sed 's/[^ ]*.h//g'`
+
+all: test_urcu test_urcu_timing test_rwlock_timing
+
test_urcu: urcu.o test_urcu.c
test_urcu: urcu.o test_urcu.c
- gcc -lpthread -g -o test_urcu urcu.o test_urcu.c
+ $(CC) ${CFLAGS} $(LDFLAGS) -o $@ $(SRC_DEP)
+
+test_urcu_timing: urcu.o test_urcu_timing.c
+ $(CC) ${CFLAGS} $(LDFLAGS) -o $@ $(SRC_DEP)
+
+test_rwlock_timing: urcu.o test_rwlock_timing.c
+ $(CC) ${CFLAGS} $(LDFLAGS) -o $@ $(SRC_DEP)
urcu.o: urcu.c urcu.h
urcu.o: urcu.c urcu.h
- gcc -lpthread -g -c -o urcu.o urcu.c
+ $(CC) ${CFLAGS} $(LDFLAGS) -c -o $@ $(SRC_DEP)
+
+.PHONY: clean
+
+clean:
+ rm -f urcu.o test_urcu test_urcu_timing
This page took
0.023421 seconds
and
4
git commands to generate.