#define DoNormalLib YES #define DoSharedLib NO #define DoDebugLib NO #define DoProfileLib NO #define HasSQLite NO #define HasXBase NO #define HasSwRIDB YES #define HasMySQL NO #define HasALLDB NO #define OnWindows NO /* Comment one of these out if the platform does not offer it */ #define HaveNativeGL YES #define HaveMesaGL YES #define UseFLTK NO #include XTOOLLIB = $(XTOOLONLYLIB) XCOMM ************************************************************* XCOMM In your own Imakefile, use these flags if you want to define XCOMM an option : XCOMM XCOMM CPPLOCALFLAGS - for C++ files XCOMM CLOCALFLAGS - for C files XCOMM XCOMM (These are just examples you can add to your Imakefile) XCOMM XCOMM CPPLOCALFLAGS = -DFUNCPROTO -DXTFUNCPROTO (for C++ X programs) XCOMM XCOMM ************************************************************* XCOMM C Compiler XCOMM ************************************************************* CC = gcc CCC = gcc C++ = gcc /* For release stuff, make this -O2 (with gcc), else make nothing */ SIGNED_CHAR = -fsigned-char CPPLIB = /opt/csw/lib/libstdc++.so CCOPTIONS = /* nothing */ $(DBFLAG) $(CLOCALFLAGS) CCCOPTIONS = /* nothing */ $(CPPLOCALFLAGS) XCOMM CDEBUGFLAGS = -g -ansi -pedantic -D__EXTENSIONS__ -Wall CDEBUGFLAGS = -g -ansi -D__EXTENSIONS__ -Wall DEPENDFLAGS = -I/opt/local/gcc-3.4.1/include/c++/3.4.1 \ -I/opt/local/gcc-3.4.1/include/c++/3.4.1/sparc-sun-solaris2.9 \ -I/opt/local/gcc-3.4.1/lib/gcc-lib/sparc-sun-solaris2.9/3.4.1/include \ -I/opt/local/gcc-3.4.1/sparc-sun-solaris2.9/include /* #define MapfileName shared/mapfile */ PICFLAGS = -fPIC -g /* Some systems might need these */ XCOMM LD_RUN_PATH = /usr/dt/lib XCOMM EXTRA_LOAD_FLAGS = -R/usr/dt/lib LEXLIB = /usr/lib/libl.a CURSESLIB = -lcurses #if HasALLDB DBLIB = -ldbSQLite $(SQLITE_LIB) -ldbSQL $(MYSQL_LIB) -lserver -ldB DBFLAG = -DALL_DB #endif #if HasSQLite DBLIB = -ldbSQLite $(SQLITE_LIB) DBFLAG = -DSQLITE_DB #endif #if HasMySQL DBLIB = -ldbSQL $(MYSQL_LIB) DBFLAG = -DSQL_DB #endif #if HasXBase DBLIB = -ldbXbase $(XBASE_LIB) DBFLAG = -DXBASE_DB #endif #if HasSwRIDB DBLIB = -lserver -ldB DBFLAG = -DSwRI_DB #endif #if OnWindows EXTENSION = .exe #else EXTENSION = #endif #if defined (SunArchitecture) || defined (LinuxArchitecture) DLLIB = -ldl #endif XCOMM ************************************************************* XCOMM OpenGL stuff XCOMM ************************************************************* GL_LIBS = $(XMULIB) -L/UpTime/joey/freeglut/lib -lglut -lGLU -lGL XCOMM ************************************************************* XCOMM XBASE stuff XCOMM ************************************************************* XBASE_DIR = /devel/xbase-2.0.0 XBASE_INCLUDE = -I$(XBASE_DIR)/include XBASE_LIB = -L$(XBASE_DIR)/lib -lxbase XCOMM ************************************************************* XCOMM MySQL stuff XCOMM ************************************************************* MYSQL_DIR = /devel/mysql MYSQL_INCLUDE = -I$(MYSQL_DIR)/include/mysql XCOMM MYSQL_LIB = -L$(MYSQL_DIR)/lib/mysql -lmysqlclient -lz MYSQL_LIB = $(MYSQL_DIR)/lib/mysql/libmysqlclient.a -lz XCOMM ************************************************************* XCOMM SQLite stuff XCOMM ************************************************************* SQLITE_DIR = /devel/sqlite-3.2.0 SQLITE_INCLUDE = -I$(SQLITE_DIR)/include SQLITE_LIB = $(SQLITE_DIR)/lib/libsqlite3.a XCOMM ************************************************************* XCOMM FLTK stuff XCOMM ************************************************************* FLTK_DIR = /devel/fltk FLTK_INCLUDE = -I/devel/fltk FLTK_LIB = -L/devel/fltk/lib -lfltk -lfltk_gl XCOMM ************************************************************* XCOMM QT stuff XCOMM ************************************************************* QT_FLAGS = -DQT_CLEAN_NAMESPACE -DQT_NO_DEBUG -DQT_SHARED -I/opt/local/qt/mkspecs/default QT_INCLUDE = -I/opt/local/qt/mkspecs/default -I/opt/local/qt/include QT_MOTIF_LIB = -L/opt/local/qt/lib -lqt -lqmotif -R/opt/local/qt/lib QT_LIB = -L/opt/local/qt/lib -lqt -R/opt/local/qt/lib VTK_QT_INCLUDE = -I/export/home/joey/vtkqt VTK_QT_LIB = /export/home/joey/vtkqt/libvtkqt.a XCOMM ************************************************************* XCOMM VTK stuff XCOMM ************************************************************* XCOMM VTK_DIR = /opt/local/vtk31 VTK_DIR = /devel/VTK VTK_INCLUDE = -I$(VTK_DIR)-install/include/vtk-5.7 VTK_SRC_DIR = /devel/VTK VTK_MESA_LIB_DIR = -L$(VTK_DIR)/bin.static VTK_LIB_DIR = -L$(VTK_DIR)-bin/bin XCOMM VTK_LIB_DIR = -L$(VTK_DIR)/Graphics -L$(VTK_DIR)/Imaging -L$(VTK_DIR)/Contrib -L$(VTK_DIR)/Local -L$(VTK_DIR)/Common MESA_GL_DIR = /devel/Mesa-5.0 NATIVE_GL = -L/usr/lib -lGL MESA_GL = -L$(MESA_GL_DIR)/lib -lGL DEFAULT_GL = $(NATIVE_GL) XCOMM ************************************************************* XCOMM Tcl/Tk stuff XCOMM ************************************************************* TCL_TK_VERSION = 8.4 TCL_TK_DIR = /opt/local/tcltk-8.4.7 TCL_TK_DIR_ESC = \/opt\/local\/tcltk-8.4.7 TCL_LIB = $(TCL_TK_DIR)/lib/libtcl$(TCL_TK_VERSION).a TK_LIB = $(TCL_TK_DIR)/lib/libtk$(TCL_TK_VERSION).a -ldl TCL_LIB_INC = -I$(TCL_TK_DIR)/include \ -I$(TCL_TK_DIR)/tcl$(TCL_TK_VERSION) \ -I$(TCL_TK_DIR)/tk$(TCL_TK_VERSION) TCL_LIB_DIR = -L$(TCL_TK_DIR)/lib XCOMM ************************************************************* XCOMM CDF Stuff XCOMM ************************************************************* CDF_INC = /devel/sddas/CDFv2.6/cdf26-dist/include netCDF_INC = /devel/sddas/netCDFv2.4/netcdf-2.4.3/include CDF_LIB = /devel/sddas/CDFv2.6/cdf26-dist/lib netCDF_LIB = /devel/sddas/netCDFv2.4/netcdf-2.4.3/lib XCOMM ************************************************************* XCOMM SDDAS specific things XCOMM ************************************************************* GPH_TEST_DIR = /public/graphics TEST_DIR = /public/sddas SDDAS_TEST_DIR = $(TEST_DIR)/src SDDAS_BIN_DIR = $(SDDAS_HOME)/bin SDDAS_GLIB_DIR = $(SwRI_GHOME)/lib SDDAS_INCL_DIR = $(SDDAS_HOME)/include SDDAS_INCLUDE = -I$(SDDAS_INCL_DIR) SDDAS_GINCLUDE = -I$(SwRI_GHOME)/include SDDAS_WINCLUDE = $(WORK_PLACES:%=-I$(SDDAS_HOME)/src/%) SDDAS_WLIBS = $(WORK_PLACES:%=-L$(SDDAS_HOME)/src/%) SDDAS_LIBDIR = -L$(SDDAS_HOME)/lib SDDAS_GLIBDIR = -L$(SwRI_GHOME)/lib XCOMM *************************************************************************** XCOMM The following targets may be defined : XCOMM XCOMM all - default target - makes everything XCOMM testing - releases EVERYTHING in this directory to XCOMM SDDAS_TEST_DIR (beta directory) XCOMM release_beta - releases only changes in this directory to XCOMM SDDAS_TEST_DIR (beta directory) since XCOMM the last release XCOMM rba - release the changes in subdirectories to XCOMM SDDAS_TEST_DIR (beta directory) since XCOMM the last release XCOMM release_beta_diff - diff's changes in this directory to XCOMM SDDAS_TEST_DIR (beta directory) since XCOMM the last release XCOMM rba_diff - diff's changes in subdirectories to XCOMM SDDAS_TEST_DIR (beta directory) since XCOMM the last release XCOMM link - relinks the program XCOMM pure - links the program with Purify XCOMM clean - cleans the directory XCOMM release - release the object to the correct location XCOMM binaries go into the SDDAS_BIN_DIR XCOMM includes go into the SDDAS_INCL_DIR XCOMM libraries go into the SDDAS_LIBDIR XCOMM XCOMM *************************************************************************** /************************************************************** * Some system stuff that we can put in a common place * **************************************************************/ CDE_INCLUDE = -I/usr/dt/include CDE_LIB = -L/usr/dt/lib #ifndef XMLIB XMLIB = /usr/dt/lib/libXm12.so #endif #ifndef XTOOLONLYLIB XTOOLONLYLIB = -lXt #endif #ifndef SDReleaseProgram /************************************************************** * SDReleaseProgram - send it a program name * * * * e.g. - SDReleaseProgram (Contour) * * * **************************************************************/ #define SDReleaseProgram(progname) @@\ release:: $(SDDAS_HOME)/bin/Concat(progname,$(EXTENSION)) @@\ @echo '$(SDDAS_HOME)/bin/'Concat(progname,$(EXTENSION)) is up to date. @@\ @@\ $(SDDAS_HOME)/bin/Concat(progname,$(EXTENSION)): Concat(progname,$(EXTENSION)) @@\ $(RM) $(SDDAS_HOME)/bin/Concat(progname,$(EXTENSION)) @@\ $(CP) Concat(progname,$(EXTENSION)) $(SDDAS_HOME)/bin @@\ strip $(SDDAS_HOME)/bin/Concat(progname,$(EXTENSION)) #endif /* ************************************************************* SDMakeSharedLibrary - send it a library name (no lib and no .a) send it the objects to use and a revision number e.g. - SDReleaseLib (ant,untok.o aaa.o,1) for libant.so.1 This will also make a static library ************************************************************* */ #ifndef SDMakeSharedLibrary #if DoSharedLib #define SDMakeSharedLibrary(libname,objs,rev) @@\ LibraryObjectRule () @@\ NormalLibraryTarget (libname,objs) @@\ SharedLibraryTarget (libname,rev,objs,shared,..) @@\ release:: Concat (lib,libname.so.rev) @@\ $(MV) Concat(lib,libname.so*) $(SDDAS_HOME)/sharedlib #else #define SDMakeSharedLibrary(libname,objs,rev) @@\ LibraryObjectRule () @@\ NormalLibraryTarget (libname,objs) #endif #endif #ifndef SDReleaseLib /* ************************************************************* SDReleaseLib - send it a library name (no lib and no .a) e.g. - SDReleaseLib (ant) for libant.a ************************************************************* */ #define SDReleaseLib(libname) @@\ release:: $(SDDAS_HOME)/lib/Concat(lib,libname.a) @@\ @ echo '$(SDDAS_HOME)/lib/'Concat(lib,libname.a) is up to date. @@\ @@\ $(SDDAS_HOME)/lib/Concat(lib,libname.a): Concat(lib,libname.a) @@\ $(CP) Concat(lib,libname.a) $(SDDAS_HOME)/lib @@\ for header_file in $(SOURCES.h) ;\ @@\ do $(RM) $(SDDAS_HOME)/include/$$header_file ;\ @@\ $(CP) $$header_file $(SDDAS_HOME)/include ;\ @@\ chmod 664 $(SDDAS_HOME)/include/$$header_file ;\ @@\ done @@\ @echo Done. @@\ #endif #ifndef SDTestingRelease #define SDTestingRelease(directory) @@\ testing: @@\ @echo 'Remove everything in directory' @@\ $(RM) -r directory @@\ @echo 'Cleaning everything here' @@\ make clean @@\ @echo 'Recreating directory' @@\ mkdir directory @@\ @echo 'Copying everything to directory' @@\ tar -cvFFf - . | (cd directory; tar xf -) #endif /********************************************************/ /* Release to public area (beta_dir) */ /* Release sources, headers, Imakefile, etc. (sources) */ /********************************************************/ #ifndef SDBetaRelease #define SDBetaRelease(beta_dir,sources) @@\ #ifdef SUBDIRS @@\ NamedTargetSubdirs (rba,. $(SUBDIRS),"Releasing to /public",NullParameter,release_beta) @@\ NamedTargetSubdirs (rba_diff,. $(SUBDIRS),"Diffing from /public",NullParameter,release_beta_diff) @@\ #endif @@\ release_beta_diff:: @@\ -@for i in sources ; \ @@\ do echo $$i; diff beta_dir/$$i $$i ; \ @@\ done @@\ @echo Done. @@\ @@\ release_beta:: @@\ @for i in sources ; \ @@\ do make "target_beta.src=beta_dir/$$i" \ @@\ "dependant_beta.src=$$i" released_beta.src ; \ @@\ done @@\ @echo Done. @@\ @@\ released_beta.src :: $(target_beta.src) @@\ @@\ $(target_beta.src):: $(dependant_beta.src) @@\ rm -f $@ @@\ cp $? $@ @@\ chmod 664 $@ @@\ #endif /* * Purify target - use "make pure" to work */ #ifndef PurifyTarget #ifndef PURIFY PURIFY = purify #endif #define PurifyTarget(program) @@\ pure: @@\ RemoveTargetProgram(program) @@\ $(PURIFY) $(CC) -o program $(OBJS) $(LDOPTIONS) $(LOCAL_LIBRARIES) $(LDLIBS) $(EXTRA_LOAD_FLAGS) #endif /* PurifyTarget */ /* * Link target - use "make link" to work */ #ifndef LinkTarget #define LinkTarget(program) @@\ link: @@\ RemoveTargetProgram(program) @@\ $(CC) -o program $(OBJS) $(LDOPTIONS) $(LOCAL_LIBRARIES) $(LDLIBS) $(EXTRA_LOAD_FLAGS) #endif /* LinkTarget */ /* * Not all systems have built-in support for C++ source file suffixes. * We will define a rule for the C++ suffix being used. */ #ifndef CCC C++ = $(CCC) .SUFFIXES: .C $(SUFFIXES) #if DoSharedLib .C.o: $(RM) $@ unshared/$@ $(CC) -c $(CCOPTIONS) $(ALLDEFINES) $(CDEBUGFLAGS) $(_NOOP_) $*.C $(MV) $@ unshared/$@ $(RM) $@ $(CC) -c $(CFLAGS) $(_NOOP_) $(SHLIBDEF) $(SHAREDCODEDEF) $(PICFLAGS) $*.C #else .C.o: $(C++) $(CPPFLAGS) $(CCCOPTIONS) $(CFLAGS) -c $< #endif .SUFFIXES: .cpp $(SUFFIXES) .cpp.o: $(C++) $(CPPFLAGS) $(CCCOPTIONS) $(CFLAGS) -c $< .SUFFIXES: .cxx $(SUFFIXES) .cxx.o: $(C++) $(CPPFLAGS) $(CCCOPTIONS) $(CFLAGS) -c $< #endif /* * LocationLibraryTarget - generate rules to create a library in a * specified directory */ #ifndef LocationLibraryTarget #define LocationLibraryTarget(dest,libname,objlist) @@\ AllTarget(Concat3(Concat(dest,/),lib,libname.a)) @@\ @@\ Concat3(Concat(dest,/),lib,libname.a): objlist @@\ MakeDir(dest) @@\ $(RM) $@ @@\ $(AR) $@ objlist @@\ RanLibrary($@) #endif /* LocationLibraryTarget */ /* * AppendLib * */ #ifndef AppendLib #define AppendLib(dest,libname,objlist) @@\ AllTarget(Concat3(Concat(dest,/),lib,libname.a)) @@\ @@\ Concat3(Concat(dest,/),lib,libname.a): objlist @@\ MakeDir(dest) @@\ $(AR) $@ objlist @@\ RanLibrary($@) #endif /*AppendLib */