⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 imake.rules

📁 genesis 2000 v9.1软件下载
💻 RULES
📖 第 1 页 / 共 3 页
字号:
 */
#ifndef DebuggedRelocatableTarget
#define	DebuggedRelocatableTarget(objname,objlist)			@@\
AllTarget(Concat(objname,_d.o))						@@\
									@@\
Concat(objname,_d.o): objlist						@@\
	$(RM) $@							@@\
	$(LD) -X -r objlist -o $@

#endif /* DebuggedRelocatableTarget */


/*
 * LintLibraryTarget - generate rules to create a lint library.  Note that the
 * lint library is always forced to be newer than the library itself.
 */
#ifndef LintLibraryTarget
#define	LintLibraryTarget(libname,srclist)				@@\
lintlib:: Concat(llib-l,libname.ln)					@@\
									@@\
Concat(llib-l,libname.ln): srclist					@@\
	$(RM) $@							@@\
	$(LINT) Concat($(LINTLIBFLAG),libname) $(LINTFLAGS) srclist
#endif /* LintLibraryTarget */


/*
 * NormalLintTarget - generate rules to lint a set of sources.
 */
#ifndef NormalLintTarget
#define NormalLintTarget(srclist)					@@\
lint:									@@\
	$(LINT) $(LINTFLAGS) srclist $(LINTLIBS)			@@\
lint1:									@@\
	$(LINT) $(LINTFLAGS) $(FILE) $(LINTLIBS)
#endif /* NormalLintTarget */


/*
 * LintTarget - generate rules to lint $(SRCS)
 */
#ifndef LintTarget
#define LintTarget()							@@\
NormalLintTarget($(SRCS))
#endif


/*
 * LinkSourceFile - snag source file from some other directory
 */
#ifndef LinkSourceFile
#define LinkSourceFile(src,dir)						@@\
src:  dir/src								@@\
	$(RM) $@							@@\
	$(LN) $? $@							@@\

#endif


/*
 * LinkFile - link a file
 */
#ifndef LinkFile
#define LinkFile(tofile,fromfile)					@@\
tofile:: fromfile							@@\
	$(RM) $@							@@\
	$(LN) $? $@
#endif


#ifndef MakeSubincludesForBuild
#define MakeSubincludesForBuild(step,dir,srclist)			@@\
step::  dir srclist							@@\
	@-(list=`echo srclist | sed -e 's/[^ ]*\///g'`; \		@@\
		set -x; cd dir; $(RM) $$list)				@@\
	@for i in srclist; do \						@@\
		(set -x; cd dir; $(LN) ../$$i .); \			@@\
	done								@@\
									@@\
dir::									@@\
	$(MKDIRHIER) dir						@@\
									@@\
clean::									@@\
	@-(if [ -d dir ]; then \					@@\
		list=`echo srclist | sed -e 's/[^ ]*\///g'`; \		@@\
		set -x; cd dir; $(RM) $$list; else exit 0; fi)
#endif


/*
 * NamedTargetSubdirs - recursively make a series of steps
 */
#ifndef NamedTargetSubdirs
#define NamedTargetSubdirs(name,dirs,verb,flags,subname)		@@\
name::									@@\
	@case '${MFLAGS}' in *[ik]*) set +e;; esac; \			@@\
	for i in dirs ;\						@@\
	do \								@@\
		(cd $$i ; echo verb "in $(CURRENT_DIR)/$$i..."; \	@@\
			$(MAKE) $(MFLAGS) flags subname); \		@@\
	done
#endif


/*
 * NamedMakeSubdirs - generate rules to do makes in the given subdirectories.
 * If you want CDEBUGFLAGS passed along to subdirectories, provide a line like
 * the following in the appropriate Imakefile
 * 
 *         #define PassCDebugFlags 'CDEBUGFLAGS=$(CDEBUGFLAGS)'
 */
#ifndef NamedMakeSubdirs
#define NamedMakeSubdirs(name,dirs) \
NamedTargetSubdirs(name,dirs,"making" name,PassCDebugFlags,all)
#endif /* NamedMakeSubdirs */

