# # Makefile for all of magic # # MODULES are pieces of the Magic system. The makefiles for # each of these will 'install' in the subdirectories # 'lib' and 'installed'. # PROGRAMS are individual programs that get installed. # The makefiles for each of these will 'install' in # ~cad/bin. # FILES are miscellaneous files # DIRS are whole directories that get copied (also see disttape). # # Special handling: the subdirectory cadlib gets installed remotely # as ~cad/lib/magic. It is a symbolic link. The module 'graphics' appears # in PROGRAMS because that is where X11Helper, grSunProg, and grSunProg2 reside. # # rcsid $Header: /ufs/repository/magic/lisp/other/Makefile,v 1.2 2001/01/12 22:12:56 jsolomon Exp $ # SHELL=/bin/sh include ${MAGICDIR}/defs.mak # # NOTE: tiles and tech must be before database in this list # BASEMODS = tiles tech \ calma cif cmwind commands database dbwind debug drc \ extflat extract garouter gcr graphics grouter irouter \ lisp macros main misc mzrouter netlist netmenu \ parser plot plow resis router select signals sim \ textio undo utils windows wiring MODULES = ${BASEMODS} BASEMAINS = ext2sim ext2spice magic magicusage \ net2ir extcheck mpack # fsleeper ext2dlys PROGRAMS = ${BASEMAINS} graphics FILES = :cadtomag :countlines :makeall :makeforce :makelib \ :status Makefile READ_ME DIRS = include cadlib CMD = echo Need to define your command via '${MAKE} cmd CMD=command' CADDIR = `:findcad` CADDIR_SUB = `../:findcad` everything: ${MODULES} .config /bin/csh :makeall installhdrs ${MODULES} /bin/csh :makeall install ${MODULES} /bin/csh :makemains ${PROGRAMS} install: everything directories install-tech cd windows; ${MAKE} installcad CADDIR=${CADDIR_SUB} cd doc; ${MAKE} installcad CADDIR=${CADDIR_SUB} /bin/csh :execmod "${MAKE} installcad CADDIR=${CADDIR}" ${PROGRAMS} install-tech: cd scmos; ${MAKE} install CADDIR=${CADDIR_SUB} directories: :mkdir ${CADDIR}/bin :mkdir ${CADDIR}/lib :mkdir ${CADDIR}/lib/magic :mkdir ${CADDIR}/lib/magic/sys :mkdir ${CADDIR}/lib/magic/scm :mkdir ${CADDIR}/man # Remakes the binary in 'lib', if needed. Used for recompiling on # a remote machine. onlylib: ${MODULES} .config /bin/csh :makelib ${MODULES} modules: mkdir ${MODULES} installhdrs: ${MODULES} .config /bin/csh :makeall installhdrs ${MODULES} cmd: forceit /bin/csh :execmod "${CMD}" ${MODULES} ${BASEMAINS} allobj: ${MODULES} .config /bin/csh :makeall "" ${MODULES} force: clean /bin/csh :makeall installhdrs ${MODULES} /bin/csh :makeforce install ${MODULES} /bin/csh :makemains ${PROGRAMS} clean: forceit clean-tech rm -f lib/*.o lib/*.a rm -f include/*.h rm -f *.tmp */*.tmp *.sav */*.sav /bin/csh :execmod "${MAKE} clean" ${MODULES} ${BASEMAINS} ${PROGRAMS} clean-tech: cd scmos; ${MAKE} clean lint: forceit /bin/csh :execmod "${MAKE} lint" ${MODULES} ${BASEMAINS} status: ${MODULES} /bin/csh :status ${MODULES} config: forceit /bin/csh :config date > .config .config: echo "*** ERROR: You need to do a \"${MAKE} config\" first!" cat .config magic: everything cd magic; ${MAKE} magic tar: clean chmod a-w */Makefile */*.[ch] rm -f .config misc/CFLAGS misc/DFLAGS misc/CPPFLAGS cd misc; cp CFLAGS.orig CFLAGS; cp DFLAGS.orig DFLAGS; cp CPPFLAGS.orig CPPFLAGS cd ..; rm -f magic-6.4.4.tar.Z; tar cvf - magic-6.4.4 > magic-6.4.4.tar; compress magic-6.4.4.tar tags: rm -f magic/tags cp /dev/null magic/tags -for i in ${MODULES}; do \ (cd magic ; ctags -a -t ../$$i/*.[ch] ; cd ..); done sort magic/tags -o magic/tags TAGS: rm -f magic/TAGS.build -for i in ${MODULES}; do \ (cd magic ; etags ../$$i/*.[ch] ; cat TAGS >> TAGS.build ;\ cd ..); done mv magic/TAGS.build magic/TAGS tagdirs: -for i in ${MODULES}; do \ (cd $$i ; rm -f tags ; ln -s ../magic/tags tags ; cd ..); done allp: ${MODULES} /bin/csh :makeall profile ${MODULES} forcep: ${MODULES} /bin/csh :makeforce profile ${MODULES} magicp: allp cd magic; ${MAKE} magicp wc: ${MODULES} :countlines ${MODULES} moduleNames: echo ${MODULES} forceit: