aboutsummaryrefslogtreecommitdiffstats
path: root/modules/key_emitter/Makefile
diff options
context:
space:
mode:
authorricho <richo@psych0tik.net>2011-07-18 03:36:40 +0000
committerricho <richo@psych0tik.net>2011-07-18 03:36:40 +0000
commite4b9ea15d7abdae8211d18737fa54933f3faf57b (patch)
treefda4cc23faebfd1f130578b39fe161fe4c0ba1f8 /modules/key_emitter/Makefile
parentAdded goodnicks from richoH/richos-irssi (diff)
parentOnly attempt join if channel exists (diff)
downloadirssi-scripts-e4b9ea15d7abdae8211d18737fa54933f3faf57b.tar.gz
irssi-scripts-e4b9ea15d7abdae8211d18737fa54933f3faf57b.zip
Merge branch 'master' into richoH-dev
Diffstat (limited to 'modules/key_emitter/Makefile')
-rw-r--r--modules/key_emitter/Makefile57
1 files changed, 57 insertions, 0 deletions
diff --git a/modules/key_emitter/Makefile b/modules/key_emitter/Makefile
new file mode 100644
index 0000000..d7e3dd5
--- /dev/null
+++ b/modules/key_emitter/Makefile
@@ -0,0 +1,57 @@
+
+### Edit these parameters ###
+
+# change this to 'find' if you're on a decent system.
+FIND = gfind # stupid OSX non-gnu defaults.
+
+# Where your irssi include files live. You might need to install an
+# 'irssi-dev' package or something like that.
+IRSSI_DIST = /opt/stow/repo/irssi-debug/include/irssi
+
+# probably $(HOME)/.irssi for most people.
+IRSSI_USER_DIR = $(HOME)/projects/tmp/test/irssi-debug
+MODULE_NAME = key_emitter
+
+### You shouldn't need to edit anything beyond this point ###
+
+LIB_NAME = lib$(MODULE_NAME).so
+CFLAGS = -Wall -O2 -Werror -g -DMODULE_NAME=\"$(MODULE_NAME)\"
+LDFLAGS = -avoid-version -module -bundle -flat_namespace -undefined suppress
+
+# When you start adding more components to your module, add them here.
+OBJECTS = key_emitter_core.o \
+ key_emitter_impl.o
+
+IRSSI_INCLUDE = -I$(IRSSI_DIST) \
+ -I$(IRSSI_DIST)/src \
+ -I$(IRSSI_DIST)/src/fe-common/core \
+ -I$(IRSSI_DIST)/src/core \
+ -I$(IRSSI_DIST)/src/fe-text \
+ -I$(IRSSI_DIST)/src/irc \
+ -I$(IRSSI_DIST)/src/irc/core \
+ -I$(IRSSI_DIST)/src/irc/dcc \
+ -I$(IRSSI_DIST)/src/irc/notifylist
+
+
+GLIB_CFLAGS = $(shell pkg-config glib-2.0 --cflags)
+
+all: $(LIB_NAME)
+
+%.o: %.c Makefile
+ $(CC) $(CFLAGS) $(GLIB_CFLAGS) $(IRSSI_INCLUDE) -I. -fPIC -c $<
+
+$(LIB_NAME): $(OBJECTS)
+ $(CC) $(CFLAGS) $(LDFLAGS) $(OBJECTS) -o $@
+
+install: $(LIB_NAME)
+ install $< $(IRSSI_USER_DIR)/modules
+
+clean:
+ rm -rf *~ *.o *.so core || true
+
+TAGS:
+ $(FIND) -type f -exec etags -a -o TAGS {} \;
+
+.default: all
+
+.phony: clean install TAGS