-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
35 lines (23 loc) · 740 Bytes
/
Makefile
File metadata and controls
35 lines (23 loc) · 740 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
CC=g++
CFLAGS=-I./include -g -fPIC
SOURCES=$(wildcard src/*.cc)
OBJECTS=$(SOURCES:.cc=.o)
TEST_SOURCES=$(wildcard test/*.cc)
TEST_OBJECTS=$(TEST_SOURCES:.cc=.o)
all: libstrmio.so.1.0.1
libstrmio.so.1.0.1: $(OBJECTS)
$(CC) $(CFLAGS) -shared -Wl,-soname,libstrmio.so.1 -o libstrmio.so.1.0.1 $(OBJECTS) -lc
tests: $(OBJECTS) $(TEST_OBJECTS)
$(CC) $(CFLAGS) -o $@ $(OBJECTS) $(TEST_OBJECTS) -lgtest
mrdemo: demo/mrdemo.o $(OBJECTS)
$(CC) $(CFLAGS) -o $@ $(OBJECTS) $<
mttypedbytes: demo/mttypedbytes.o $(OBJECTS)
$(CC) $(CFLAGS) -lpthread -o $@ $(OBJECTS) $<
.PHONY: clean runtests
clean:
rm -f libstrmio.so.1.0.1 tests mrdemo mttypedbytes
rm -f src/*.o test/*.o
runtests: tests
./tests
%.o: %.cc
$(CC) $(CFLAGS) $< -c -o $@