bard / purplebridge

This URL has Read+Write access

bard (author)
Sun Aug 10 07:05:06 -0700 2008
purplebridge / Makefile
100644 39 lines (25 sloc) 0.813 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
# If Lua and libpurple on your system aren't installed with package
# config support, enter their paths manually below. Remember that
# libpurple depends on libglib2.0.
 
INC_LUA=$(shell pkg-config lua5.1 --cflags)
LIB_LUA=$(shell pkg-config lua5.1 --libs)
 
INC_PURPLE=$(shell pkg-config purple --cflags)
LIB_PURPLE=$(shell pkg-config purple --libs)
 
 
# No modification should be needed below
 
CFLAGS=$(INC_LUA) $(INC_PURPLE) -g -O2 -Wall
LDLIBS=$(LIB_LUA) $(LIB_PURPLE)
 
all: purplebridge base64.so
 
run: all
./purplebridge
 
%.o: %.c
$(CC) -c $(CFLAGS) $(^) -o $(@)
 
base64.so: lbase64.o
$(CC) -o $(@) -shared $(^)
 
purplebridge: main.o lpurple.o lglib.o tcp_service.o
$(CC) $(LDLIBS) $(^) -o $(@)
 
clean:
rm -f *.o *.so
rm -f purplebridge
 
tags:
find -name '*.[ch]' | etags -
 
.PHONY: clean all run tags