diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2005-08-09 09:27:42 +0000 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2005-08-09 09:27:42 +0000 |
commit | 25a1b5bb9e8b8077829fa322eb2013b47e80f5e8 (patch) | |
tree | ab92b7a672ae6d6dd84f9cb697bbd87c45fc4646 | |
parent | 9e12167740b6ce46487c7bb5c5554b5c807d2431 (diff) | |
download | rsyslog-25a1b5bb9e8b8077829fa322eb2013b47e80f5e8.tar.gz rsyslog-25a1b5bb9e8b8077829fa322eb2013b47e80f5e8.tar.bz2 rsyslog-25a1b5bb9e8b8077829fa322eb2013b47e80f5e8.zip |
restructured makefile, because debian make has different syntax...
-rw-r--r-- | Makefile | 90 | ||||
-rw-r--r-- | freebsd/Makefile | 54 | ||||
-rw-r--r-- | syslogd.c | 2 |
3 files changed, 76 insertions, 70 deletions
@@ -1,50 +1,9 @@ # Makefile for rsyslog # Copyright (C) 2004, 2005 Rainer Gerhards and Adiscon GmbH +# This is the part of the makefile common to all distros. # For details, see http://www.rsyslog.com/doc -############################################################# -# USER SETTINGS # -# ------------- # -# The following lines allow you to customize the way # -# rsyslog is build. All variables take a value of 0 or zero # -# with 1 meaning true and 0 meaning false (in most cases # -# equivalent to "disabled"). If you need to customize any- # -# thing do it here - and stay away from all other parts # -# of this file! # -# # -# IMPORTANT: after you have made changes, run "make clean" # -# before any other command! # -############################################################# - -# Enable large file support (typically on, not needed on -# 64 bit operating systems) -FEATURE_LARGEFILE=1 - -# Enable database support (off by default, must be turned -# on when support for MySQL is desired). -FEATURE_DB=0 - -############################################################# -# END OF USER SETTINGS # -# -------------------- # -# DO NOT MAKE ANY MODIFICATIONS BELOW THIS POINT! # -############################################################# - -INSTALL = install -BINDIR = /usr/sbin -MANDIR = /usr/share/man - - -# now comes the evaluation of the FEATURE_* settings -ifeq ($(strip $(FEATURE_LARGEFILE)), 0) - NOLARGEFILE = -DNOLARGEFILE -endif - -ifeq ($(strip $(FEATURE_DB)), 1) - WITHDB=-DWITHDB -endif - -CC= gcc +#CC= gcc #CFLAGS= -g -DSYSV -Wall # Add the -DMTRACE macro if you would like to use mtrace() # to hunt for memory leaks @@ -55,11 +14,6 @@ CC= gcc CFLAGS= $(RPM_OPT_FLAGS) -O3 -DSYSV -fomit-frame-pointer -Wall -fno-strength-reduce -I/usr/local/include $(NOLARGEFILE) $(WITHDB) LDFLAGS= -s -# Include MySQL client lib if DB is selected -ifdef WITHDB -LIBS = -lmysqlclient -L/usr/local/lib/mysql -endif - # There is one report that under an all ELF system there may be a need to # explicilty link with libresolv.a. If linking syslogd fails you may wish # to try uncommenting the following define. @@ -77,10 +31,9 @@ SYSLOGD_PIDNAME = -DSYSLOGD_PIDNAME=\"rsyslogd.pid\" SYSLOGD_FLAGS= -DSYSLOG_INET -DSYSLOG_UNIXAF ${FSSTND} \ ${SYSLOGD_PIDNAME} SYSLOG_FLAGS= -DALLOW_KERNEL_LOGGING -DEB = .c.o: - ${CC} ${CFLAGS} -c $*.c + ${CC} ${CFLAGS} -c $(VPATH)/$*.c all: syslogd @@ -91,32 +44,16 @@ install: install_man install_exec syslogd: syslogd.o pidfile.o template.o stringbuf.o srUtils.o outchannel.o ${CC} ${LDFLAGS} -o syslogd syslogd.o pidfile.o template.o outchannel.o stringbuf.o srUtils.o ${LIBS} -syslog_tst: syslog_tst.o - ${CC} ${LDFLAGS} -o syslog_tst syslog_tst.o - -tsyslogd: syslogd.c syslogd.h version.h template.o outchannel.o stringbuf.o srUtils.o - $(CC) $(CFLAGS) -g -DTESTING $(SYSLOGD_FLAGS) -o tsyslogd syslogd.c pidfile.o template.o outchannel.o stringbuf.o srUtils.o $(LIBS) - srUtils.o: srUtils.c srUtils.h liblogging-stub.h - ${CC} ${CFLAGS} ${SYSLOGD_FLAGS} $(DEB) -c srUtils.c - stringbuf.o: stringbuf.c stringbuf.h liblogging-stub.h - ${CC} ${CFLAGS} ${SYSLOGD_FLAGS} $(DEB) -c stringbuf.c - template.o: template.c template.h stringbuf.h liblogging-stub.h - ${CC} ${CFLAGS} ${SYSLOGD_FLAGS} $(DEB) -c template.c - outchannel.o: outchannel.c outchannel.h stringbuf.h liblogging-stub.h syslogd.h - ${CC} ${CFLAGS} ${SYSLOGD_FLAGS} $(DEB) -c outchannel.c syslogd.o: syslogd.c version.h template.h outchannel.h syslogd.h - ${CC} ${CFLAGS} ${SYSLOGD_FLAGS} $(DEB) -c syslogd.c + ${CC} ${CFLAGS} ${SYSLOGD_FLAGS} -c $(VPATH)/syslogd.c syslog.o: syslog.c - ${CC} ${CFLAGS} ${SYSLOG_FLAGS} -c syslog.c - -syslog_tst.o: syslog_tst.c - ${CC} ${CFLAGS} -c syslog_tst.c + ${CC} ${CFLAGS} ${SYSLOG_FLAGS} -c $(VPATH)/syslog.c clean: rm -f *.o *.log *~ *.orig syslogd @@ -128,5 +65,18 @@ install_exec: syslogd ${INSTALL} -b -s syslogd ${DESTDIR}${BINDIR}/rsyslogd install_man: - ${INSTALL} rsyslogd.8 ${DESTDIR}${MANDIR}/man8/rsyslogd.8 - ${INSTALL} rsyslog.conf.5 ${DESTDIR}${MANDIR}/man5/rsyslog.conf.5 + ${INSTALL} $(VPATH)/rsyslogd.8 ${DESTDIR}${MANDIR}/man8/rsyslogd.8 + ${INSTALL} $(VPATH)/rsyslog.conf.5 ${DESTDIR}${MANDIR}/man5/rsyslog.conf.5 + +# The following lines are some legacy from sysklogd, which we might need +# again in the future. So it is just commented out for now, eventually +# to be revived. rgerhards 2005-08-09 + +#syslog_tst: syslog_tst.o +# ${CC} ${LDFLAGS} -o syslog_tst syslog_tst.o + +#tsyslogd: syslogd.c syslogd.h version.h template.o outchannel.o stringbuf.o srUtils.o +# $(CC) $(CFLAGS) -g -DTESTING $(SYSLOGD_FLAGS) -o tsyslogd syslogd.c pidfile.o template.o outchannel.o stringbuf.o srUtils.o $(LIBS) +#syslog_tst.o: syslog_tst.c +# ${CC} ${CFLAGS} -c syslog_tst.c + diff --git a/freebsd/Makefile b/freebsd/Makefile new file mode 100644 index 00000000..2ac01f22 --- /dev/null +++ b/freebsd/Makefile @@ -0,0 +1,54 @@ +# Makefile for rsyslog +# Copyright (C) 2004, 2005 Rainer Gerhards and Adiscon GmbH +# This is the distro-specifc part of the Makefile. +# For details, see http://www.rsyslog.com/doc + +############################################################# +# USER SETTINGS # +# ------------- # +# The following lines allow you to customize the way # +# rsyslog is build. All variables take a value of 0 or zero # +# with 1 meaning true and 0 meaning false (in most cases # +# equivalent to "disabled"). If you need to customize any- # +# thing do it here - and stay away from all other parts # +# of this file! # +# # +# IMPORTANT: after you have made changes, run "make clean" # +# before any other command! # +############################################################# + +# Enable large file support (typically on, not needed on +# 64 bit operating systems) +FEATURE_LARGEFILE=1 + +# Enable database support (off by default, must be turned +# on when support for MySQL is desired). +FEATURE_DB=1 + +############################################################# +# END OF USER SETTINGS # +# -------------------- # +# DO NOT MAKE ANY MODIFICATIONS BELOW THIS POINT! # +############################################################# + +INSTALL = install +BINDIR = /usr/sbin +MANDIR = /usr/share/man + + +# now comes the evaluation of the FEATURE_* settings +.if $(FEATURE_LARGEFILE) == 0 + NOLARGEFILE = -DNOLARGEFILE +.endif + +.if $(FEATURE_DB) == 1 + WITHDB=-DWITHDB +.endif + +# Include MySQL client lib if DB is selected +.ifdef WITHDB +LIBS = -lmysqlclient -L/usr/local/lib/mysql +.endif + +VPATH = .. +.include "../Makefile" @@ -895,6 +895,7 @@ void TCPSessDataRcvd(int iTCPSess, char *pData, int iLen) pEnd = pData + iLen; /* this is one off, which is intensional */ while(pData < pEnd) { +printf("## in loop\n"); if(iMsg >= MAXLINE) { /* emergency, we now need to flush, no matter if * we are at end of message or not... @@ -912,6 +913,7 @@ void TCPSessDataRcvd(int iTCPSess, char *pData, int iLen) printline(TCPSessions[iTCPSess].fromHost, pMsg, SOURCE_INET); iMsg = 0; ++pData; +printf("## record delim found\n"); } else { *(pMsg + iMsg++) = *pData++; } |