blob: ba5d787773d4a98152b4873b4d8aba25e82af5cb (
plain) (
blame)
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
|
### 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 = overlay
### 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 = overlay_core.o \
overlay_impl.o
IRSSI_INC = $(HOME)/sources/irssi-git
IRSSI_INCLUDE = -I$(IRSSI_INC) \
-I$(IRSSI_INC)/src \
-I$(IRSSI_INC)/src/fe-common/core \
-I$(IRSSI_INC)/src/core \
-I$(IRSSI_INC)/src/fe-text \
-I$(IRSSI_INC)/src/irc \
-I$(IRSSI_INC)/src/irc/core \
-I$(IRSSI_INC)/src/irc/dcc \
-I$(IRSSI_INC)/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
|