/******************************************************************* * $Log: Imakefile,v $ * Revision 1.32 2005/10/27 03:00:33 lechner * Removed -f MakefileNolog_${HOSTTYPE}; using Makefile now, saving to *Nolog_*. * * Revision 1.31 2005/10/25 18:40:34 lechner * One cosmetic change. * * Revision 1.30 2005/10/25 18:06:01 lechner * Imakefile now depends on configure.h, which xmkmf[no]log.csh copies * from configure[no]log.csh, to determine if IMAKE includes -DLOG. * Pre-req: xmkmf[no]log.csh copies configure[no]log to configure.h * and configurelog.h has #define LOG * * Revision 1.29 2005/10/23 07:10:03 lechner * Revised bde/Imakefile top make these items conditional on #ifdef LOG: * #include "configurelog.h" or "configurenolog.h", * #define BDELOG or #undef BDELOG, * #define GENLOG or #undef GENLOG, * $(IMAKE) -f Makefile_Log_$HOSTTYPE or Makefile_Nolog_$HOSTTYPE * * Revision 1.28 2005/08/22 16:09:13 lechner * New comments and reformatting - merged continued lines; * current Imakefile builds bde four ways ([no]log, 2 platforms). * * Revision 1.27 2005/08/12 03:03:12 lechner * Major revision of Imakefiles used by xmkmf -a [-DLOG], to support * a more elaborate bde build tree for two $HOSTTYPES and optional * change-log creation and replay capability. * * Separate Makefiles are generated in src, pr_log and pr_nolog * by three Imakefiles in existing checkout directories bde{,src,pr_util}. * Separate obj .o and executable .exe files are maintained on $HOSTTYPEs * i386-linux and alpha. * * (Caveat:Executing xmkmf -a [-DLOG] should produce Makefiles * that work in subtree pr_util_nolog [pr_util_log], but currently * they both update pr_util_nolog/$HOSTTYPE/probj.-RJL050811) * * The directory tree for builds under bde is now: * {src, {pr_util_nolog, pr_util_log}/$HOSTTYPE/{probj, obj, bin}} * Imake assumes that this tree exists (TBD: check out empty from CVS). * Defined CXXLINK to link with g++ or cxx and replace link[no]log.csh. * * Revision 1.26 2005/07/25 06:35:21 lechner * Removed -pg from: CDEBUGFLAGS = -DDEBUG -pg * * Revision 1.25 2005/07/25 01:42:03 lechner * Minor comment changes; * * Revision 1.24 2005/06/17 03:19:29 lechner * DEPXMLIB = /usr/include -( $(RL)/include removed - RJL050609 ) * * Revision 1.23 2005/06/08 01:38:27 lechner * Added 'CXX=$(CXX)' under Pass.. flags to subdirectories * * Revision 1.22 2005/05/29 02:33:20 lechner * Changed GENVERSION to "GENV13" and GENDEFINES to -DGENV12 * Note: see also configure.h * --- * > GENDEFINES = -DGENV13 * * Revision 1.21 2005/05/02 03:24:07 lechner * Edited to remove merge conflics from tag bde2alpha_rv * * * Revision 1.17.4.10 2004/07/20 05:19:56 lechner * This is a protective checkin of current (040719) bde tree to avoid backup/restore ris ks. * I first used cvs rtag bde04s to tag the prior repository versions (circa Apr-May 2004) . * Then I did cvs update and cvs ci, TBFollowed by cvs tag bde040720 bde. - RJL040720 * Path to bde's current development version: $RL = ~/bde2alpha_rl/sandbox/bdecheckout/bd e. * * Revision 1.17.4.9 2004/04/06 02:21:13 lechner * Avoided conditional dependence on ' XDIRY = X11R6'. Better PASS/FAIL reporting . * * Revision 1.17.4.8 2004/04/03 06:28:00 lechner * Modified #if conditionals. * Replaced #ifdef BDEREPLAY by #ifndef BDELOG * (replay and logging are mutex so far) * Added #ifdef LinuxArchitecture to compile on mercury. * (this affects CPLUSPLUSFLAGS and XDIRY) * Added $(RL)/include to DEPXMLIB * (Warning: this is NOT portable - test-build without it.) * * Revision 1.17.4.7 2002/04/11 04:00:13 lechner * I updated GENDFINES and BDEDEFINES to eliminate unresolved symbols * * Revision 1.17.4.6 2002/04/06 07:49:55 lechner * Edits which no longer assume BDELOG and BDEREPLAY are mutex * * Revision 1.17.4.5 2002/04/01 21:20:42 lechner * Replaced BDELOG by GENLOG in -DGENDEFINES * * Revision 1.17.4.4 2002/03/22 04:00:13 lechner * Mods to #defined environment vars; added BDELOG; * (cvs diff Imakefile reports 62 lines) * * sandbox revision - to test gen/ver_12/sjaganat * Conditionally add -DBDELOG to GENDEFINES and BDEDEFINES - RJL 020309 * Revision 1.17.4.3 2000/09/23 02:23:46 lechner * I did cvs ci bde, to be followed by cvs tag bde2alpha.2k0922 bde and cvs co; * checkin updates the repository, tag adds a new tag to current branch * (tag bde2apha_rv), in the repository but not locally, * amd cvs co makes the local version have that tag. * * Revision 1.17.4.2 2000/04/06 07:08:02 lechner * I checked in 7 updated files and added tag bde2alpha_rjl * Files include 3 Imakefiles, bde/{configure.h,aareadme,src/fileio.cc, * executables/bde} * * Revision 1.17.4.1 1999/05/19 22:19:15 vdhamoda * bde2alpha_rv_final * * Revision 1.20 1997/09/23 07:00:18 lechner * Removed the g++-include and gcc-include paths; * Added YuWong's separate path to the gif encoder. * * Revision 1.19 1997/03/22 06:37:03 lechner * Removed the #ifdef GENV6 condition - v6 is obsolete - RJL * * Revision 1.18 1996/12/18 19:37:29 cparisi * BDECODE project 96f523 * adds new "text" class that consolidates some of the test operations. * * Revision 1.17 1995/10/18 21:51:41 rdias * Commented out the g++-include and gcc-include paths in the IMAKE_CMD section. * The IMAKE_CMD does not use these to make Makefiles in the subdirectories. * *Revision 1.16 1995/03/16 03:16:55 lechner *Updated BDEDEFINES (LIB_PATH --> BDE_LIB_PATH as in configure.h * *Revision 1.1.1.1 1995/01/04 06:03:42 lechner *Imported 94fbde tree to 95sbde * * Revision 1.6 1994/08/22 20:51:09 lechner * added -V 2.5.8 as per sysmsg 3124 94/7/21 (bug in latest release of g++) * * Revision 1.5 1994/04/16 20:03:36 jrichard * added warnings section * * Revision 1.4 1994/04/13 20:21:09 mtorpey * Modified configure.h to allow the developer to specify the default * lib path for the necessary run time files.. Imakefile needed to * be modified to reflect this change. * * Revision 1.3 1994/04/11 15:20:08 jrichard * added the bdegeo link coordinate system define USE94SLC * * Revision 1.2 1994/04/07 21:35:53 jrichard * version of Imakefile with support for GENV8 and many bugs fixed * *******************************************************************/ /* * Imakefile [-DLOG] generates Makefiles to compile and link build bde * either without or with logging and replay capability. * The Makefiles generated by xmkmf -a are based on separate Imakefiles * in src, pr_log and pr_nolog; * This Imakefile redefines SUBDIRS conditionally on -DLOG. * It compiles obj and executable files under $HOSTTYPE directories. * depending on $HOSTTYPE and on #ifdef LOG (-DLOG) * The directory tree for builds is: * bde/{src, pr_util_nolog, pr_util_log, $HOSTTYPE/{obj, executables}} * It assumes that this tree exists, as created by buildbdetree * or (TBD:) as checked out (empty) from CVS. */ /********* TBD: Add text subdirectory for XB *****Haiyan********/ /********* TBD: Add extern_code for YuWong's bde2gif ***********/ /* WARNING: man imake says ':' chars in command lines MUST BE escaped ('\:'). */ /* if configure.h includes #define BDELOG, it is propagated below */ /* #define GENVxx in configure.h and GENVERSION below could be inconsistent*/ /* xmkmf -a -DLOG modifies configure.h from linux only, not alpha.-RJL050810 */ /* On alpha hosts, I can't make -DLOG work via configure.h, imake or make.*/ /* TBD Goal of this version: * Add target 'make log' to add pr_log.c and alters other pr_*.c files * Add target 'make pr_util' to run chgen13 and regenerate pr_[no]log files. * (Or create separate versions of Makefiles called from makebde shellproc). * Question: Can -log target redefine the path to pr_util.a? * Create bde/$HOSTTYPE/{obj,bin} for alpha and i386-linux $HOSTTYPES. * (for separate $HOSTTYPE_dependent build trees). * * saturn.cs.uml.edu(144)> cat $RB/chgen/src/buildgen * mkdir {alpha,i386-linux} * mkdir pr_util_{log,nolog} * mkdir {alpha,i386-linux}/{obj_log,obj_nolog,bin} * (bin was formerly executables} * bin has both bdelog.exe and bdenolog.exe files. * 3 ways to signal linux: * #define linux, #define LinuxArchitecture, $HOSTTYPE==i386-linux. */ /******************************************************************* * the C and C++ compilers ******************************************************************* */ /* #define USEDECC here or in configure.h to enable cxx use - RJL */ /* configure.h #defines LOG then #ifdef LOG #defines GENLOG,BDELOG */ /* Conditional selection of configure_[no]log.h aded - RJL051018 */ /* CAVEAT: * On saturn, imake will ignore -DLOG switch; * On mercury it will obey it. * so TWO versions of Imakefile are also needed. */ /* Pre-req: xmkmf[no]log.csh copies configure[no]log to configure.h */ /* and configurelog.h has #define LOG, BDEUSERDEFINES */ #include "configure.h" #ifdef USEDECC CC = cc /* ansi C compiler */ CPLUSPLUS = cxx /* cxx compiler */ CXX = cxx /* cxx linker */ CXXLINK = cxx #endif #ifndef USEDECC CC = gcc /* ansi C compiler */ CPLUSPLUS = g++ /* C++ compiler */ CXX = g++ /* g++ linker */ CXXLINK = g++ #endif /* CXXLINK added - RJL050810 */ /******************************************************************* * options to give the C++ compiler *******************************************************************/ #ifdef USEEXTRAWARN BDEWARNINGS = \ -Wall \ -Wunused \ -Wstrict-prototypes \ -Wmissing-prototypes \ -Wnested-externs \ -Wenum-clash \ -Woverloaded-virtual \ -W -ansi #endif /******************************************************************* * These are defines to be set during bde compilation * Note: bde/configure.h should #define USEGENVxx consistently-RJL 2k0322 * pr_util's Imakefile did set GENVxx - also moved here - RJL 022227 *******************************************************************/ /* GENVERSION = GENV10 --> GENV11 --> 12 --> 13 - RJL -050526 */ /* INDEPENDENTLY - USE94LC #defines -DS94LC and USELCWC #defines -DLCWC */ #ifdef USELCWC DCLCDEFINE = -DLCWC #endif #ifdef USE94SLC S94LCDEFINE = -DS94LC #endif /* GENDEFINES removed from BDEDEFINES - RJL 020229 */ /* #define BDELOG in #included configure.h */ /* RJL 020401 - What about BDEREPLAY and BDEONEOF? */ /* Don't try to make BDELOG and BDEREPLAY mutually exclusive - RJL 020406 */ /* RJL 020402- GENDEFINES is passed to the CC command in pr_util */ /* and BDEDEFINES is passed to the g++ command in src */ /* RJL 020410; rev. 030808 for Linux: merged line pairs below */ GENVERSION = "GENV13" /* RJL050810: xmkmf -a -DLOG works on mercury but NOT on saturn.*/ /* Then, $PR[N}LOG/Imakefile uses #ifdef LOG to set $PRDIR * to pr_util_[no]log, and to #define (or not) BDELOG and GENLOG */ #ifdef LOG #define BDELOG #define GENLOG GENDEFINES = -DGENV13 -DGENLOG BDEDEFINES = $(BDEUSERDEFINES) $(S94LCDEFINE) -DBDELOG $(DCLCDEFINE) -DDEFAULT_LIB_PATH=\"$(BDE_LIB_PATH)\" #endif #ifndef LOG #undef BDELOG #undef GENLOG GENDEFINES = -DGENV13 BDEDEFINES = $(BDEUSERDEFINES) $(S94LCDEFINE) $(DCLCDEFINE) -DDEFAULT_LIB_PATH=\"$(BDE_LIB_PATH)\" #endif /* echo doesn't work; cpp translates Imakefile to a .c program */ /******************************************************************* * This is what will actually be used by the C++ compiler **************************************************************/ /* I split these 2 mutex cases to remove #else - RJL 030811 */ #ifdef USEDECC CPPOPTIONS = -g -std ansi -DDEBUG -pg #endif #ifndef USEDECC CPPOPTIONS = -g -Wall -DDEBUG -pg #endif CDEBUGFLAGS = -DDEBUG /* see also BDEWARNINGS and USEEXTRAWARN */ #ifdef LinuxArchitecture CPLUSPLUSFLAGS = $(BDEDEFINES) $(CPPOPTIONS) -DLinuxArchitecture #else CPLUSPLUSFLAGS = $(BDEDEFINES) $(CPPOPTIONS) #endif /* GENFLAGS are #defined in pr_util_[no]log/Imakefile */ /******************************************************************* * Tell imake that we have subdirs and what we want to pass to the * imake files in those subdirs * (Added 'CXX=$(CC)' - RJL050529 // changed to = CXX (=g++ above) *******************************************************************/ #define IHaveSubdirs #define PassCDebugFlags 'CDEBUGFLAGS=$(CDEBUGFLAGS)' \ 'CC=$(CC)' \ 'CXX=$(CXX)' \ 'CPLUSPLUS=$(CPLUSPLUS)' \ 'CPLUSPLUSFLAGS=$(CPLUSPLUSFLAGS)' \ 'GENVERSION=$(GENVERSION)' \ 'GENDEFINES=$(GENDEFINES)' /* Define a 4-way branch to the obj and bin directories */ #ifdef GENLOG PRDIR = $(TOP)/pr_util_log #endif #ifndef GENLOG PRDIR = $(TOP)/pr_util_nolog #endif PROBJDIR = $(PRDIR)/$(HOSTTYPE)/probj BINDIR = $(PRDIR)/$(HOSTTYPE)/bin OBJDIR = $(PRDIR)/$(HOSTTYPE)/obj SUBDIRS = $(PRDIR) $(TOP)/src /********* Add text subdirectory for XB *****Haiyan********/ /********* Add extern_code for YuWong's bde2gif ***********/ #ifdef LinuxArchitecture XmLIB = /usr/X11R6/lib/Xm #endif #ifndef LinuxArchitecture XmLIB = /usr/lib/Xm #endif MakeSubdirs($(SUBDIRS)) DependSubdirs($(SUBDIRS)) #ifdef LOG IMAKE_CMD = $(IMAKE) -DUseInstalled -Dnostdinc -DLOG -I/usr/lib/X11/config -I$(XmLIB) $(IMAKE_DEFINES) #endif #ifndef LOG IMAKE_CMD = $(IMAKE) -DUseInstalled -Dnostdinc -I/usr/lib/X11/config -I$(XmLIB) $(IMAKE_DEFINES) #endif /* -DDEFAULT_LIB_PATH is part of CPLUSPLUSFLAGS in PassCDebugFlags */ DEPXMLIB = /usr/include