Commit 48d0763ae195a45b98435054aecc26fce76ceca0

Authored by Matti Virkkunen
1 parent 61ed212d

Moved source to subdir to prepare for Pidgin plugin.

Makefile
1   -CXX = g++
2   -CXXFLAGS = -g -Wall -shared -fPIC \
3   - -DHAVE_INTTYPES_H -DHAVE_CONFIG_H -DPURPLE_PLUGINS \
4   - `pkg-config --cflags purple thrift`
5   -THRIFT = thrift
6   -
7   -LIBS = `pkg-config --libs purple thrift`
8   -
9   -PURPLE_PLUGIN_DIR:=$(shell pkg-config --variable=plugindir purple)
10   -PURPLE_DATA_ROOT_DIR:=$(shell pkg-config --variable=datarootdir purple)
11   -
12   -MAIN = libline.so
13   -
14   -GEN_SRCS = thrift_line/line_constants.cpp thrift_line/line_types.cpp \
15   - thrift_line/TalkService.cpp
16   -REAL_SRCS = pluginmain.cpp linehttptransport.cpp thriftclient.cpp httpclient.cpp \
17   - purpleline.cpp purpleline_blist.cpp purpleline_chats.cpp purpleline_cmds.cpp \
18   - purpleline_login.cpp purpleline_write.cpp \
19   - poller.cpp pinverifier.cpp
20   -SRCS += $(GEN_SRCS)
21   -SRCS += $(REAL_SRCS)
22   -
23   -OBJS = $(SRCS:.cpp=.o)
24   -
25   -all: $(MAIN)
26   -
27   -$(MAIN): $(OBJS)
28   - $(CXX) $(CXXFLAGS) -Wl,-z,defs -o $(MAIN) $(OBJS) $(LIBS)
29   -
30   -.cpp.o:
31   - $(CXX) $(CXXFLAGS) -std=c++11 -c $< -o $@
32   -
33   -thrift_line: line.thrift
34   - mkdir -p thrift_line
35   - $(THRIFT) --gen cpp -out thrift_line line.thrift
  1 +all:
  2 + $(MAKE) -C libpurple
36 3  
37 4 .PHONY: clean
38 5 clean:
39   - rm -f $(MAIN)
40   - rm -f *.o
41   - rm -rf thrift_line
  6 + $(MAKE) -C libpurple clean
42 7  
43 8 .PHONY: user-install
44 9 user-install: all
45   - install -D $(MAIN) ~/.purple/plugins/$(MAIN)
  10 + $(MAKE) -C libpurple user-install
46 11  
47 12 .PHONY: user-uninstall
48 13 user-uninstall:
49   - rm -f ~/.purple/plugins/$(MAIN)
  14 + $(MAKE) -C libpurple user-uninstall
50 15  
51 16 .PHONY: install
52 17 install: all
53   - install -D $(MAIN) $(DESTDIR)$(PURPLE_PLUGIN_DIR)/$(MAIN)
  18 + $(MAKE) -C libpurple install
54 19  
55 20 .PHONY: uninstall
56 21 uninstall:
57   - rm -f $(DESTDIR)$(PURPLE_PLUGIN_DIR)/$(MAIN)
58   -
59   -depend: .depend
60   -
61   -.depend: thrift_line $(REAL_SRCS)
62   - rm -f .depend
63   - $(CXX) $(CXXFLAGS) -MM $(REAL_SRCS) >>.depend
64   -
65   --include .depend
  22 + $(MAKE) -C libpurple uninstall
