## ####### Makefile.head for nocol ######## # # $Header: /home/vikas/src/nocol/RCS/Makefile.head,v 1.3 2000/01/19 04:08:08 vikas Exp $ ## # Set ROOTDIR here to a directory where everything will be installed # (etc, data). 'netconsole' does a chroot to this directory when it runs. #SRCDIR= `pwd` #ROOTDIR= /usr/local/nocol #MANDIR = $(ROOTDIR)/man #MANEXT = n #NLOG_HOST = nocol.navya.com # host running the noclogd daemon #OPSMAIL = ops@your.domain # periodical condition reports # Set the SHELL else make will fail on good old IRIX... (sigh!!) SHELL=/bin/sh ROOTDIR=/usr/local/nocol SRCDIR=/mnt/gmirror/ports/net-mgmt/nocol/work/nocol-4.3.1 MANDIR=/usr/local/nocol/man MANEXT=n LOGHOST=darwintel OPSMAIL=nocol-ops@darwintel CRITMAIL=nocol-crit@darwintel PERL=/usr/local/bin/perl OS_LIBS= OS_CFLAGS= AR=ar r RANLIB=ranlib INSTALL=install # BINDIR where the programs are installed # ETCDIR location of configuration files # PIDDIR where programs create their pid files and error files # DATADIR where datafiles for monitoring programs are created # MSGSDIR for message files that the nocol display shows in # in the 'messages' sub-window # HELPDIR where helpfiles for webnocol are kept. # EXAMPLESDIR directory to store example config files BINDIR= $(ROOTDIR)/bin ETCDIR= $(ROOTDIR)/etc PIDDIR= $(ROOTDIR)/run DATADIR= $(ROOTDIR)/data MSGSDIR= $(ROOTDIR)/msgs HELPDIR= $(ROOTDIR)/help EXAMPLESDIR= $(ETCDIR)/samples ## # NOCOL specific definitions: # -DNOCOL Always defined. # -DNOMULTIPING If you dont want to use 'multiping'. # NOCOLDEFS = -DNOCOL # #'GCC' earlier than 2.x might fail on Sparc # -DDEBUG # CC = gcc CFLAGS = -O $(NOCOLDEFS) $(OS_CFLAGS) -I$(SRCDIR)/include LIBS = -L$(SRCDIR)/lib $(OS_LIBS) -lnocol YACC = yacc ## # Following is so that all the sub-Makefile's can do a rm $(DIRT) # in their 'clean' DIRT = $(OBJS) $(TARG) *.o core a.out ## ####### END Makefile.head ######## ## # $Header: /home/vikas/src/nocol/netconsole/RCS/Makefile.mid,v 1.1 1998/07/31 18:21:46 vikas Exp $ # # Makefile for 'netconsole' # # # ETC is used for dumping the HELPFILE in that directory HELPFILE = $(ETCDIR)/netconsole-help CURSESLIB = -lcurses -ltermcap # Program specific compilation flags and libraries PROGCDEFS = -DDATADIR=\"$(DATADIR)\" -DMSGSDIR=\"$(MSGSDIR)\" \ -DHELPFILE=\"$(HELPFILE)\" PROGLIBS = $(CURSESLIB) TARG = netconsole OBJS = build_display.o event_dpy.o fill_window.o filter.o \ help_page.o msg_dpy.o netconsole.o parse_input.o \ poll_input.o read_filter.o setup_display.o utils.o $(TARG): $(OBJS) Makefile $(CC) $(CFLAGS) $(OBJS) $(LIBS) $(PROGLIBS) -o $@ install: installdir $(TARG) $(INSTALL) -c -m 751 $(TARG) $(BINDIR) $(INSTALL) -c -m 0444 netconsole-help $(HELPFILE) clean: rm -f $(DIRT) filter rcs: @echo "Doing 'rcs' in $(TARG)" @-for i in $(OBJS); do \ $(CO) -q `basename $$i .o`.c ;\ done ## ####### Makefile.tail ####### # # $Header: /home/vikas/src/nocol/RCS/Makefile.tail,v 1.3 2000/01/19 04:08:08 vikas Exp $ # # Define TARG to be the binaries and ETCFILES to put into ETCDIR .c.o: $(CC) $(CFLAGS) $(PROGCDEFS) -c $< installdir: @[ -d $(ROOTDIR) ] || mkdir $(ROOTDIR) @[ -d $(ETCDIR) ] || mkdir $(ETCDIR) @[ -d $(PIDDIR) ] || mkdir $(PIDDIR) @[ -d $(BINDIR) ] || mkdir $(BINDIR) @[ -d $(DATADIR) ] || mkdir $(DATADIR) @[ -d $(MSGSDIR) ] || mkdir $(MSGSDIR) @[ -d $(EXAMPLESDIR) ] || mkdir -p $(EXAMPLESDIR) depend: mkdep $(CFLAGS) `echo $(OBJS) | sed 's/\.o[ $]+/\.c/g'` ## ######## END Makefile.tail ##########