-
Notifications
You must be signed in to change notification settings - Fork 0
/
makefile
45 lines (32 loc) · 1.07 KB
/
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
40
41
42
43
44
45
CC=gcc
CFLAGS=-g -Wall -fPIC `pkgconf --cflags libpjproject`
LDFLAGS=-shared -fPIC `pkgconf --libs libpjproject`
TESTCFLAGS=-g -Wall `pkgconf --cflags libpjproject`
TESTLDFLAGS=`pkgconf --libs libpjproject`
all: voipms.so test_history.o test
config.h:
@echo
@echo 'first run `cp config.h.orig config.h` and edit the values'
@echo
@exit 1
voipms.so: voipms.o buffers.o sip_client.o constify.o history.o
$(CC) $(LDFLAGS) -o $@ $^
voipms.o: voipms.c voipms.h buffers.h sip_client.h config.h
$(CC) $(CFLAGS) -o $@ -c $<
buffers.o: buffers.c buffers.h voipms.h config.h
$(CC) $(CFLAGS) -o $@ -c $<
sip_client.o: sip_client.c sip_client.h voipms.h constify.h config.h
$(CC) $(CFLAGS) -o $@ -c $<
constify.o:constify.c constify.h
$(CC) $(CFLAGS) -Wno-discarded-qualifiers -o $@ -c $<
history.o:history.c history.h
$(CC) $(CFLAGS) -o $@ -c $<
## Testing
test_history.o:history.c history.h
$(CC) $(CFLAGS) -o $@ -c $<
test:test.c test_history.o
$(CC) $(TESTCFLAGS) $^ $(TESTLDFLAGS) -o $@
clean:
rm -f *.o voipms.so test
install: voipms.so
cp voipms.so $(HOME)/.weechat/plugins