... ...
libpurple/Makefile 0 → 100644
  1 +CXX = g++
  2 +CXXFLAGS = -g -Wall -shared -fPIC \
  3 + -DHAVE_INTTYPES_H -DHAVE_CONFIG_H -DPURPLE_PLUGINS \
  4 + `pkg-config --cflags purple thrift`
  5 +THRIFT = thrift
  6 +
  7 +LIBS = `pkg-config --libs purple thrift`
  8 +
  9 +PURPLE_PLUGIN_DIR:=$(shell pkg-config --variable=plugindir purple)
  10 +PURPLE_DATA_ROOT_DIR:=$(shell pkg-config --variable=datarootdir purple)
  11 +
  12 +MAIN = libline.so
  13 +
  14 +GEN_SRCS = thrift_line/line_constants.cpp thrift_line/line_types.cpp \
  15 + thrift_line/TalkService.cpp
  16 +REAL_SRCS = pluginmain.cpp linehttptransport.cpp thriftclient.cpp httpclient.cpp \
  17 + purpleline.cpp purpleline_blist.cpp purpleline_chats.cpp purpleline_cmds.cpp \
  18 + purpleline_login.cpp purpleline_write.cpp \
  19 + poller.cpp pinverifier.cpp
  20 +SRCS += $(GEN_SRCS)
  21 +SRCS += $(REAL_SRCS)
  22 +
  23 +OBJS = $(SRCS:.cpp=.o)
  24 +
  25 +all: $(MAIN)
  26 +
  27 +$(MAIN): $(OBJS)
  28 + $(CXX) $(CXXFLAGS) -Wl,-z,defs -o $(MAIN) $(OBJS) $(LIBS)
  29 +
  30 +.cpp.o:
  31 + $(CXX) $(CXXFLAGS) -std=c++11 -c $< -o $@
  32 +
  33 +thrift_line: line.thrift
  34 + mkdir -p thrift_line
  35 + $(THRIFT) --gen cpp -out thrift_line line.thrift
  36 +
  37 +.PHONY: clean
  38 +clean:
  39 + rm -f $(MAIN)
  40 + rm -f *.o
  41 + rm -rf thrift_line
  42 +
  43 +.PHONY: user-install
  44 +user-install: all
  45 + install -D $(MAIN) ~/.purple/plugins/$(MAIN)
  46 +
  47 +.PHONY: user-uninstall
  48 +user-uninstall:
  49 + rm -f ~/.purple/plugins/$(MAIN)
  50 +
  51 +.PHONY: install
  52 +install: all
  53 + install -D $(MAIN) $(DESTDIR)$(PURPLE_PLUGIN_DIR)/$(MAIN)
  54 +
  55 +.PHONY: uninstall
  56 +uninstall:
  57 + rm -f $(DESTDIR)$(PURPLE_PLUGIN_DIR)/$(MAIN)
  58 +
  59 +depend: .depend
  60 +
  61 +.depend: thrift_line $(REAL_SRCS)
  62 + rm -f .depend
  63 + $(CXX) $(CXXFLAGS) -MM $(REAL_SRCS) >>.depend
  64 +
  65 +-include .depend
... ...
constants.hpp renamed to libpurple/constants.hpp
httpclient.cpp renamed to libpurple/httpclient.cpp
httpclient.hpp renamed to libpurple/httpclient.hpp
line.thrift renamed to libpurple/line.thrift
linehttptransport.cpp renamed to libpurple/linehttptransport.cpp
linehttptransport.hpp renamed to libpurple/linehttptransport.hpp
pinverifier.cpp renamed to libpurple/pinverifier.cpp
pinverifier.hpp renamed to libpurple/pinverifier.hpp
pluginmain.cpp renamed to libpurple/pluginmain.cpp
poller.cpp renamed to libpurple/poller.cpp
poller.hpp renamed to libpurple/poller.hpp
purpleline.cpp renamed to libpurple/purpleline.cpp
purpleline.hpp renamed to libpurple/purpleline.hpp
purpleline_blist.cpp renamed to libpurple/purpleline_blist.cpp
purpleline_chats.cpp renamed to libpurple/purpleline_chats.cpp
purpleline_cmds.cpp renamed to libpurple/purpleline_cmds.cpp
purpleline_login.cpp renamed to libpurple/purpleline_login.cpp
purpleline_write.cpp renamed to libpurple/purpleline_write.cpp
thriftclient.cpp renamed to libpurple/thriftclient.cpp
thriftclient.hpp renamed to libpurple/thriftclient.hpp
wrapper.hpp renamed to libpurple/wrapper.hpp