Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!hellgate.utah.edu!helios.ee.lbl.gov!ncis.tis.llnl.gov!lance.tis.llnl.gov!carlson From: carlson@lance.tis.llnl.gov (John Carlson) Newsgroups: comp.windows.x Subject: Re: Using Imake for other applications Message-ID: <445@ncis.tis.llnl.gov> Date: 5 Sep 89 21:38:43 GMT References: <1687@gazette.bcm.tmc.edu> Sender: news@ncis.tis.llnl.gov Distribution: usa Organization: Lawrence Livermore National Laboratory Lines: 244 In article <1687@gazette.bcm.tmc.edu> dinah@krebs.bcm.tmc.edu () writes: >Has anyone tried to use Imake for applications other than X? We Yes. >have a large development project and I like the way Imake handles >make files and would like to use it for our development work. If >someone out there has tried this, could you pass on any ideas and/or >tips on how to get started? Thanks. Check out Imake.rules. Our Imakefile (we are using RCS. use whatever cm package you like best): ## ## Lawrence Livermore National Laboratory ## ## Technology Information Systems Program ## ## Copyright 1988,1989 by The Regents of the University of California. ## ## 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 names of Lawrence Livermore National Laboratory, ## and the University of California not be used in advertising ## or publicity pertaining to distribution of the software without specific, ## written prior permission. Lawrence Livermore National Laboratory and the ## University of California 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 CALIFORNIA DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS ## SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, ## IN NO EVENT SHALL UNIVERSITY OF CALIFORNIA ## 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. ## ## Author: John Carlson, Lawrence Livermore National Laboratory ## ## $Header: Imakefile,v 1.40 89/07/31 10:51:57 carlson Locked $ ## ## $Log: Imakefile,v $ ## DEPEND = $(DEPENDSRC)/makedepend -f Imakefile GRIND = vgrind -rv1 CDEBUGFLAGS = -g ## Change these paths per installation ## DBDIR = /usr/src/doscaps/unify/bin ## DBCOPY = /usr/src/doscaps/unify/copy ## DBTEMP = /usr/src/doscaps/unify/temp ## SCREENDIR = /usr/src/doscaps/ui/images ## ICONDIR = /usr/src/doscaps/ui/images ## FBMFILE = /usr/src/doscaps/ui/data/FBM.data DBDIR = . DBCOPY = DBTEMP = /tmp SCREENDIR = /usr/src/doscaps ICONDIR = /usr/src/doscaps FBMFILE = FBM.data ## Installation directories ## BINDIR = /usr/src/doscaps/ui/bin ## MANDIR = /usr/src/doscaps/ui/man MANDIR = /usr/man/mann BINDIR = /usr/local ## These paths are for compilation: ## DATABASE = /usr/src/doscaps/unify/bin ## ICONINC = /usr/src/doscaps/ui/images ## UNIFYDIR = /usr/local/unify DATABASE = /usr/src/doscaps ICONINC = /usr/src/doscaps UNIFYDIR = /usr/local/unify ## DEFINES = \ -DDBDIR=\"${DBDIR}\" \ -DDBCOPY=\"${DBCOPY}\" \ -DDBTEMP=\"${DBTEMP}\" \ -DSCREENDIR=\"${SCREENDIR}\" \ -DICONDIR=\"${ICONDIR}\" \ -DFBMFILE=\"${FBMFILE}\" UNIFYINC = ${UNIFYDIR}/include UNIFYLIB = ${UNIFYDIR}/lib/libdb.a INCLUDES = -I${ICONINC} -I${UNIFYINC} -I${DATABASE} PROGS = FBM.o animate.o doscaps.o events.o grid.o info_frame.o \ toggle.o props.o bothdump.o DB_PROGS = sites.o flows.o db.o stores.o results.o processor.o \ peruse.o unconf.o nwconf.o nwx.o coop.o sites_db.o \ windows.o graph.o wan.o query.o network.o arch.o PERF_PROGS = size.o perf.o config.o SEP_SRCS = config.c coop.c nwconf.c nwx.c perf.c query.c size.c \ unconf.c wan.c SRCS1 = animate.c arch.c bothdump.c db.c doscaps.c events.c \ FBM.c flows.c graph.c grid.c info_frame.c \ network.c peruse.c processor.c props.c results.c \ sites.c sites_db.c stores.c toggle.c windows.c \ ${SEP_SRCS} HEADERS = \ FBM.h animate.h arch.h commdefs.h config.h db.h \ dbdecl.h defs.h doscaps.h erric.h events.h files.h \ flows.h graph.h grid.h info_frame.h log.h network.h \ nwconf.h peruse.h procedures.h processor.h props.h \ results.h site_event.h site_state.h sites.h stores.h \ syslib.h toggle.h windows.h \ ${DATABASE}/db_file.h OBJS1 = $(PROGS) $(DB_PROGS) $(PERF_PROGS) SRCS2 = db_main.c OBJS2 = size.o unconf.o nwconf.o nwx.o coop.o db_main.o \ perf.o config.o wan.o query.o SRCS3 = getkey.c rmrec.c strrecbykey.c demo_site.c hierarchy.c OBJS3 = getkey.o rmrec.o strrecbykey.o demo_site.o hierarchy.o PGMS3 = getkey rmrec strrecbykey demo_site PROGRAMS = doscaps db_proc ${PGMS3} MISCFILES = TASKS DOSCAPS.cpp doscaps.an db_proc.an fbm.an USCRIPTS = flint nmtest nwtest site_date site_test jsite_test ISCRIPTS = pv_script bw_print_script color_print_script printscript reinstall SCRIPTS = $(USCRIPTS) $(ISCRIPTS) WINLIBS = -lsuntool -lsunwindow -lpixrect MATHLIBS = -lm DB_LIBS = ${UNIFYLIB} # SYS V LINT LINT = /usr/5bin/lint LINTOPTS = -axz # SUN LINT ## LINTOPTS = -bhz # LINTOPTS = -bxz # LINTOPTS = -bhxz # LINTOPTS = -abhxz LINTLIBS = $(WINLIBS) $(MATHLIBS) #define GroupTarget(target, targs) @@\ target : targs ComplexProgramTarget_1(doscaps,$(DB_LIBS), $(WINLIBS) $(MATHLIBS)) ComplexProgramTarget_2(db_proc,$(DB_LIBS), $(MATHLIBS)) SingleProgramTarget(getkey, getkey.o, $(DB_LIBS),) SingleProgramTarget(rmrec, rmrec.o, $(DB_LIBS),) SingleProgramTarget(strrecbykey, strrecbykey.o, $(DB_LIBS),) SingleProgramTarget(demo_site, demo_site.o hierarchy.o, $(DB_LIBS),) AllTarget(DOSCAPS.d doscaps.man db_proc.man fbm.man) InstallProgram($(PGMS3), $(BINDIR)) InstallProgram($(ISCRIPTS), $(BINDIR)) InstallManPage(fbm, $(MANDIR)) .SUFFIXES: .man .an .an~ .d .cpp .cpp~ .an.man: $(RM) $@ soelim $*.an > $@ .cpp.d: $(RM) $@ $(CPP) -P $(STD_CPP_DEFINES) $(DEFINES) $*.cpp > $@ # lint targets NormalLintTarget($(SRCS)) lint: $(SRCS) $(HEADERS) # check out sources # vs ~profiledLibraryObjectRule() NormalLibraryObjectRule() own : doscaps db_proc cp doscaps doscaps-`whoami` cp db_proc db_proc-`whoami` # System V stuff cflow1: cflow $(INCLUDES) $(STD_DEFINES) $(DEFINES) ${SRCS1} cflow2: cflow $(INCLUDES) $(STD_DEFINES) $(DEFINES) ${SRCS2} ${SEP_SRCS} cflow1r: cflow -r $(INCLUDES) $(STD_DEFINES) $(DEFINES) ${SRCS1} cflow2r: cflow -r $(INCLUDES) $(STD_DEFINES) $(DEFINES) ${SRCS2} ${SEP_SRCS} # grind stuff print: ${SRCS} ${HEADERS} @echo 'set your TROFF & PRINTER environment variables' $(GRIND) -t ${SRCS} ${HEADERS} | psdoscaps - index: ${SRCS} ${HEADERS} $(TAGS) -v -t ${SRCS} ${HEADERS} | sort -f > index @echo 'set your TROFF & PRINTER environment variables' $(GRIND) -t -x index | psdoscaps - contents: index sort +1 -2f +2 -3n index > contents @echo 'set your TROFF & PRINTER environment variables' $(GRIND) -t -x contents | psdoscaps - # do this with the NeXT machine tree: tags (echo DOSCAPS;ctree -GMSTnq -c 400 -i " " | sed -e 's/[{}]//g' -e '/^[ ]*$$/d') > tree # date the make date : @date "+Target inspected @ %r" RCSTARGS = $(SRCS) $(HEADERS) $(SCRIPTS) $(MISCFILES) $(RCSTARGS): co $@ ci_1 : ci $(SRCS1) $(HEADERS) ci : ci $(SRCS) $(HEADERS) $(SCRIPTS) $(MISCFILES) co_1 : co $(SRCS1) $(HEADERS) co : co $(SRCS) $(HEADERS) $(SCRIPTS) editall : co -l $(SRCS) $(HEADERS) $(SCRIPTS) $(MISCFILES) # DO NOT DELETE