#ifndef MakeSubdirs
#define MakeSubdirs(dirs)						@@\
NamedMakeSubdirs(all,dirs)
#endif /* MakeSubdirs */


/*
 * DependSubdirs - generate rules to recursively compute dependencies as
 * part of the make depend step.
 */
#ifndef DependSubdirs
#define DependSubdirs(dirs) \
NamedTargetSubdirs(depend,dirs,"depending",NullParameter,depend)
#endif /* DependSubdirs */


/*
 * ForceSubdirs - force make to build subdirectories
 */
#ifndef ForceSubdirs
#define ForceSubdirs(dirs)						@@\
dirs: FRC								@@\
	@cd $@ ; echo "making all in $(CURRENT_DIR)/$@..."; \		@@\
	$(MAKE) $(MFLAGS) PassCDebugFlags all				@@\
									@@\
FRC:
#endif /* ForceSubdirs */

/*
 * InstallSubdirs - generate rules to recursively install programs and files.
 */
#ifndef InstallSubdirs
#define InstallSubdirs(dirs) \
NamedTargetSubdirs(install,dirs,"installing",DESTDIR='$(DESTDIR)',install)
#endif /* InstallSubdirs */


/*
 * InstallManSubdirs - generate rules to recursively install manual pages.
 */
#ifndef InstallManSubdirs
#define InstallManSubdirs(dirs) \
NamedTargetSubdirs(install.man,dirs,"installing man pages",DESTDIR='$(DESTDIR)',install.man)
#endif /* InstallManSubdirs */


/*
 * IncludesSubdirs - generate rules to recursively put include files in build
 */
#ifndef IncludesSubdirs
#define IncludesSubdirs(dirs) \
NamedTargetSubdirs(includes,dirs,including,NullParameter,includes)
#endif


/*
 * CleanSubdirs - generate rules to recursively clean out garbage files.
 */
#ifndef NamedCleanSubdirs
#define NamedCleanSubdirs(name,dirs) \
NamedTargetSubdirs(name,dirs,"cleaning",RM_CMD='$(RM_CMD)',clean)
#endif /* NamedCleanSubdirs */

#ifndef CleanSubdirs
#define CleanSubdirs(dirs) \
NamedCleanSubdirs(clean,dirs)
#endif


/*
 * TagSubdirs - generate rules to recursively create tags files.
 */
#ifndef NamedTagSubdirs
#define NamedTagSubdirs(name,dirs) \
NamedTargetSubdirs(name,dirs,"tagging",TAGS='$(TAGS)',tags)
#endif /* TagSubdirs */

#ifndef TagSubdirs
#define TagSubdirs(dirs) \
NamedTagSubdirs(tags,dirs)
#endif

/*
 * MakeLintSubdirs - generate rules to recursively lint directories as part 
 * of the named step.
 */
#ifndef MakeLintSubdirs
#define MakeLintSubdirs(dirs,target,subtarget) \
NamedTargetSubdirs(target,dirs,"linting" for target and subtarget,DESTDIR='$(DESTDIR)' LINTOPTS='$(LINTOPTS)',subtarget)
#endif /* MakeLintSubdirs */


/*
 * LintSubdirs - generate rules to recursively lint directories as part of 
 * the make lint step.
 */
#ifndef LintSubdirs
#define LintSubdirs(dirs)						@@\
MakeLintSubdirs(dirs,lint,lint)
#endif /* LintSubdirs */


/*
 * MakeLintLibSubdirs - generate rules to recursively create lint libraries.
 */
#ifndef MakeLintLibSubdirs
#define MakeLintLibSubdirs(dirs)					@@\
MakeLintSubdirs(dirs,lintlib,lintlib)
#endif /* MakeLintLibSubdirs */


/*
 * MakeMakeSubdirs - generate rules to recursively recreate Makefiles as part
 * of the specified step in the build.  If $(TOP) is set to an absolute path, 
 * do not prepend the ../ prefix.  This makes running things outside of the 
 * source tree to be much easier.
 */
