summaryrefslogtreecommitdiffstats
path: root/Configurations/windows-makefile.tmpl
AgeCommit message (Collapse)Author
2021-07-13Avoid empty lines in nmake rule bodiesRichard Levitte
nmake is tolerant of those empty lines, but jom isn't. That tolerance isn't standard make behaviour, so we lean towards avoiding them. We simply use '@rem' instead. Fixes #16014 Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Paul Dale <pauli@openssl.org> (Merged from https://github.com/openssl/openssl/pull/16047)
2020-07-15To generate makefile with correct parameters for WinCE.aSoujyuTanaka
Reviewed-by: Mark J. Cox <mark@awe.com> Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/11526) (cherry picked from commit a1736f37aee855fecf463b9f15519e12c333ecfc)
2019-05-02Add RCFLAGS variable in Windows build file, and use itWojciech Kaluza
- Allow user-defined RCFLAGS - Pass RCFLAGS to RC Reviewed-by: Tim Hudson <tjh@openssl.org> Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/8803) (cherry picked from commit a583172dac8bce37e268943e570968f193e8b64b)
2018-11-09Have install targets depend on more precise build targetsRichard Levitte
We only had the main 'install' target depend on 'all'. This changes the dependencies so targets like install_dev, install_runtime_libs, install_engines and install_programs depend on build targets that are correspond to them more specifically. This increases the parallel possibilities. Fixes #7466 Reviewed-by: Paul Dale <paul.dale@oracle.com> (Merged from https://github.com/openssl/openssl/pull/7583) (cherry picked from commit e8d01a608705e4320082a11a3870aa7e19c7290f)
2018-11-09Allow parallel installRichard Levitte
When trying 'make -j{n} install', you may occasionally run into trouble because to sub-targets (install_dev and install_runtime) try to install the same shared libraries. That makes parallel install difficult. This is solved by dividing install_runtime into two parts, one for libraries and one for programs, and have install_dev depend on install_runtime_libs instead of installing the shared runtime libraries itself. Fixes #7466 Reviewed-by: Paul Dale <paul.dale@oracle.com> (Merged from https://github.com/openssl/openssl/pull/7583) (cherry picked from commit c1123d9f7efb005a109aeccaba82c40bf9bd4c1d)
2018-10-31Configuration: when building the dirinfo structure, include shared_sourcesRichard Levitte
This makes sure that any resulting directory target in the build files also depend on object files meant for shared libraries. As a side effect, we move the production of the dirinfo structure from common.tmpl to Configure, to make it easier to check the result. Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/7452) (cherry picked from commit b6e660754c2e799cffe4906269fcace0e07c73bc)
2018-10-29Windows build: build foo.d after foo.objRichard Levitte
We made the build of foo.obj depend on foo.d, meaning the latter gets built first. Unfortunately, the way the compiler works, we are forced to redirect all output to foo.d, meaning that if the source contains an error, the build fails without showing those errors. We therefore remove the dependency and force the build of foo.d to always happen after build of foo.obj. Reviewed-by: Tim Hudson <tjh@openssl.org> (Merged from https://github.com/openssl/openssl/pull/7469) (cherry picked from commit ecc347f5f53a9f2edc2805d50cba07db64267e8a)
2018-10-25Windows: Produce a static version of the public libraries, alwaysRichard Levitte
When building shared libraries on Windows, we had a clash between 'libcrypto.lib' the static routine library and 'libcrypto.lib' the import library. We now change it so the static versions of our libraries get '_static' appended to their names. These will never get installed, but can still be used for our internal purposes, such as internal tests. When building non-shared, the renaming mechanism doesn't come into play. In that case, the static libraries 'libcrypto.lib' and 'libssl.lib' are installed, just as always. Fixes #7492 Reviewed-by: Tim Hudson <tjh@openssl.org> (Merged from https://github.com/openssl/openssl/pull/7496) (cherry picked from commit b3023ced6b6a4aece6f4d4ec1f6a93b1c03712b6)
2018-10-21build file templates: have targets for all shared library namesRichard Levitte
We only had targets for the "simple" shared library names (libfoo.so and not libfoo.so.x.y on Unix, import library libfoo.lib but not libfoo.dll on Windows). This has created some confusion why it wasn't possible to rebuild the less "simple" name directly (just as an example, someone who mistook the import library on Windows for a static library, removed the DLL and then found it was difficult to rebuild directly), so we change the target to include all possible names. Reviewed-by: Tim Hudson <tjh@openssl.org> (Merged from https://github.com/openssl/openssl/pull/7451) (cherry picked from commit d8cac50b023be249cdaba054f43acecf17025ce4)
2018-10-17Build file templates: look at *all* definesRichard Levitte
When looking at configured macro definitions, we must look at both what comes from the config target AND what comes from user configuration. Fixes #7396 Reviewed-by: Ben Kaduk <kaduk@mit.edu> (Merged from https://github.com/openssl/openssl/pull/7402) (cherry picked from commit 92ebf6c4c21ff4b41ba1fd69af74b2039e138114)
2018-08-02Fix uninitialized value $s warning in windows static buildsBernd Edlinger
Fixes: #6826 [extended tests] Reviewed-by: Matt Caswell <matt@openssl.org> Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/6833)
2018-07-11Windows: avoid using 'rem' in the nmake makefileRichard Levitte
To avoid the possibility that someone creates rem.exe, rem.bat or rem.cmd, simply don't use it. In the cases it was used, it was to avoid empty lines, but it turns out that nmake handles those fine, so no harm done. Reviewed-by: Andy Polyakov <appro@openssl.org> Reviewed-by: Bernd Edlinger <bernd.edlinger@hotmail.de> (Merged from https://github.com/openssl/openssl/pull/6686)
2018-07-11Windows: fix echo for nmakeRichard Levitte
It seems that nmake first tries to run executables on its own, and only pass commands to cmd if that fails. That means it's possible to have nmake run something like 'echo.exe' when the builtin 'echo' command was expected, which might give us unexpected results. To get around this, we create our own echoing script and call it explicitly from the nmake makefile. Fixes #6670 Reviewed-by: Andy Polyakov <appro@openssl.org> Reviewed-by: Bernd Edlinger <bernd.edlinger@hotmail.de> (Merged from https://github.com/openssl/openssl/pull/6686)
2018-07-09Fix minor windows build issuesBernd Edlinger
[extended tests] Reviewed-by: Rich Salz <rsalz@openssl.org> Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/6661)
2018-07-09Keep supporting the env / make variable PERLRichard Levitte
OpenSSL 1.1.0 supports the use of this environment variable for passing to the build files. For the sake of backward compatibility, we keep it. Reviewed-by: Tim Hudson <tjh@openssl.org> Reviewed-by: Paul Dale <paul.dale@oracle.com> Reviewed-by: Bernd Edlinger <bernd.edlinger@hotmail.de> (Merged from https://github.com/openssl/openssl/pull/6668)
2018-05-20Windows: don't install __DECC_*.HRichard Levitte
This adds the possibility to exclude files by regexp in util/copy.pl Partial fix for #3254 Reviewed-by: Tim Hudson <tjh@openssl.org> Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/6303)
2018-05-15windows-makefile.tmpl: delete export library prior link.Andy Polyakov
LINK can outsmart itself and choose to not update export .lib upon corresponding .dll re-link. Since dependency is between .lib and all .obj-s, re-compilation of any .obj makes NMAKE relink .dll and all .exe-s over and over... Reviewed-by: Rich Salz <rsalz@openssl.org>
2018-05-07windows-makefile.tmpl: rearrange cleanup commands to avoid ...FdaSilvaYY
deletion of *.exp files in krb5 sub-module. Reviewed-by: Andy Polyakov <appro@openssl.org> Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/6186)
2018-04-16Remove mandatory generated files on windows tooBernd Edlinger
Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/5958)
2018-04-12Configurations/*.tmpl: refine build_all_generated.Andy Polyakov
Purpose of build_all_generated is to execute all the rules that require perl, so that one can copy the tree to system with compiler but without perl. This commit removes last dependencies on perl. Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/5929)
2018-04-11Configuration: Simplify generating list of generated files in build file ↵Richard Levitte
templates Computing the value of the GENERATED variable in the build file templates is somewhat overcomplicated, and because of possible duplication errors, changes are potentially error prone. Looking more closely at how this list is determined, it can be observed that the exact list of files to check is consistently available in all the values found in the %unified_info tables 'depends', 'sources' and 'shared_sources', and all that's needed is to filter those values so only those present as keys in the 'generate' table are left. This computation is also common for all build files, so due to its apparent complexity, we move it to common0.tmpl, with the result left in a global variable (@generated), to be consumed by all build file templates. common0.tmpl is included among the files to process when creating build files, but unlike common.tmpl, it comes first of all. Reviewed-by: Andy Polyakov <appro@openssl.org> (Merged from https://github.com/openssl/openssl/pull/5930)
2018-04-08Fix the build_all_generated rule to include generated .map, .def and .opt filesBernd Edlinger
Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/5900)
2018-04-01Windows builds: remove over-quotation of LIBZ macroRichard Levitte
The LIBZ macro definition was already quoted in BASE_windows, then got quotified once more in windows-makefile.tmpl. That's a bit too much quotations, ending up with the compiler being asked to define the macro |"LIBZ=\"ZLIB1\""| (no, not the macro LIBZ with the value "ZLIB1"). This is solved by removing the extra quoting in BASE_windows. Along with this, change the quotation of macro definitions and include file specification, so we end up with things like -I"QuotedPath" and -D"Macro=\"some weird value\"" rather than "-IQuotedPath" and "-DMacro=\"some weird value\"". Fixes #5827 Reviewed-by: Andy Polyakov <appro@openssl.org> (Merged from https://github.com/openssl/openssl/pull/5833)
2018-03-24Configurations/windows-makefile.tmpl: refine clean targets.Andy Polyakov
'nmake clean' was leaving some artefacts behind. Reviewed-by: Richard Levitte <levitte@openssl.org>
2018-03-16Move all dependency post-processing to util/add-depends.plRichard Levitte
In the end, it's more efficient to only have one perl instance (that loads configdata.pm) dealing with dependency files than running one (that still loads configdata.pm) for each such file. Reviewed-by: Andy Polyakov <appro@openssl.org> (Merged from https://github.com/openssl/openssl/pull/5631)
2018-03-15Windows makefile: don't use different looking variants of same cmdRichard Levitte
Reviewed-by: Andy Polyakov <appro@openssl.org> (Merged from https://github.com/openssl/openssl/pull/5635)
2018-03-15Streamline dependency generationRichard Levitte
It seems that only gcc -MMD produces dependency files that are "sane" for our needs. For all other methods, some post processing is needed: - 'makedepend' (Unix) insists that object files are located in the same spot as the source file. - 'cl /Zs /showIncludes' (Visual C) has "Note: including file: " where we'd like to see the object. - 'CC/DECC' (VMS) insists that the object file is located in the current directory, i.e. it strips away all directory information. So far, we've managed this (except for the VMS case) with individual uncommented perl command lines directly in the build file template. We're now collecting these diverse hacks into one perl script that takes an argument to tell what kind of input to expect and that massages whatever it gets on STDIN and outputs the result on STDOUT. Reviewed-by: Andy Polyakov <appro@openssl.org> (Merged from https://github.com/openssl/openssl/pull/5591)
2018-03-13Windows build file: make sure to quoteRichard Levitte
Reviewed-by: Andy Polyakov <appro@openssl.org> (Merged from https://github.com/openssl/openssl/pull/5608)
2018-03-13Refactor the 'depend' targetRichard Levitte
With the help of the perl script util/add-depends.pl, which takes all its information directly from configdata.pm, the dependency adding procedure can be streamlined for all support platforms. Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/5606)
2018-03-09Configurations/windows-makefile.tmpl: simplify install-path "flavour"-ing.Andy Polyakov
$target{build_scheme} consists of fixed number of elements with 3rd element denoting VC install-path "flavour", i.e. where to install things. Instead of looking at 3rd, let's look at last. This allows to override flavour from template in a simple way. Configurations/10-main.conf: define generic "flavour" in VC-common template. Since VC-W32 was the only recognized "flavour", remove "flavour" definitions from all targets/templates, but VC-WIN32. And rename VC-W32 to VC-WOW. Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/5502)
2018-03-09Display the library building flagsRichard Levitte
Reviewed-by: Andy Polyakov <appro@openssl.org> (Merged from https://github.com/openssl/openssl/pull/5560)
2018-03-08Make "make variables" config attributes for overridable flagsRichard Levitte
With the support of "make variables" comes the possibility for the user to override them. However, we need to make a difference between defaults that we use (and that should be overridable by the user) and flags that are crucial for building OpenSSL (should not be overridable). Typically, overridable flags are those setting optimization levels, warnings levels, that kind of thing, while non-overridable flags are, for example, macros that indicate aspects of how the config target should be treated, such as L_ENDIAN and B_ENDIAN. We do that differentiation by allowing upper case attributes in the config targets, named exactly like the "make variables" we support, and reserving the lower case attributes for non-overridable project flags. Reviewed-by: Andy Polyakov <appro@openssl.org> (Merged from https://github.com/openssl/openssl/pull/5534)
2018-03-03Windows makefile: Don't quote generator argumentsRichard Levitte
Rely on the build.info constructor to do the right thing. Fixes #5500 Reviewed-by: Tim Hudson <tjh@openssl.org> (Merged from https://github.com/openssl/openssl/pull/5501)
2018-02-26Make it possible to give --libdir an absolute pathRichard Levitte
With this, we introduce the make variable 'libdir', which differs from 'LIBDIR' not only in casing, but also by being the absolute path to the library installation directory. This variable is intentionally compatible with the GNU coding standards. When --libdir is given an absolute path, it is considered as a value according to GNU coding standards, and the variables LIBDIR and libdir will be this: LIBDIR= libdir=/absolute/path When --libdir is given a relative path (just the name of the desired library directory), or not given at all, it is considered as a "traditional" OpenSSL value, and the variables LIBDIR and libdir will be this: LIBDIR=relativepath libdir=$(INSTALLTOP)/$(LIBDIR) Fixes #5398 Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/5446)
2018-02-22Build files: when using $(CPP), use the C flags alongside the CPP flagsRichard Levitte
The reason for this is that some of the C flags affect built in macros that we may depend on. Reviewed-by: Andy Polyakov <appro@openssl.org> (Merged from https://github.com/openssl/openssl/pull/5436)
2018-02-22Build file templates: be less verbose when reconfiguringRichard Levitte
Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/5247)
2018-02-14Harmonize the make variables across all known platforms familiesRichard Levitte
The make variables LIB_CFLAGS, DSO_CFLAGS and so on were used in addition to CFLAGS and so on. This works without problem on Unix and Windows, where options with different purposes (such as -D and -I) can appear anywhere on the command line and get accumulated as they come. This is not necessarely so on VMS. For example, macros must all be collected and given through one /DEFINE, and the same goes for inclusion directories (/INCLUDE). So, to harmonize all platforms, we repurpose make variables starting with LIB_, DSO_ and BIN_ to be all encompassing variables that collects the corresponding values from CFLAGS, CPPFLAGS, DEFINES, INCLUDES and so on together with possible config target values specific for libraries DSOs and programs, and use them instead of the general ones everywhere. This will, for example, allow VMS to use the exact same generators for generated files that go through cpp as all other platforms, something that has been impossible to do safely before now. Reviewed-by: Andy Polyakov <appro@openssl.org> (Merged from https://github.com/openssl/openssl/pull/5357)
2018-02-14Build files: parametrize cppRichard Levitte
Instead of having the knowledge of the exact flags to run the C preprocessor only and have it output on standard output in the deeper recesses of the build file template, make it a config parameter, or rely on build CPP in value ('$(CC) -E' on Unix). Reviewed-by: Paul Dale <paul.dale@oracle.com> (Merged from https://github.com/openssl/openssl/pull/5356)
2018-02-09Configuration: move the handling of zlib_include to config filesRichard Levitte
It was a bit absurd to have this being specially handled in the build file templates, especially that we have the 'includes' attribute. Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/5296)
2018-02-08With nmake, invoking $(MAKE) needs /$(MAKEFLAGS)Richard Levitte
The slash should be there according to Microsoft documentation, see https://msdn.microsoft.com/en-us/library/7cafx990.aspx Fixes #5277 Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/5278)
2018-01-30Add a 'reconfigure' make targetRichard Levitte
Reviewed-by: Tim Hudson <tjh@openssl.org> (Merged from https://github.com/openssl/openssl/pull/5197)
2018-01-29Restore perl variables for ENGINESDIR and OPENSSLDIRRichard Levitte
For proper escaping, we need the direct perl variable values, not a make variable reference. Reviewed-by: Tim Hudson <tjh@openssl.org> (Merged from https://github.com/openssl/openssl/pull/5196)
2018-01-29Fix typo in Windows makefile template: quotify, not quotiryRichard Levitte
Reviewed-by: Tim Hudson <tjh@openssl.org> (Merged from https://github.com/openssl/openssl/pull/5196)
2018-01-29Have the build files use the executable configdata.pmRichard Levitte
Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/5185)
2018-01-28Processing GNU-style "make variables" - implementationRichard Levitte
Support the following "make variables": AR (GNU compatible) ARFLAGS (GNU Compatible) AS (GNU Compatible) ASFLAGS (GNU Compatible) CC (GNU Compatible) CFLAGS (GNU Compatible) CXX (GNU Compatible) CXXFLAGS (GNU Compatible) CPP (GNU Compatible) CPPFLAGS (GNU Compatible) CPPDEFINES List of CPP macro definitions. Alternative for -D CPPINCLUDES List of CPP inclusion directories. Alternative for -I HASHBANGPERL Perl invocation to be inserted after '#!' in public perl scripts. LDFLAGS (GNU Compatible) LDLIBS (GNU Compatible) RANLIB Program to generate library archive index RC Program to manipulate Windows resources RCFLAGS Flags for $(RC) RM (GNU Compatible) Setting one of these overrides the corresponding data from our config targets. However, flags given directly on the configuration command line are additional, and are therefore added to the flags coming from one of the variables above or the config target. Fixes #2420 Reviewed-by: Tim Hudson <tjh@openssl.org> Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/5177)
2018-01-28Processing GNU-style "make variables" - separate CPP flags from C flagsRichard Levitte
C preprocessor flags get separated from C flags, which has the advantage that we don't get loads of macro definitions and inclusion directory specs when linking shared libraries, DSOs and programs. This is a step to add support for "make variables" when configuring. Reviewed-by: Tim Hudson <tjh@openssl.org> Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/5177)
2018-01-19Set OPENSSL_ENGINES for WindowsBernd Edlinger
Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/5108)
2018-01-15Fix Windows build file template to recognise .res filesRichard Levitte
Only when building the main shared libraries Fixes #5075 Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/5077)
2017-12-12Configure et al: cleanupsRichard Levitte
Remove some config attributes that just duplicate values that are already there in other attributes. Remove the special runs of mkdef.pl and mkrc.pl from build file templates, as these are now done via GENERATE statements in build.info. Remove all references to ordinal files from build file templates, as these are now treated via the GENERATE statements in build.info. Also remove -shared flags and similar that are there in shared-info.pl anyway. (in the case of darwin, it's mandatory, as -bundle and -dynamiclib don't mix) Reviewed-by: Andy Polyakov <appro@openssl.org> Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/4840)
2017-12-12Build file templates: Replace the use of Makefile.sharedRichard Levitte
Because this also includes handling all sorts of non-object files when linking a program, shared library or DSO, this also includes allowing general recognition of files such as .res files (compiled from .rc files), or .def / .map / .opt files (for export and possibly versioning of public symbols only). This does mean that there's a tangible change for all build file templates: they must now recognise and handle the `.o` extension, which is used internally to recognise object files internally. This extension was removed by common.tmpl before this change, but would mean that the platform specific templates wouldn't know if "foo.map" was originally "foo.map.o" (i.e. an object file in its own right) or "foo.map" (an export definition file that should be treated as such, not as an object file). For the sake of simplifying things, we also modify util/mkdef.pl to produce .def (Windows) and .opt (VMS) files that don't need additional hackery. Reviewed-by: Andy Polyakov <appro@openssl.org> Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/4840)