summaryrefslogtreecommitdiffstats
path: root/Makefile
blob: 9cb3d0f60fda34069e7144587a94528def028090 (plain)
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
CC = gcc

PYTHON = /usr/include/python2.4
IRSSI = /usr/local/include/irssi

CFLAGS = -fpic -ggdb -Wall -I$(PYTHON) -I$(IRSSI) -I$(IRSSI)/src \
-I$(IRSSI)/src/fe-common/core -I$(IRSSI)/src/core -I$(IRSSI)/src/fe-text \
-I$(IRSSI)/src/irc -I$(IRSSI)/src/irc/core -I$(IRSSI)/src/irc/dcc \
-I$(IRSSI)/src/irc/notifylist -I.. -I. -Iobjects \
`pkg-config glib-2.0 --cflags`

LDFLAGS = -fpic /usr/lib/libpython2.4.so

OBJ = pycore.o pyutils.o pymodule.o pyloader.o pysignals.o 

pyirssi: pyobjects.a $(OBJ)
	$(CC) -shared -o libirssi_python.so $(OBJ) objects/pyobjects.a $(LDFLAGS)

pyobjects.a: 
	cd objects/ && make

%.o: %.c
	$(CC) -c $< $(CFLAGS)

signalmap:
	python sig2code.py < ~/irssi-0.8.10/docs/signals.txt > pysigmap.h

clean:
	rm -f *.o *.so
	cd objects/ && make clean