blob: 44ed819ab2fe17b0c6a7cf900e901c6bec9d4987 (
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
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
60
61
|
* fix as-needed issues
* fix parallel build
http://bugs.gentoo.org/show_bug.cgi?id=334861
--- config.mk
+++ config.mk
@@ -22,11 +22,11 @@
LIBS = ${LIB_LIBS}
# flags
-CFLAGS += -fPIC -std=c99 -DUOFF_T_LONG ${INCS}
-LDFLAGS += -shared ${LIBS}
+CFLAGS += -fPIC -std=c99 -DUOFF_T_LONG
+LDFLAGS += -shared
# debug
-CFLAGS += -W -ggdb -Wall -Wno-unused-parameter
+#CFLAGS += -W -ggdb -Wall -Wno-unused-parameter
# compiler and linker
CC = cc
--- src/rules.mk
+++ src/rules.mk
@@ -4,25 +4,27 @@
OBJS = ${SRCS:.c=.o}
-all: ${LIB}
+LIBSO=lib${LIB}.so
+
+all: ${LIBSO}
.c.o:
- ${CC} ${CFLAGS} -o $@ -c $<
+ ${CC} ${CFLAGS} ${INCS} -o $@ -c $<
-${LIB}: ${OBJS}
- ${CC} ${LDFLAGS} -o lib$@.so ${OBJS}
+${LIBSO}: ${OBJS}
+ ${CC} ${LDFLAGS} -o $@ ${OBJS} ${LIBS}
clean:
- rm -f lib${LIB}.so ${OBJS}
+ rm -f ${LIBSO} ${OBJS}
install: all
- @echo installing the module lib${LIB}.so to ${DESTDIR}${IRSSI_LIB}/modules
+ @echo installing the module ${LIBSO} to ${DESTDIR}${IRSSI_LIB}/modules
install -d ${DESTDIR}${IRSSI_LIB}/modules
- install lib${LIB}.so ${DESTDIR}${IRSSI_LIB}/modules
+ install ${LIBSO} ${DESTDIR}${IRSSI_LIB}/modules
uninstall:
- @echo deinstalling the module lib${LIB}.so from ${DESTDIR}${IRSSI_LIB}/modules
- rm -f ${DESTDIR}${IRSSI_LIB}/modules/lib${LIB}.so
+ @echo deinstalling the module ${LIBSO} from ${DESTDIR}${IRSSI_LIB}/modules
+ rm -f ${DESTDIR}${IRSSI_LIB}/modules/${LIBSO}
user-install:
env DESTDIR= IRSSI_LIB=~/.irssi ${MAKE} install
|