blob: 8403d7c6de7e85ffbfe6c270cf4ba7b31baa7fd2 [file] [log] [blame]
Mark Slee8d7e1f62006-06-07 06:48:56 +00001# Makefile for Thrift C++ library. Generates a shared object that can be
2# installed to /usr/local/lib
3#
4# TODO(mcslee): Add the ability to compile separate statis modules that can
5# be compiled directly into Thrift applications instead of dynamic runtime
6# loading of the full libs
Mark Sleee8540632006-05-30 09:24:40 +00007#
8# Author:
9# Mark Slee <mcslee@facebook.com>
10
11target: libthrift
12
13# Tools
14LD = g++
Mark Slee4e0d9622006-06-26 23:56:08 +000015LDFL = -shared -Wall -Isrc -fPIC -Wl,-soname=libthrift.so
Mark Sleee8540632006-05-30 09:24:40 +000016
17# Source files
Mark Slee4e0d9622006-06-26 23:56:08 +000018SRCS = src/protocol/TBinaryProtocol.cc \
19 src/transport/TBufferedTransport.cc \
Mark Slee6e536442006-06-30 18:28:50 +000020 src/transport/TChunkedTransport.cc \
Mark Slee4e0d9622006-06-26 23:56:08 +000021 src/transport/TSocket.cc \
22 src/transport/TServerSocket.cc \
23 src/server/TSimpleServer.cc
Mark Sleee8540632006-05-30 09:24:40 +000024
25# Linked library
26libthrift:
27 $(LD) -o libthrift.so $(LDFL) $(SRCS)
28
Mark Slee8d7e1f62006-06-07 06:48:56 +000029# Clean it up
Mark Sleee8540632006-05-30 09:24:40 +000030clean:
31 rm -f libthrift.so
32
33# Install
34install: libthrift
35 sudo install libthrift.so /usr/local/lib