aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorJoshua Bakita <bakitajoshua@gmail.com>2023-03-02 22:14:22 -0500
committerJoshua Bakita <bakitajoshua@gmail.com>2023-03-02 22:14:22 -0500
commit7db0d3088a6e25c7c64999a20267f55751571dee (patch)
tree9867d0ede3818ade3a63f942446b40d2f1446254 /Makefile
Initial reimplementation of libsmctrl as a library
- Tested working with cuda_scheduling_examiner - Supports everything described in the accepted RTAS'23 paper - Can be used as either a shared or staticly-linked library - Documented in libsmctrl.h
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