aboutsummaryrefslogtreecommitdiff
path: root/rmidevice/Makefile
blob: 7ab2a40008968ace6b1531feddfcaa329bd7019f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
CXX = g++
LD = $(CXX)
AR = ar
RANLIB = ranlib
CPPFLAGS = -I../include -I./include
CXXFLAGS = -fPIC -g -Wall
RMIDEVICESRC = rmifunction.cpp rmidevice.cpp hiddevice.cpp
RMIDEVICEOBJ = $(RMIDEVICESRC:.cpp=.o)
LIBNAME = librmidevice.so
STATIC_LIBNAME = librmidevice.a

all: $(LIBNAME) $(STATIC_LIBNAME)

$(LIBNAME): $(RMIDEVICEOBJ)
	$(CXX) -shared -Wl,-soname,$(LIBNAME) $^ -o $@

$(STATIC_LIBNAME): $(RMIDEVICEOBJ)
	$(AR) crv $(STATIC_LIBNAME) $^
	$(RANLIB) $(STATIC_LIBNAME)

clean:
	rm -f $(RMIDEVICEOBJ) $(LIBNAME)* $(STATIC_LIBNAME)*