/usr/share/doc/firebird
PURPOSE : To explain the makefile system in firebird2. STATUS: Still a work in progress (both the makefiles, and this document) AUTHORS: Mark O'Donohue mark.odonohue@luduwg.edu.au COPYRIGHT: All rights retained by authors. For distribution with Firebird source (Someone who knows this legal stuff will update it later) OVERVIEW The new makefiles were created to fit in with autoconf, to place the object files in seperate directories to the source files and to simplify the build process. It really does rely on using gnu make so that is the best version to use. THE REALLY QUICK INTRO For linux this is how I do a compile (classic is only one currently) autoconf ./configure $cd src $make > make.log 2>&1 ; cat make.log | grep -v warning > make2.log ; vi make2.log For an install checkout $make install it will list your options - but also needs some work. MAKEFILE Makefiles are found in builds/posix make.rules make.defaults make.shared.variables prefix.xxx (where xxx = platform) In src/make.new there are a number of Makefile.in.xxx files and some make.xxx STRUCTURE OF MAKEFILE.IN.XXX Each Makefile.in.xxx has the following somewhere near the top: include make.defaults include make.platform include make.rules include make.shared.variables ... ... These are: make.defaults This contains default values for macros that it is likely that the user may want to override. make.platform This file is created from the prefix.xxx where xxx=linux/darwin/freebsd etc. It provides a spot for the user to override or repalce macros that have been defined in make.defaults. In addition extra dependancies can be added to build extra targets. make.rules This contains the default rules for compiling the system components. Such as directory macros CXX etc. make.shared.variables This file contains the defintion of macros that are shared across all of the modules. The only set that are needed are those files that are contained in the libgds.a/so library since files from many modules contribute to the library. CREATING OBJECT FILES In the makefiles the object files are of two sorts .o static and .lo which are suitable for shared libraries. On most systems the source files need to be compiled twice to create both .o and .lo files. F Fortunately the program libtool can help work with this. The general format of .o file dependancies is: SERVER_Sources = server.cpp SERVER_Objects = $(SERVER_Sources:%.cpp=$(OBJ)/%.o) So the .o files live in $(OBJ) where: OBJ = $(ROOT)/gen/$ModuleName Each Makefile also specifies an AllObjects and Dependancies macro which identified all the objects that this Makefile is to create and the name of the dependency files generated for those objects. AllObjects = $(Alice_Objects) FILE DEPENDANCIES Include file dependancy information is automatically generated by the gcc compiler. The gcc compiler has a flag -MMD which will generate in addition to the .o file a .d file which contains the dependancy chain of #includes required for the program. These are then edited and stored in the $(OBJ) directory and are included in the bottom line of the makefile with Dependencies = $(All_Objects:.o=.d) include $(Dependancies) PLATFORM SUBDIRS OF JRD Please, forget about jrd/os/* in makefiles! Pretend that all files from there are placed in jrd/ itself. A little trick in make.rules will find files for your platform automatically.
.
Edit
..
Edit
CHANGELOG.md
Edit
Firebird-3-QuickStart.pdf
Edit
Firebird-4.0.6-ReleaseNotes.pdf
Edit
IDPLicense.txt
Edit
IPLicense.txt
Edit
README.DiskSpaceAllocation
Edit
README.Fedora
Edit
README.IPv6
Edit
README.NTSecurity
Edit
README.Optimizer.txt
Edit
README.SecureRemotePassword.html
Edit
README.Win32LibraryInstallation.txt
Edit
README.Win9X_NT_embedding
Edit
README.build.macosx.md
Edit
README.build.mingw.html
Edit
README.build.msvc.html
Edit
README.build.posix.html
Edit
README.coding.style
Edit
README.connection_string_charset.txt
Edit
README.connection_strings
Edit
README.external_routines.txt
Edit
README.fb_cancel_operation
Edit
README.fb_shutdown
Edit
README.fbsvcmgr
Edit
README.garbage_collector
Edit
README.gbak
Edit
README.incompatibilities.3to4.txt
Edit
README.incompatibilities.txt
Edit
README.instsvc
Edit
README.intl
Edit
README.isql_enhancements.txt
Edit
README.makefiles
Edit
README.md
Edit
README.modern_cpp.md
Edit
README.monitoring_tables
Edit
README.online_validation
Edit
README.performance_monitoring
Edit
README.plugins.html
Edit
README.providers.html
Edit
README.raw_devices
Edit
README.read_consistency.md
Edit
README.read_password_from_file
Edit
README.replication.md
Edit
README.security_database.txt
Edit
README.services_extension
Edit
README.session_idle_timeouts
Edit
README.sha1
Edit
README.statement_timeouts
Edit
README.superclassic
Edit
README.trace_services
Edit
README.transaction_at_snapshot.md
Edit
README.trusted_authentication
Edit
README.user.embedded
Edit
README.user.troubleshooting
Edit
README.wire.compression.html
Edit
README.xnet
Edit
sample
Edit
sql.extensions
Edit
udf_replace.sql
Edit
udf_replace.txt
Edit