-
Notifications
You must be signed in to change notification settings - Fork 32
/
Makefile
33 lines (26 loc) · 868 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
# Customise these as appropriate
MODNAME = mod_event_kafka.so
MODOBJ = mod_event_kafka.o
MODCFLAGS = -Wall -Werror
MODLDFLAGS = -lssl
CXX = g++
CXXFLAGS = -fPIC -g -ggdb -I/usr/include `pkg-config --cflags freeswitch` $(MODCFLAGS) -std=c++17 -fpermissive -o2
LDFLAGS = `pkg-config --libs freeswitch` -lrdkafka -lz -lpthread -lrt $(MODLDFLAGS)
.PHONY: all
all: $(MODNAME)
$(MODNAME): $(MODOBJ)
@$(CXX) -shared -o $@ $(MODOBJ) $(LDFLAGS)
.cpp.o: $<
@$(CXX) $(CXXFLAGS) -o $@ -c $<
.PHONY: clean
clean:
rm -f $(MODNAME) $(MODOBJ)
.PHONY: install
install: $(MODNAME)
install -d $(DESTDIR)/usr/lib/freeswitch/mod
install $(MODNAME) $(DESTDIR)/usr/lib/freeswitch/mod
install -d $(DESTDIR)/etc/freeswitch/autoload_configs
install event_kafka.conf.xml $(DESTDIR)/etc/freeswitch/autoload_configs/
.PHONY: release
release: $(MODNAME)
distribution/make-deb.sh