aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile14
1 files changed, 10 insertions, 4 deletions
diff --git a/Makefile b/Makefile
index aa59792..cfbd971 100644
--- a/Makefile
+++ b/Makefile
@@ -1,4 +1,5 @@
1CC = gcc 1CC = gcc
2NVCC ?= nvcc
2# -fPIC is needed in all cases, as we may be linked into another shared library 3# -fPIC is needed in all cases, as we may be linked into another shared library
3CFLAGS = -fPIC 4CFLAGS = -fPIC
4LDFLAGS = -lcuda -I/usr/local/cuda/include 5LDFLAGS = -lcuda -I/usr/local/cuda/include
@@ -12,10 +13,15 @@ libsmctrl.a: libsmctrl.c libsmctrl.h
12 $(CC) $< -c -o libsmctrl.o $(CFLAGS) $(LDFLAGS) 13 $(CC) $< -c -o libsmctrl.o $(CFLAGS) $(LDFLAGS)
13 ar rcs $@ libsmctrl.o 14 ar rcs $@ libsmctrl.o
14 15
15libsmctrl_test_gpc_info: libsmctrl_test_gpc_info.c 16# Use static linking with tests to avoid LD_LIBRARY_PATH issues
16 $(CC) $< -o $@ -L. -lsmctrl $(LDFLAGS) 17libsmctrl_test_gpc_info: libsmctrl_test_gpc_info.c libsmctrl.a
18 $(CC) $< -o $@ -g -L. -l:libsmctrl.a $(LDFLAGS)
17 19
18tests: libsmctrl_test_gpc_info 20libsmctrl_test_global_mask: libsmctrl_test_global_mask.cu libsmctrl.a
21 $(NVCC) $< -o $@ -g -L. -l:libsmctrl.a $(LDFLAGS)
22
23tests: libsmctrl_test_gpc_info libsmctrl_test_global_mask
19 24
20clean: 25clean:
21 rm -f libsmctrl.so libsmctrl.a 26 rm -f libsmctrl.so libsmctrl.a libsmctrl_test_gpu_info \
27 libsmctrl_test_global_mask