#ifndef MakeMakeSubdirs
#define MakeMakeSubdirs(dirs,target)					@@\
target::								@@\
	@case '${MFLAGS}' in *[ik]*) set +e;; esac; \			@@\
	for i in dirs ;\						@@\
	do \								@@\
		echo "making Makefiles in $(CURRENT_DIR)/$$i..."; \	@@\
		case "$$i" in \						@@\
		./?*/?*/?*/?*) newtop=../../../../ sub=subsubsubsub;; \	@@\
		./?*/?*/?*) newtop=../../../ sub=subsubsub;; \		@@\
		./?*/?*)    newtop=../../ sub=subsub;; \		@@\
		./?*)       newtop=../ sub=sub;; \			@@\
		*/?*/?*/?*)    newtop=../../../../ sub=subsubsubsub;; \	@@\
		*/?*/?*)    newtop=../../../ sub=subsubsub;; \		@@\
		*/?*)       newtop=../../ sub=subsub;; \		@@\
		*)	    newtop=../ sub=sub;; \			@@\
		esac; \							@@\
		case "$(TOP)" in \					@@\
		/?*) newtop=  upprefix=  ;; \				@@\
		*) upprefix=../ ;; \					@@\
		esac; \							@@\
		$(MAKE) $${sub}dirMakefiles UPPREFIX=$$upprefix NEWTOP=$$newtop \		@@\
		MAKEFILE_SUBDIR=$$i NEW_CURRENT_DIR=$(CURRENT_DIR)/$$i;\ @@\
	done
#endif /* MakeMakeSubdirs */


/*
 * MakeNsubdirMakefiles - generate rules to create sub Makefiles.
 */
#ifndef MakeNsubdirMakefiles
#define MakeNsubdirMakefiles()						@@\
subdirMakefiles:							@@\
	$(RM) $(MAKEFILE_SUBDIR)/Makefile.bak				@@\
	-@if [ -f $(MAKEFILE_SUBDIR)/Makefile ]; then set -x; \		@@\
	$(MV) $(MAKEFILE_SUBDIR)/Makefile $(MAKEFILE_SUBDIR)/Makefile.bak; \ @@\
	else exit 0; fi							@@\
	cd $(MAKEFILE_SUBDIR); $(IMAKE_CMD) -DTOPDIR=$(UPPREFIX)$(TOP) -DCURDIR=$(NEW_CURRENT_DIR); \	@@\
	$(MAKE) $(MFLAGS) Makefiles 					@@\
									@@\
subsubdirMakefiles:							@@\
	$(RM) $(MAKEFILE_SUBDIR)/Makefile.bak				@@\
	-@if [ -f $(MAKEFILE_SUBDIR)/Makefile ]; then set -x; \		@@\
	$(MV) $(MAKEFILE_SUBDIR)/Makefile $(MAKEFILE_SUBDIR)/Makefile.bak; \ @@\
	else exit 0; fi							@@\
	cd $(MAKEFILE_SUBDIR); $(IMAKE_CMD) -DTOPDIR=$(UPPREFIX)$(UPPREFIX)$(TOP) -DCURDIR=$(NEW_CURRENT_DIR); \	@@\
	$(MAKE) $(MFLAGS) Makefiles 					@@\
									@@\
subsubsubdirMakefiles:							@@\
	$(RM) $(MAKEFILE_SUBDIR)/Makefile.bak				@@\
	-@if [ -f $(MAKEFILE_SUBDIR)/Makefile ]; then set -x; \		@@\
	$(MV) $(MAKEFILE_SUBDIR)/Makefile $(MAKEFILE_SUBDIR)/Makefile.bak; \ @@\
	else exit 0; fi @@\
	cd $(MAKEFILE_SUBDIR); $(IMAKE_CMD) -DTOPDIR=$(UPPREFIX)$(UPPREFIX)$(UPPREFIX)$(TOP) -DCURDIR=$(NEW_CURRENT_DIR); \	@@\
	$(MAKE) $(MFLAGS) Makefiles 					@@\
									@@\
