Added write_or_die routines, make it compile again
[transsip-mirror.git] / src / transsip / Makefile
blob41a7a13c41714e3fcfeb48435b0570612bacdb68
2 # Makefile for transsip
3 # Author: Daniel Borkmann
6 include ../definitions.mk
8 INCLUDE = -I.. -I./include/
9 LIBS = ./nacl/libnacl.a -lspeexdsp -lasound -lcelt0 -lm -lreadline -lpthread
11 core-objs = transsip.o
12 lib-objs = xmalloc.o \
13 stun.o \
14 alsa.o \
15 cli.o \
16 call.o \
17 curve.o \
18 mtrand.o \
19 write_or_die.o \
20 strlcpy.o
21 # dht.o \
23 target = transsip
25 all: clean gen-version build-nacl build doc
26 debug: all
27 develop: all
29 gen-version:
30 @cd .. && cat ../VERSION | xargs ./gen_build_info.pl
32 build-nacl:
33 @sh ./nacl.sh
35 build: $(lib-objs) $(core-objs)
36 @$(LD) $(target) $(core-objs) $(lib-objs) $(LIBS)
37 @strip $(target)
39 doc:
40 # @cd ../../Documentation && make clean
41 # @cd ../../Documentation && make transsip
42 # @cp ../../Documentation/man/* .
43 # @cp ../../Documentation/pdf/* .
44 # @cp ../../Documentation/html/* .
46 %.o: ../%.c
47 @$(CC) $(CFLAGS) $(INCLUDE) $<
49 clean-nacl:
50 @rm -rf ./nacl/ ./tmp/ ./include/
52 clean:
53 @rm *.o *~ $(target) ../version.h *.gz *.pdf *.html *.8 *.css \
54 ../parser.tab.c ../parser.tab.h ../lex.yy.c *.rc \
55 $(DIR_SND)/*.o $(DIR_COD)/*.o $(DIR_CRY)/*.o > /dev/null 2>&1 || true
57 install:
58 @install -D $(target) $(DESTDIR)/$(BINDIR)/$(target)
59 @install -D $(target).8.gz $(DESTDIR)/usr/share/man/man8/$(target).8.gz
61 uninstall:
62 @rm $(DESTDIR)/$(BINDIR)/$(target) || true
63 @rm $(DESTDIR)/usr/share/man/man8/$(target).8.gz || true
65 help:
66 @echo 'Cleaning targets:'
67 @echo ' clean - Remove generated files'
68 @echo 'Building targets:'
69 @echo ' all - Build transsip (default)'
70 @echo 'Setup targets:'
71 @echo ' install - Install transsip'
72 @echo ' uninstall - Uninstall transsip'
73 @echo 'Other targets:'
74 @echo ' help - Print this help'