af5aa3dd5cd8f4ebf55a6c850a0035cd870b78bd
[umurmur.git] / src / Makefile
1 SRCS:=client.c main.c messages.c pds.c server.c ssl.c log.c conf.c crypt.c \
2         timer.c messagehandler.c channel.c Mumble.pb-c.c voicetarget.c
3
4 OBJS:=$(patsubst %.c, %.o, $(SRCS))
5
6 POLARSSL_LIB:=../../../../polarssl/polarssl-0.12.1/library/libpolarssl.a
7
8 # For Valgrind
9 #CFLAGS:=$(CFLAGS) -I. -I/data/export/proj/openssl/include/ -Wall -g -DDEBUG
10 #LDFLAGS:=$(LDFLAGS) -L/data/export/proj/openssl/lib/ -lcrypto -lssl -lconfig
11
12 # PolarSSL
13 CFLAGS:=$(CFLAGS) -DDEBUG -DUSE_POLARSSL -I. -I../../../../polarssl/polarssl-0.12.1/include -Wall -g
14 LDFLAGS:=$(LDFLAGS) -L  -lpolarssl -lconfig
15
16 # OpenSSL
17 #CFLAGS:=$(CFLAGS) -I. -Wall
18 #LDFLAGS:=$(LDFLAGS) -L  -lcrypto -lssl -lconfig
19
20 # Debug
21 #CFLAGS:=$(CFLAGS) -DDEBUG -I. -Wall -g
22
23 # PolarSSL
24 umurmurd:google/protobuf-c/libprotobuf_c.a depend.mak $(OBJS) $(POLARSSL_LIB)
25         $(CC) $(LDFLAGS) $(OBJS) $(POLARSSL_LIB) google/protobuf-c/libprotobuf_c.a -o umurmurd
26
27 # OpenSSL
28 #umurmurd:google/protobuf-c/libprotobuf_c.a depend.mak $(OBJS)
29 #       $(CC) $(LDFLAGS) $(OBJS) google/protobuf-c/libprotobuf_c.a -o umurmurd
30
31 google/protobuf-c/libprotobuf_c.a:
32         $(MAKE) -C google/protobuf-c/
33
34 clean:
35         $(MAKE) -C google/protobuf-c/ clean
36         rm -f *.o umurmurd depend.mak
37
38 all: umurmurd
39
40 $(OBJS): Makefile
41
42 depend.mak:
43         $(CC) $(CFLAGS) -M $(SRCS) > depend.mak
44
45 include depend.mak