aboutsummaryrefslogtreecommitdiff
path: root/rmidevice/Makefile
diff options
context:
space:
mode:
authorAndrew Duggan <aduggan@synaptics.com>2014-04-03 15:17:57 -0700
committerAndrew Duggan <aduggan@synaptics.com>2014-04-03 15:17:57 -0700
commit4e811258783e0f1e0cdaf70e3bdb2069ce4f0465 (patch)
treefbd10bbcc263069c08b3e2f298b0079e159ab3bc /rmidevice/Makefile
downloadrmi4utils-4e811258783e0f1e0cdaf70e3bdb2069ce4f0465.tar.gz
Initial commit
Diffstat (limited to 'rmidevice/Makefile')
-rw-r--r--rmidevice/Makefile22
1 files changed, 22 insertions, 0 deletions
diff --git a/rmidevice/Makefile b/rmidevice/Makefile
new file mode 100644
index 0000000..e98edd9
--- /dev/null
+++ b/rmidevice/Makefile
@@ -0,0 +1,22 @@
+CXX = g++
+LD = $(CXX)
+AR = ar
+RANLIB = ranlib
+INCLUDES = -I../include -I./include
+CXXFLAGS = -fPIC -g -Wall $(INCLUDES)
+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)*