-#if defined(mips) || defined(_AIX) || defined(SOLARIS)
-/*
- * The MIPS, AIX & SOLARIS loaders don't have the -X flag or its functionality.
- * Solaris to make it worse does not have -x
- */
-#if !defined(SOLARIS)
-#define library_obj_rule() @@\
-.c.o: @@\
- $(CC) PROF_FLAG -c $(CFLAGS) $*.c @@\
- $(MV) $*.o profiled/$*.o @@\
- $(CC) -c $(CFLAGS) $*.c @@\
- -$(LD) -x -r -o a.out $*.o @@\
- $(MV) a.out $*.o
-#else
-#define library_obj_rule() @@\
-.c.o: @@\
- $(CC) PROF_FLAG -c $(CFLAGS) $*.c @@\
- $(MV) $*.o profiled/$*.o @@\
- $(CC) -c $(CFLAGS) $*.c @@\
- -$(LD) -r -o a.out $*.o @@\
- $(MV) a.out $*.o
-#endif
-#else /* ! mips && ! _AIX */
-#define library_obj_rule() @@\
-.c.o: @@\
- $(CC) PROF_FLAG -c $(CFLAGS) $*.c @@\
- -$(LD) -X -r -o profiled/$*.o $*.o @@\
- $(CC) -c $(CFLAGS) $*.c @@\
- -$(LD) -x -r -o a.out $*.o @@\
- $(MV) a.out $*.o
-#endif /* mips */
-/*
- * cc -R breaks profiling with -p on 4.3BSD on the VAX
- * (and probably elsewhere), so we don't do it for the profiled version.
- */
-
-#define library_ro_object(cfile) @@\
-concat(cfile,.o): concat(cfile,.c) @@\
- $(CC) PROF_FLAG -c $(CFLAGS) concat(cfile,.c) @@\
- -$(LD) -X -r -o profiled/$*.o $*.o @@\
- $(CCRO) -c $(CFLAGS) concat(cfile,.c) @@\
- -$(LD) -x -r -o a.out $*.o @@\
- $(MV) a.out $*.o
-
-#define library_asm_object(ofile,sfile) @@\
-ofile: sfile @@\
- $(CP) sfile x.c @@\
- $(CPP) -DPROF x.c | $(AS) - @@\
- -$(LD) -X -r -o profiled/$*.o a.out @@\
- $(CPP) x.c | $(AS) - @@\
- -$(LD) -x -r -o $*.o a.out @@\
- $(RM) a.out x.c
-
-#ifdef USELINT
-#define install_library_lint(libname) @@\
-all:: concat3(llib-l,libname,.ln) @@\
- @@\
-install:: @@\
- $(INSTALLFILE) concat3(llib-l,libname,.ln) concat4($(DESTDIR)$(LINTLIBDIR)/,llib-l,libname,.ln) @@\
-
-#else
-#define install_library_lint(libname)
-#endif
-
-
-#define install_library_target(libname,objs,srcs,lintlibs) @@\
- @@\
-all:: concat3(lib,libname,.a) concat3(lib,libname,_p.a) @@\
- @@\
-concat3(lib,libname,.a): objs @@\
- $(RM) $@.bak @@\
- -$(MV) $@ $@.bak @@\
- $(ARCHIVE) $@ objs @@\
- $(RANLIB) $@ @@\
- @@\
-concat3(lib,libname,_p.a): objs @@\
- $(RM) $@.bak @@\
- -$(MV) $@ $@.bak @@\
- cd profiled; $(ARCHIVE) ../$@ objs @@\
- $(RANLIB) $@ @@\
- @@\
-lint:: concat3(llib-l,libname,.ln) @@\
- @@\
-concat3(llib-l,libname,.ln): srcs @@\
- $(LINT) concat($(LINTLIBFLAG),libname) $(LINTFLAGS) srcs lintlibs @@\
- @@\
-clean:: @@\
- $(RM) concat3(lib,libname,.a) concat3(lib,libname,_p.a) @@\
- $(RM) concat3(llib-l,libname,.ln) @@\
- $(RM) objs @@\
- $(RM) profiled/?*.o @@\
- @@\
-install:: @@\
- $(INSTALLRAW) -c -m 644 concat3(lib,libname,.a) concat4($(DESTDIR)$(LIBDIR)/,lib,libname,.a) @@\
- $(RANLIB) -t concat4($(DESTDIR)$(LIBDIR)/,lib,libname,.a) @@\
- $(CHMOD) 444 concat4($(DESTDIR)$(LIBDIR)/,lib,libname,.a) @@\
- $(INSTALLRAW) -c -m 644 concat3(lib,libname,_p.a) concat4($(DESTDIR)$(LIBDIR)/,lib,libname,_p.a) @@\
- $(RANLIB) -t concat4($(DESTDIR)$(LIBDIR)/,lib,libname,_p.a) @@\
- $(CHMOD) 444 concat4($(DESTDIR)$(LIBDIR)/,lib,libname,_p.a) @@\
- @@\
-install_library_lint(libname) @@\
-
-#else /* !PROFILED_LIBS */
-/*
- * Rule for building objects in libraries.
- */
-
-#ifdef DEBUG_LIBS
-/* When debugging, leave symbols alone (don't do LD) */