home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The World of Computer Software
/
World_Of_Computer_Software-02-385-Vol-1of3.iso
/
c
/
condor40.zip
/
CONDOR
/
src
/
condor_collect
/
Makefile
< prev
next >
Wrap
Makefile
|
1989-06-01
|
4KB
|
133 lines
#
# Copyright 1986, 1987, 1988, 1989 University of Wisconsin
#
# Permission to use, copy, modify, and distribute this software and its
# documentation for any purpose and without fee is hereby granted,
# provided that the above copyright notice appear in all copies and that
# both that copyright notice and this permission notice appear in
# supporting documentation, and that the name of the University of
# Wisconsin not be used in advertising or publicity pertaining to
# distribution of the software without specific, written prior
# permission. The University of Wisconsin makes no representations about
# the suitability of this software for any purpose. It is provided "as
# is" without express or implied warranty.
#
# THE UNIVERSITY OF WISCONSIN DISCLAIMS ALL WARRANTIES WITH REGARD TO
# THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
# FITNESS. IN NO EVENT SHALL THE UNIVERSITY OF WISCONSIN BE LIABLE FOR
# ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#
# Authors: Allan Bricker and Michael J. Litzkow,
# University of Wisconsin, Computer Sciences Dept.
#
#
#
# The following variables must be passed in to this makefile:
#
# SRCDIR = The pathname (relative or absolute) of the source
# directory (eg. ../src, /var/home/condor/CONDOR/src)
#
# DSTDIR = The pathname (relative or absolute) of the directory
# which will contain the installed binaries and libraries.
# There must be "bin" and "lib" subdirectories within DSTDIR.
#
# COPTS = Default flags to cc (eg -O, -g)
#
# IDENT = Any #defines which are not automatically supplied
# by cpp (eg. -Dsunos40 or -Dsunos32). Note that
# cpp provides definitions for architectures (eg.
# vax, sun, mc68020, sparc)
#
DIRECTORY=condor_collector
PDIR=$(SRCDIR)/$(DIRECTORY)
CFLAGS=$(COPTS) -I$(SRCDIR)/h $(IDENT)
#
# Options to 'ctags'
#
TFLAGS=-dt
#
# Each file in the CSRC list should be prepended by $(PDIR).
#
CSRC=$(PDIR)/collector.c $(PDIR)/event.c
SSRC=
SRC=$(CSRC) $(SSRC)
OBJ=collector.o event.o
LIB=../util_lib/util_lib.a ../xdr_lib/xdr_lib.a
LINTLIB = ../util_lib/llib-lutil.ln ../xdr_lib/llib-lxdr.ln
PROGRAMS=condor_collector
CLEANUP=$(OBJ) $(PROGRAMS) $(PDIR)/Makefile.bak
all: $(PROGRAMS)
ALWAYS:
release: $(PROGRAMS)
cd $(DSTDIR)/bin ; rm -f $(PROGRAMS)
cp $(PROGRAMS) $(DSTDIR)/bin
cd $(DSTDIR)/bin ; chmod -w $(PROGRAMS)
lint: ALWAYS
lint -DLINT -I$(SRCDIR)/h $(IDENT) $(CSRC) $(LINTLIB)
clean: ALWAYS
rm -f $(CLEANUP)
tags: ALWAYS
cd $(PDIR) ; ctags $(TFLAGS) $(CSRC) ; \
cat ../h/tags ../xdr_lib/tags ../util_lib/tags ../condor_lib/tags \
>> tags ; sort tags > tags.sorted ; mv tags.sorted tags
#############################################################################
# Put program specific things here
#############################################################################
condor_collector: collector.o event.o $(LIB)
cc $(CFLAGS) -o condor_collector collector.o event.o $(LIB)
collector.o: $(PDIR)/collector.c
cc -c $(CFLAGS) $(PDIR)/collector.c
event.o: $(PDIR)/event.c
cc -c $(CFLAGS) $(PDIR)/event.c
depend: ALWAYS
grep '^#include' $(CSRC) $(PDIR)/Makefile | grep -v '<' | \
sed 's/:[^"]*"\([^"]*\)".*/: \1/' | \
sed 's/\.c/.o/' | \
sed 's;$(PDIR)/;;' | \
sed 's;: ;: $$\(SRCDIR)/h/;' | \
awk ' { if ($$1 != prev) { print rec; rec = $$0; prev = $$1; } \
else { if (length(rec $$2) > 78) { print rec; rec = $$0; } \
else rec = rec " " $$2 } } \
END { print rec } ' > makedep
echo '$$r makedep' >>eddep
echo '/^# DO NOT DELETE THIS LINE/+1,$$d' >eddep
echo '$$r makedep' >>eddep
echo 'w' >>eddep
/bin/cp $(PDIR)/Makefile $(PDIR)/Makefile.bak
ed - $(PDIR)/Makefile < eddep
rm eddep makedep
# DO NOT DELETE THIS LINE -- make depend uses it
collector.o: $(SRCDIR)/h/condor_types.h $(SRCDIR)/h/debug.h $(SRCDIR)/h/trace.h
collector.o: $(SRCDIR)/h/except.h $(SRCDIR)/h/sched.h $(SRCDIR)/h/expr.h
collector.o: $(SRCDIR)/h/manager.h
event.o: $(SRCDIR)/h/condor_types.h $(SRCDIR)/h/sched.h $(SRCDIR)/h/debug.h
event.o: $(SRCDIR)/h/trace.h $(SRCDIR)/h/except.h $(SRCDIR)/h/expr.h
event.o: $(SRCDIR)/h/manager.h