Home | History | Annotate | Download | only in rmidevice
      1 CXX ?= g++
      2 AR ?= ar
      3 RANLIB ?= ranlib
      4 CPPFLAGS += -I../include -I./include
      5 CXXFLAGS += -fPIC -Wall
      6 RMIDEVICESRC = rmifunction.cpp rmidevice.cpp hiddevice.cpp
      7 RMIDEVICEOBJ = $(RMIDEVICESRC:.cpp=.o)
      8 LIBNAME = librmidevice.so
      9 STATIC_LIBNAME = librmidevice.a
     10 LDFLAGS = -shared -Wl,-soname,$(LIBNAME)
     11 
     12 all: $(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 
     21 clean:
     22 	rm -f $(RMIDEVICEOBJ) $(LIBNAME)* $(STATIC_LIBNAME)*
     23