################################################################################ # opendd Makefile # # Possible environment variables : # USE_SOCKET_SSL=y to enable SSL socket # CC = cc FLAGS = -ansi -Wall -O2 -fno-strict-aliasing # -pedantic BIN_PROGRAM = opendd COMMON_SRCS = ./include/io.c\ ./include/util.c\ ./include/socket.c\ ./include/networklib.c\ ./include/chain_string.c\ ./include/chain.c\ ./include/option.c\ ./include/config_option.c\ ./include/wrapper.c\ ./include/sendmail.c\ ./include/base64.c COMMON_OBJS = ${COMMON_SRCS:.c=.o} SRCS = ./iface.c\ ./daemon.c\ ./opendd.c\ ./globals.c OBJS = ${SRCS:.c=.o} MACROS = -DUSE_SOCKET_SSL SSL = ${MACROS} -lssl -lcrypto all: ${BIN_PROGRAM} ${BIN_PROGRAM}: ${OBJS} ${COMMON_OBJS}; @echo "" @if [ -z "${USE_SOCKET_SSL}" ]; then\ echo "===> Creating OpenDD program ...";\ echo '${CC} ${FLAGS} -o ${BIN_PROGRAM} main.c ${COMMON_OBJS} ${OBJS}';\ ${CC} ${FLAGS} -o ${BIN_PROGRAM} main.c ${COMMON_OBJS} ${OBJS};\ else\ echo "===> Creating OpenDD program WITH SSL ...";\ echo '${CC} ${FLAGS} ${SSL} -o ${BIN_PROGRAM} main.c ${COMMON_OBJS} ${OBJS}';\ ${CC} ${FLAGS} ${SSL} -o ${BIN_PROGRAM} main.c ${COMMON_OBJS} ${OBJS};\ fi @echo "" .c.o: @echo "===> Compiling `basename $*.o` ..." @if [ "$*" = "./include/socket" ] && [ "${USE_SOCKET_SSL}" ]; then\ echo '${CC} ${FLAGS} ${MACROS} -c -o $*.o $*.c';\ ${CC} ${FLAGS} ${MACROS} -c -o $*.o $*.c;\ else\ echo '${CC} ${FLAGS} -c -o $*.o $*.c';\ ${CC} ${FLAGS} -c -o $*.o $*.c;\ fi clean: if [ -f opendd ];then rm -f opendd; fi find ./include -name "*.o" -exec rm -f {} \; find . -name "*.o" -exec rm -f {} \; find . -name "*.core" -exec rm -f {} \; love: @echo "No wars ? ;)"