0d8fe7764dcc150570c9668974569f7e6c0ee9ee
[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 # **** Stuff used for debugging ******
7 # For Valgrind OpenSSL
8 #EXTRA_CFLAGS:=$(CFLAGS) -I/data/export/proj/openssl/include/
9 #EXTRA_LDFLAGS:=$(LDFLAGS) -L/data/export/proj/openssl/lib/ -lcrypto -lssl
10
11 # Debug
12 # CFLAGS:=$(CFLAGS) -DDEBUG -g
13 # ********** Debug stuff END ************
14
15
16 # Build support and link to PolarSSL
17 # If PolarSSL is in a nonstandard place.
18 # POLARSSL_LIB:=../../../polarssl/polarssl-0.12.1/library/libpolarssl.a
19 # SSL_LIB:=$(POLARSSL_LIB) # If statically linking
20 # POLARSSL_INCLUDE:=../../../polarssl/polarssl-0.12.1/include
21 # EXTRA_CFLAGS:=-DUSE_POLARSSL -I$(POLARSSL_INCLUDE)
22 # EXTRA_LDLAGS:=-lpolarssl
23
24
25 # OpenSSL - usually installed at a standard place
26 # EXTRA_CFLAGS:=
27 # EXTRA_LDFLAGS:=-lcrypto -lssl 
28
29 CFLAGS:=$(CFLAGS) -I. -Wall $(EXTRA_CFLAGS)
30 LDFLAGS:=$(EXTRA_LDFLAGS) $(LDFLAGS) -lconfig 
31
32 umurmurd:google/protobuf-c/libprotobuf_c.a $(OBJS)
33         $(CC) $(LDFLAGS) $(OBJS) $(SSL_LIB) google/protobuf-c/libprotobuf_c.a -o umurmurd
34
35 google/protobuf-c/libprotobuf_c.a:
36         $(MAKE) -C google/protobuf-c/
37
38 clean:
39         $(MAKE) -C google/protobuf-c/ clean
40         rm -f *.o umurmurd
41
42 all: umurmurd
43
44 $(OBJS): Makefile
45