X-Git-Url: http://git.code-monkey.de/?a=blobdiff_plain;ds=sidebyside;f=src%2FMakefile;h=100f84576bd4bb463dcdedbd2c3149c9af83f610;hb=de391bf21ea3739d52e7f8b8c3c1b9df27b4537c;hp=e66f475ec9e31f5fe5f89f3d0c88f76e841ea4a0;hpb=6a6908d7031a79b5767d86a4da056f65a742ac9f;p=umurmur.git diff --git a/src/Makefile b/src/Makefile index e66f475..100f845 100644 --- a/src/Makefile +++ b/src/Makefile @@ -1,22 +1,53 @@ -# build helloworld executable when user executes "make" +SRCS:=client.c main.c messages.c pds.c server.c ssl.c log.c conf.c crypt.c \ + timer.c messagehandler.c channel.c Mumble.pb-c.c voicetarget.c -SRCS:=client.c main.c messages.c pds.c server.c ssl.c log.c conf.c crypt.c timer.c messagehandler.c channel.c OBJS:=$(patsubst %.c, %.o, $(SRCS)) -CFLAGS:=$(CFLAGS) -Wall -Os -g -LDFLAGS:=$(LDFLAGS) -lcrypto -lssl -lconfig -umurmurd:$(OBJS) depend.mak - $(CC) $(LDFLAGS) $(OBJS) -o umurmurd +# If PolarSSL is in a nonstandard place. Usually not available in e.g. Fedora. +POLARSSL_LIB:=../../../../polarssl/polarssl-0.12.1/library/libpolarssl.a +POLARSSL_INCLUDE:=../../../../polarssl/polarssl-0.12.1/include + +# **** Stuff used for debugging ****** +# For Valgrind +#CFLAGS:=$(CFLAGS) -I. -I/data/export/proj/openssl/include/ -Wall +#LDFLAGS:=$(LDFLAGS) -L/data/export/proj/openssl/lib/ -lcrypto -lssl -lconfig + +# PolarSSL +#CFLAGS:=$(CFLAGS) -DUSE_POLARSSL -I. -I$(POLARSSL_INCLUDE) -Wall +#LDFLAGS:=$(LDFLAGS) -L $(POLARSSL_LIB) -lconfig + +# Debug +#CFLAGS:=$(CFLAGS) -DDEBUG -g +# ********** END ************ + + +# Build support and link to PolarSSL +#EXTRA_CFLAGS:=-DUSE_POLARSSL -I$(POLARSSL_INCLUDE) +#EXTRA_LDLAGS:=-lpolarssl +#SSL_LIB:=$(POLARSSL_LIB) + +# OpenSSL +EXTRA_CFFLAGS:= +EXTRA_LDFLAGS:=-lcrypto -lssl + +CFLAGS:=$(CFLAGS) -I. -Wall $(EXTRA_CFLAGS) +LDFLAGS:=$(LDFLAGS) -lconfig $(EXTRA_LDFLAGS) + +umurmurd:google/protobuf-c/libprotobuf_c.a depend.mak $(OBJS) + $(CC) $(LDFLAGS) $(OBJS) $(SSL_LIB) google/protobuf-c/libprotobuf_c.a -o umurmurd + +google/protobuf-c/libprotobuf_c.a: + $(MAKE) -C google/protobuf-c/ -# remove object files and executable when user executes "make clean" clean: - rm *.o umurmurd + $(MAKE) -C google/protobuf-c/ clean + rm -f *.o umurmurd depend.mak -all: umurmur +all: umurmurd $(OBJS): Makefile depend.mak: - $(CC) -M $(SRCS) > depend.mak + $(CC) $(CFLAGS) -M $(SRCS) > depend.mak include depend.mak \ No newline at end of file