-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
39 lines (28 loc) · 968 Bytes
/
Makefile
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
CFLAGS = -Wall -O2 -Werror -g
LDFLAGS = -avoid-version -module
OBJECTS = lua_loader.o \
lua_core.o \
lua_commands.o \
lua_api.o \
lua_api_settings.o \
lua_api_output.o \
lua_api_commands.o \
lua_api_signals.o \
lua_debug.o
IRSSI_DIST = /usr/include/irssi/
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)
LUA_LIBS = $(shell pkg-config lua --libs)
all: liblua.so
%.o: %.c
$(CC) $(CFLAGS) $(GLIB_CFLAGS) $(IRSSI_INCLUDE) -I. -fPIC -c $<
liblua.so: $(OBJECTS)
$(CC) $(CFLAGS) $(LDFLAGS) $(LUA_LIBS) -fPIC -shared $(OBJECTS) -o $@
install: liblua.so
install $< ~/.irssi/modules/
clean:
rm -rf *~ *.o *.so core || true
.default: all
.phony: clean install