blob: 61e97b0c40753c6602788520414a741aba34692d [file] [log] [blame]
Chris Austen4d98c1e2015-10-13 14:33:50 -05001CXX ?= $(CROSS_COMPILE)g++
2
Chris Austenf79a21f2015-10-13 14:41:40 -05003TESTER = testit
4TESTER_OBJ = testit.o oemhandler.o
5
Chris Austen4d98c1e2015-10-13 14:33:50 -05006LIB_OEM_OBJ = oemhandler.o
7LIB_OEM = liboemhandler.so
8
9LDFLAGS += -rdynamic -ldl
10CXXFLAGS += -fPIC -Wall
11
12
Chris Austenf79a21f2015-10-13 14:41:40 -050013all: $(TESTER) $(LIB_OEM)
Chris Austen4d98c1e2015-10-13 14:33:50 -050014
15%.o: %.C
16 $(CXX) -c $< $(CXXFLAGS) -o $@
17
18
19$(LIB_OEM): $(LIB_OEM_OBJ)
20 $(CXX) $^ -shared $(LDFLAGS) -o $@
21
Chris Austenf79a21f2015-10-13 14:41:40 -050022$(TESTER): $(TESTER_OBJ)
23 $(CXX) $^ $(LDFLAGS) $(LIB_FLAG) -o $@ -ldl
24
Chris Austen4d98c1e2015-10-13 14:33:50 -050025clean:
Chris Austenf79a21f2015-10-13 14:41:40 -050026 $(RM) $(LIB_OEM_OBJ) $(LIB_OEM) $(TESTER_OBJ) $(TESTER)