subsubsubsubdirMakefiles:						@@\
	$(RM) $(MAKEFILE_SUBDIR)/Makefile.bak				@@\
	-@if [ -f $(MAKEFILE_SUBDIR)/Makefile ]; then set -x; \		@@\
	$(MV) $(MAKEFILE_SUBDIR)/Makefile $(MAKEFILE_SUBDIR)/Makefile.bak; \ @@\
	else exit 0; fi 						@@\
	cd $(MAKEFILE_SUBDIR); $(IMAKE_CMD) -DTOPDIR=$(UPPREFIX)$(UPPREFIX)$(UPPREFIX)$(UPPREFIX)$(TOP) -DCURDIR=$(NEW_CURRENT_DIR); \	@@\
	$(MAKE) $(MFLAGS) Makefiles
#endif /* MakeNsubdirMakefiles */


/*
 * MakefileSubdirs - generate rules to create Makefiles.
 */
#ifndef MakefileSubdirs
#define MakefileSubdirs(dirs)						@@\
MakeMakeSubdirs(dirs,Makefiles)						@@\
									@@\
MakeNsubdirMakefiles()
#endif /* MakefileSubdirs */

/*
 * Translate XCOMM into pound sign with sed, rather than passing -DXCOMM=XCOMM
 * to cpp, because that trick does not work on all ANSI C preprocessors.
 * Also delete line numbers from the cpp output (-P is not portable, I guess).
 */
#ifndef CppSedMagic
#define CppSedMagic sed -e '/^#  *[0-9][0-9]*  *.*$$/d' \
		    -e '/^XCOMM$$/s//#/' \
		    -e '/^XCOMM[^a-zA-Z0-9_]/s/^XCOMM/#/'
#endif /* CppSedMagic */

/*
 * CppScriptTarget - generate rules to create a shell script by running the
 * input through cpp.  If the ExecableScripts configuration parameter is not
 * set, then make sure that the first line begins with a colon.
 */
#ifndef CppScriptTarget
#if ExecableScripts		/* can use #! instead of colon */
#define CppScriptTarget(dst,src,defs,deplist)				@@\
dst::  src deplist							@@\
	$(RM) $@							@@\
	$(CPP) defs <src | CppSedMagic >$@				@@\
	chmod a+x $@
#else
#define CppScriptTarget(dst,src,defs,deplist)				@@\
dst::  src deplist							@@\
	$(RM) $@							@@\
	echo \: >$@							@@\
	sed '1d' src | $(CPP) defs | CppSedMagic >>$@			@@\
	chmod a+x $@
#endif /* ExecableScripts */
#endif /* CppScriptTarget */


/*
 * MakeScriptFromCpp - generate rules to create a script from a file with a
 * .cpp suffix.
 */
#ifndef MakeScriptFromCpp
#define MakeScriptFromCpp(name,defs)					@@\
CppScriptTarget(name,name.cpp,defs,NullParameter)
#endif /* MakeScriptFromCpp */

#ifndef CppFileTarget
#define CppFileTarget(dst,src,defs,deplist)				@@\
dst::  src deplist							@@\
	$(RM) $@							@@\
	$(CPP) defs <src | CppSedMagic >$@
#endif /* CppFileTarget */

/*
 * MakeDirectories - generate rules to create a hierarchy of directories.
 */
#ifndef MakeDirectories
#define MakeDirectories(step,dirs)					@@\
step::									@@\
	@case '${MFLAGS}' in *[i]*) set +e;; esac;			@@\
	DirFailPrefix@for i in dirs; do if [ -d $(DESTDIR)$$i ]; then \	@@\
		set +x; else (set -x; $(MKDIRHIER) $(DESTDIR)$$i); fi \	@@\
	done
#endif /* MakeDirectories */


/*
 * MakeFontsDir - generate rules to build fonts.dir database.
 */
