diff options
| author | Joshua Bakita <bakitajoshua@gmail.com> | 2023-03-02 22:14:22 -0500 |
|---|---|---|
| committer | Joshua Bakita <bakitajoshua@gmail.com> | 2023-03-02 22:14:22 -0500 |
| commit | 7db0d3088a6e25c7c64999a20267f55751571dee (patch) | |
| tree | 9867d0ede3818ade3a63f942446b40d2f1446254 /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-- | Makefile | 21 |
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 @@ | |||
| 1 | CC = gcc | ||
| 2 | # -fPIC is needed in all cases, as we may be linked into another shared library | ||
| 3 | CFLAGS = -fPIC | ||
| 4 | LDFLAGS = -lcuda -I/usr/local/cuda/include | ||
| 5 | |||
| 6 | .PHONY: clean tests | ||
| 7 | |||
| 8 | libsmctrl.so: libsmctrl.c libsmctrl.h | ||
| 9 | $(CC) $< -shared -o $@ $(CFLAGS) $(LDFLAGS) | ||
| 10 | |||
| 11 | libsmctrl.a: libsmctrl.c libsmctrl.h | ||
| 12 | $(CC) $< -c -o libsmctrl.o $(CFLAGS) $(LDFLAGS) | ||
| 13 | ar rcs $@ libsmctrl.o | ||
| 14 | |||
| 15 | libsmctrl_test_gpc_info: libsmctrl_test_gpc_info.c | ||
| 16 | $(CC) $< -o $@ -L. -lsmctrl $(LDFLAGS) | ||
| 17 | |||
| 18 | tests: libsmctrl_test_gpc_info | ||
| 19 | |||
| 20 | clean: | ||
| 21 | rm -f libsmctrl.so libsmctrl.a | ||
