summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile27
1 files changed, 27 insertions, 0 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..2c2faf8
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,27 @@
+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. -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)
+
+clean:
+ rm -f *.o *.so
+ cd objects/ && make clean
+