Use 64-bit masks
[libside.git] / src / Makefile
index 5201974a94ed340900eed06261ca90a7a261e616..a4b38aad002d8298e2430886c987036d7da23371 100644 (file)
@@ -1,16 +1,27 @@
 all: test
 
-side.o: side.c
-       gcc -O2 -g -Wall -I../include/ -c -o side.o side.c
+HEADERS = ../include/side/trace.h ../include/side/macros.h rcu.h smp.h list.h
 
-tracer.o: tracer.c
-       gcc -O2 -g -Wall -I../include/ -c -o tracer.o tracer.c
+CFLAGS = -g -O2 -Wall
+CPPFLAGS = -I../include/ -D_GNU_SOURCE
 
-test.o: test.c
-       gcc -O2 -g -Wall -I../include/ -c -o test.o test.c
+side.o: side.c $(HEADERS)
+       gcc $(CFLAGS) $(CPPFLAGS) -c -o $@ $<
 
-test: tracer.o test.o side.o
-       gcc -O2 -g -Wall -o test tracer.o test.o side.o
+rcu.o: rcu.c $(HEADERS)
+       gcc $(CFLAGS) $(CPPFLAGS) -c -o $@ $<
+
+smp.o: smp.c $(HEADERS)
+       gcc $(CFLAGS) $(CPPFLAGS) -c -o $@ $<
+
+tracer.o: tracer.c $(HEADERS)
+       gcc $(CFLAGS) $(CPPFLAGS) -c -o $@ $<
+
+test.o: test.c $(HEADERS)
+       gcc $(CFLAGS) $(CPPFLAGS) -c -o $@ $<
+
+test: tracer.o test.o side.o rcu.o smp.o
+       gcc $(CFLAGS) -o $@ $^
 
 .PHONY: clean
 
This page took 0.025563 seconds and 4 git commands to generate.