aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile21
1 files changed, 21 insertions, 0 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..aa59792
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,21 @@
1CC = gcc
2# -fPIC is needed in all cases, as we may be linked into another shared library
3CFLAGS = -fPIC
4LDFLAGS = -lcuda -I/usr/local/cuda/include
5
6.PHONY: clean tests
7
8libsmctrl.so: libsmctrl.c libsmctrl.h
9 $(CC) $< -shared -o $@ $(CFLAGS) $(LDFLAGS)
10
11libsmctrl.a: libsmctrl.c libsmctrl.h
12 $(CC) $< -c -o libsmctrl.o $(CFLAGS) $(LDFLAGS)
13 ar rcs $@ libsmctrl.o
14
15libsmctrl_test_gpc_info: libsmctrl_test_gpc_info.c
16 $(CC) $< -o $@ -L. -lsmctrl $(LDFLAGS)
17
18tests: libsmctrl_test_gpc_info
19
20clean:
21 rm -f libsmctrl.so libsmctrl.a