Fossil SCM
Added build for FreeBSD using clang.
Commit
b775af50450ef89a0515499bb3f8668fe9282c69
Parent
7f61175d27790d7…
1 file changed
+82
| --- a/make/freebsd-clang-config.mk | ||
| +++ b/make/freebsd-clang-config.mk | ||
| @@ -0,0 +1,82 @@ | ||
| 1 | +#### config.mk file for FreeBSD with CLANG. | |
| 2 | +# Copy this file as config.mk in the Fossil root directory to use. | |
| 3 | +# NOTE: You will need to have GNU Make installed to use this. | |
| 4 | +# | |
| 5 | + | |
| 6 | +#### OS-specific configuration for building Fossil on FreeBSD systems. | |
| 7 | +# NOTE: You will need to have GNU Make installed to use this. | |
| 8 | +# | |
| 9 | + | |
| 10 | +#### The suffix to add to executable files. ".exe" for windows. | |
| 11 | +# Nothing for unix. | |
| 12 | +# | |
| 13 | +E = | |
| 14 | + | |
| 15 | +#### The directory into which object code files should be written. | |
| 16 | +# | |
| 17 | +OBJDIR = ./obj | |
| 18 | + | |
| 19 | +#### The following variable definitions decide which features are turned on or | |
| 20 | +# of when building Fossil. Comment out the features which are not needed by | |
| 21 | +# this platform. | |
| 22 | +# | |
| 23 | +#ENABLE_STATIC = 1 # we want a static build | |
| 24 | +ENABLE_SSL = 1 # we are using SSL | |
| 25 | +#ENABLE_SOCKET = 1 # we are using libsocket (OpenSolaris and Solaris) | |
| 26 | +#ENABLE_NSL = 1 # we are using libnsl library (Solaris) | |
| 27 | +ENABLE_I18N = 1 # we are using i18n settings | |
| 28 | + | |
| 29 | +#### Compiler-specific configuration for users of the GCC compiler suite. | |
| 30 | +# | |
| 31 | + | |
| 32 | +#### C Compiler and options for use in building executables that | |
| 33 | +# will run on the platform that is doing the build. This is used | |
| 34 | +# to compile code-generator programs as part of the build process. | |
| 35 | +# See TCC below for the C compiler for building the finished binary. | |
| 36 | +# | |
| 37 | +BCC = clang -g -O2 | |
| 38 | + | |
| 39 | +#### C Compile and options for use in building executables that | |
| 40 | +# will run on the target platform. This is usually the same | |
| 41 | +# as BCC, unless you are cross-compiling. This C compiler builds | |
| 42 | +# the finished binary for fossil. The BCC compiler above is used | |
| 43 | +# for building intermediate code-generator tools. | |
| 44 | +# | |
| 45 | +TCC = clang -g -Os -Wall | |
| 46 | + | |
| 47 | +#### Compiler options. | |
| 48 | +# The variables tested are defined in the make/PLATFORM-fragment.mk files. | |
| 49 | +# | |
| 50 | +ifdef ENABLE_SSL | |
| 51 | + TCC += -DFOSSIL_ENABLE_SSL=1 | |
| 52 | +endif | |
| 53 | +ifndef ENABLE_I18N | |
| 54 | + TCC += -DFOSSIL_I18N=0 | |
| 55 | +endif | |
| 56 | + | |
| 57 | +#### Linker dependencies. Fossil only requires libz as an external dependency. | |
| 58 | +# All other library settings are optional and toggled in platform-specific | |
| 59 | +# make fragments. | |
| 60 | +# | |
| 61 | +LIB = -lz $(LDFLAGS) | |
| 62 | + | |
| 63 | +#### Linker options. | |
| 64 | +# The variables tested are defined in the make/PLATFORM-fragment.mk files. | |
| 65 | +# | |
| 66 | +ifdef ENABLE_STATIC | |
| 67 | + LIB += -static | |
| 68 | +endif | |
| 69 | +ifdef ENABLE_SSL | |
| 70 | + LIB += -lcrypto -lssl | |
| 71 | +endif | |
| 72 | +ifdef ENABLE_SOCKET | |
| 73 | + LIB += -lsocket | |
| 74 | +endif | |
| 75 | +ifdef ENABLE_NSL | |
| 76 | + LIB += -lnsl | |
| 77 | +endif | |
| 78 | + | |
| 79 | +#### Signal that we've used a config.mk file. | |
| 80 | +# | |
| 81 | +CONFIG_MK_COMPLETE=1 | |
| 82 | + |
| --- a/make/freebsd-clang-config.mk | |
| +++ b/make/freebsd-clang-config.mk | |
| @@ -0,0 +1,82 @@ | |
| --- a/make/freebsd-clang-config.mk | |
| +++ b/make/freebsd-clang-config.mk | |
| @@ -0,0 +1,82 @@ | |
| 1 | #### config.mk file for FreeBSD with CLANG. |
| 2 | # Copy this file as config.mk in the Fossil root directory to use. |
| 3 | # NOTE: You will need to have GNU Make installed to use this. |
| 4 | # |
| 5 | |
| 6 | #### OS-specific configuration for building Fossil on FreeBSD systems. |
| 7 | # NOTE: You will need to have GNU Make installed to use this. |
| 8 | # |
| 9 | |
| 10 | #### The suffix to add to executable files. ".exe" for windows. |
| 11 | # Nothing for unix. |
| 12 | # |
| 13 | E = |
| 14 | |
| 15 | #### The directory into which object code files should be written. |
| 16 | # |
| 17 | OBJDIR = ./obj |
| 18 | |
| 19 | #### The following variable definitions decide which features are turned on or |
| 20 | # of when building Fossil. Comment out the features which are not needed by |
| 21 | # this platform. |
| 22 | # |
| 23 | #ENABLE_STATIC = 1 # we want a static build |
| 24 | ENABLE_SSL = 1 # we are using SSL |
| 25 | #ENABLE_SOCKET = 1 # we are using libsocket (OpenSolaris and Solaris) |
| 26 | #ENABLE_NSL = 1 # we are using libnsl library (Solaris) |
| 27 | ENABLE_I18N = 1 # we are using i18n settings |
| 28 | |
| 29 | #### Compiler-specific configuration for users of the GCC compiler suite. |
| 30 | # |
| 31 | |
| 32 | #### C Compiler and options for use in building executables that |
| 33 | # will run on the platform that is doing the build. This is used |
| 34 | # to compile code-generator programs as part of the build process. |
| 35 | # See TCC below for the C compiler for building the finished binary. |
| 36 | # |
| 37 | BCC = clang -g -O2 |
| 38 | |
| 39 | #### C Compile and options for use in building executables that |
| 40 | # will run on the target platform. This is usually the same |
| 41 | # as BCC, unless you are cross-compiling. This C compiler builds |
| 42 | # the finished binary for fossil. The BCC compiler above is used |
| 43 | # for building intermediate code-generator tools. |
| 44 | # |
| 45 | TCC = clang -g -Os -Wall |
| 46 | |
| 47 | #### Compiler options. |
| 48 | # The variables tested are defined in the make/PLATFORM-fragment.mk files. |
| 49 | # |
| 50 | ifdef ENABLE_SSL |
| 51 | TCC += -DFOSSIL_ENABLE_SSL=1 |
| 52 | endif |
| 53 | ifndef ENABLE_I18N |
| 54 | TCC += -DFOSSIL_I18N=0 |
| 55 | endif |
| 56 | |
| 57 | #### Linker dependencies. Fossil only requires libz as an external dependency. |
| 58 | # All other library settings are optional and toggled in platform-specific |
| 59 | # make fragments. |
| 60 | # |
| 61 | LIB = -lz $(LDFLAGS) |
| 62 | |
| 63 | #### Linker options. |
| 64 | # The variables tested are defined in the make/PLATFORM-fragment.mk files. |
| 65 | # |
| 66 | ifdef ENABLE_STATIC |
| 67 | LIB += -static |
| 68 | endif |
| 69 | ifdef ENABLE_SSL |
| 70 | LIB += -lcrypto -lssl |
| 71 | endif |
| 72 | ifdef ENABLE_SOCKET |
| 73 | LIB += -lsocket |
| 74 | endif |
| 75 | ifdef ENABLE_NSL |
| 76 | LIB += -lnsl |
| 77 | endif |
| 78 | |
| 79 | #### Signal that we've used a config.mk file. |
| 80 | # |
| 81 | CONFIG_MK_COMPLETE=1 |
| 82 |