• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1CXX ?= g++
2AR ?= ar
3RANLIB ?= ranlib
4CPPFLAGS += -I../include -I./include
5CXXFLAGS += -fPIC -Wall
6RMIDEVICESRC = rmifunction.cpp rmidevice.cpp hiddevice.cpp
7RMIDEVICEOBJ = $(RMIDEVICESRC:.cpp=.o)
8LIBNAME = librmidevice.so
9STATIC_LIBNAME = librmidevice.a
10LDFLAGS = -shared -Wl,-soname,$(LIBNAME)
11
12all: $(LIBNAME) $(STATIC_LIBNAME)
13
14$(LIBNAME): $(RMIDEVICEOBJ)
15	$(CXX) $(CXXFLAGS) $(LDFLAGS) $^ -o $@
16
17$(STATIC_LIBNAME): $(RMIDEVICEOBJ)
18	$(AR) crv $(STATIC_LIBNAME) $^
19	$(RANLIB) $(STATIC_LIBNAME)
20
21clean:
22	rm -f $(RMIDEVICEOBJ) $(LIBNAME)* $(STATIC_LIBNAME)*
23