#ifndef MakeFontsDir
#define MakeFontsDir(deplist)						@@\
all:: fonts.dir								@@\
									@@\
fonts.dir:  deplist							@@\
	$(MKFONTDIR) .							@@\
									@@\
clean::									@@\
	$(RM) fonts.dir
#endif /* MakeFontsDir */


/*
 * MakeFonts - generate rules to build font database.
 */
#ifndef MakeFonts
#define MakeFonts()							@@\
all::  $(OBJS)								@@\
									@@\
MakeFontsDir($(OBJS))							@@\
									@@\
clean::									@@\
	$(RM) *.snf *.snf.Z *.pcf *.pcf.Z
#endif /* MakeFonts */


/*
 * InstallFontObjs - generate rules to install font files
 */
#ifndef InstallFontObjs
#define InstallFontObjs(objs,dest)					@@\
InstallMultipleFlags(objs,dest,$(INSTDATFLAGS))				@@\
									@@\
install::  fonts.dir							@@\
	MakeDir($(DESTDIR)dest)						@@\
	$(INSTALL) -c $(INSTDATFLAGS) fonts.dir $(DESTDIR)dest
#endif /* InstallFontObjs */


/*
 * InstallFonts - generate rules to install font files
 */
#ifndef InstallFonts
#define InstallFonts(dest)						@@\
InstallFontObjs($(OBJS),dest)
#endif /* InstallFonts */


/*
 * InstallFontAliases - generate rules to install font aliases databases. 
 */
#ifndef InstallFontAliases
#define InstallFontAliases(dest)					@@\
install::  fonts.alias							@@\
	MakeDir($(DESTDIR)dest)						@@\
	( set -x; $(INSTALL) -c $(INSTDATFLAGS) fonts.alias $(DESTDIR)dest)
#endif /* InstallFontAliases */

#ifndef FontSrc
#define FontSrc(basename) basename.bdf
#endif

#ifndef FontBaseObj
#ifdef SnfFonts
#define FontBaseObj(basename)basename.snf
#else
#define FontBaseObj(basename)basename.pcf
#endif
#endif

/*
 * InstallFontScale - generate rules to install font scale database.
 */
#ifndef InstallFontScale
#define InstallFontScale(dest)						@@\
install::  fonts.scale							@@\
	MakeDir($(DESTDIR)dest)						@@\
	( set -x; $(INSTALL) -c $(INSTDATFLAGS) fonts.scale $(DESTDIR)dest)
#endif /* InstallFontScale */

/*
 * UncompressedFontTarget
 */
#ifndef UncompressedFontTarget
#ifdef SnfFonts
#define UncompressedFontTarget(basename)				@@\
FontBaseObj(basename):  FontSrc(basename)				@@\
	$(FONTC) $(FONTCFLAGS) $? >$@
#else
#define UncompressedFontTarget(basename)				@@\
FontBaseObj(basename):  FontSrc(basename)				@@\
	$(FONTC) $(FONTCFLAGS) $? -o $@
#endif
#endif /* CompressedFontTarget */

/*
 * CompressedFontTarget
 */
#ifndef CompressedFontTarget
#define CompressedFontTarget(basename)					@@\
FontBaseObj(basename).Z:  FontSrc(basename)				@@\
	$(FONTC) $(FONTCFLAGS) $? | $(COMPRESS) > $@
#endif /* CompressedFontTarget */

#ifdef CompressAllFonts
#define FontTarget(basename) CompressedFontTarget(basename)
#define FontObj(basename) FontBaseObj(basename).Z
#else
#define FontTarget(basename) UncompressedFontTarget(basename)
#define FontObj(basename) FontBaseObj(basename)
#endif /* CompressAllFonts */

/*
 * AllTarget - generate rules to build necessary things during make all.
 */
#ifndef AllTarget
#define AllTarget(depends)						@@\
all:: depends
#endif /* AllTarget */

#ifdef DefineOldLibraryRules
#include <oldlib.rules>
#endif

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -