Christophe de Dinechin
c199342ed4
Add check for strtok_r
2018-04-04 10:21:04 +02:00
Christophe de Dinechin
7f5780099c
Add -fPIC to standard flags
2018-04-04 10:21:04 +02:00
Christophe de Dinechin
24eff2112b
Workaround a bug in GNU make when reloading generated makefiles
...
The problem was discovered testing parallel builds.
The configuration rules depend on generated pkg-config.mk files.
However, experimentally, variables set in these files are not
correctly reloaded in rules declared in other variables.
Specifically, $(CFLAGS_PKGCONFIG) was not re-expanded after being
modified, which led to configuration builds to lack the required
flags, causing false configuration step failures.
The flags are now explicitly listed using $(shell cat...), which
is a little bit more expensive during the configuration step, but
ensures that the flags are correctly seen. Note that at that stage,
the dependency ensures that all the files were built correctly.
2018-04-04 10:21:04 +02:00
Christophe de Dinechin
cb38305bb6
Write targets for configuration steps in one stdout redirection, no append
2018-04-04 10:21:04 +02:00
Christophe de Dinechin
6dd72b3adb
For configuration compiles, delay evaluation of CFLAGS, add LDFLAGS
2018-04-04 10:21:04 +02:00
Christophe de Dinechin
263725113e
Make sure configuration happens before pre-build
2018-04-04 10:21:04 +02:00
Christophe de Dinechin
798771a4dc
Make file names for configuration-generated files more consistent
2018-04-04 10:21:04 +02:00
Christophe de Dinechin
bcdde51bf5
Reorganize configuration management for readability
2018-04-04 10:21:04 +02:00
Christophe de Dinechin
53216cc34e
Variants can't be built in parallel
2018-04-04 10:21:04 +02:00
Christophe de Dinechin
63decf96d7
Cannot configure until we have pre-built (including pkg-config)
2018-04-04 10:21:04 +02:00
Christophe de Dinechin
9df2d4fc2a
Whitespace adjustment for alignment
2018-04-04 10:21:04 +02:00
Christophe de Dinechin
0ab036c3db
Make it possible to have config-dependant SOURCES
2018-04-04 10:21:04 +02:00
Christophe de Dinechin
e8f7ccd2d4
Make configuration generation less verbose
2018-04-04 10:21:04 +02:00
Christophe de Dinechin
40b5b90342
Fix typo in CFLAGS for configuration builds
2018-04-04 10:21:04 +02:00
Christophe de Dinechin
7f1c4e9abc
Make sure pkgconfig are analyzed before checking configuration
2018-04-04 10:21:04 +02:00
Christophe de Dinechin
85baa3471d
Reduce verbosity of configuration steps
2018-04-04 10:21:03 +02:00
Christophe de Dinechin
1099312c9f
Slight beautification of configuration steps
2018-04-04 10:21:03 +02:00
Christophe de Dinechin
dae13eb339
Add -rpath for the target path when building a DLL on OSX
2018-04-04 10:21:03 +02:00
Christophe de Dinechin
0f3b5d325a
Expose configuration variables to makefile
2018-04-04 10:21:03 +02:00
Christophe de Dinechin
7de4f63cf9
Add makefile dependencies for configuration
2018-04-04 10:21:03 +02:00
Christophe de Dinechin
088ea30d1c
Allow configuration programs to be local in project
2018-04-04 10:21:03 +02:00
Christophe de Dinechin
b8c5d9776f
Add PREFIX_SHARE variable
2018-04-04 10:21:03 +02:00
Christophe de Dinechin
80e6d1575d
Nicer to have PKGCONFIG dependencies on their own line
2018-04-04 10:21:03 +02:00
Christophe de Dinechin
1b11630993
Build variants when VARIANTS= is set
2018-04-04 10:21:03 +02:00
Christophe de Dinechin
cefab2c2e9
Remove useless BASENAME_DIR
2018-04-04 10:21:03 +02:00
Christophe de Dinechin
4ce7372146
Add OUTPUT and LOGS environment variables
...
They used to be called with annoying names that nobody would use
2018-04-04 10:21:03 +02:00
Christophe de Dinechin
7d24f430c1
Use faster built-in commands to build directory names
2018-04-04 10:21:03 +02:00
Christophe de Dinechin
e0e5b4a84c
Add some preliminary support for packages found with pkg-config
2018-04-04 10:21:03 +02:00
Christophe de Dinechin
981fe36296
Add support for installing header files
2018-04-04 10:21:03 +02:00
Christophe de Dinechin
cdc1a5ac32
Make sure target-dependent SOURCES are reflected in OBJECTS
2018-04-04 10:21:03 +02:00
Christophe de Dinechin
99de9424db
Restore the passing of LDFLAGS when building libraries
2018-04-04 10:21:03 +02:00
Christophe de Dinechin
cb72543408
Minor cleanup of the install target
2018-04-04 10:21:03 +02:00
Christophe de Dinechin
5fc3828c61
Fix the output directory printout for install targets
2018-04-04 10:21:03 +02:00
Christophe de Dinechin
c033da2d47
Install libraries in addition to base product
2018-04-04 10:21:03 +02:00
Christophe de Dinechin
534c9037a6
Avoid recording the absolute path if not necessary for testing
2018-04-04 10:21:03 +02:00
Christophe de Dinechin
5105c6c97f
Install project DLL and libraries by default
2018-04-04 10:21:03 +02:00
Christophe de Dinechin
154ca40451
Fixups for ancient versions of mingw
...
Tested with mingw32-4.8.2 and make 3.79.1 running on Windows XP
2018-04-04 10:21:03 +02:00
Christophe de Dinechin
e209890343
Use -Lpath -llib for libraries
...
Avoid referencing libraries by absolute path, which is not very portable
2018-04-04 10:21:03 +02:00
Christophe de Dinechin
d2cc85ba6c
Minimize differences between GCC base and macOS variant
2018-04-04 10:21:03 +02:00
Christophe de Dinechin
5daca154c9
Add support for the `make V=1` convention
2018-04-04 10:21:03 +02:00
Christophe de Dinechin
6a9ad13412
Make it simpler to mix static and shared libraries
...
Also avoid using libtool -shared, not available by default on many platforms
2018-04-04 10:21:03 +02:00
Christophe de Dinechin
cedb887262
Accept empty PRODUCTS list, closes #10
2018-04-04 10:21:03 +02:00
Christophe de Dinechin
e0f6492b0f
Better way to compute dependencies on makefiles
2018-04-04 10:21:03 +02:00
Christophe de Dinechin
17c952b837
Add support for DESTDIR, closes #11
2018-04-04 10:21:03 +02:00
Christophe de Dinechin
391ecd8ff8
Link with ld if no C++ sources, closes GitHub #6
2018-04-04 10:21:03 +02:00
Christophe de Dinechin
5e4fb03b91
Add example with libraries
2018-04-04 10:21:03 +02:00
Christophe de Dinechin
ecc48f708b
Better format for links
2018-04-04 10:21:03 +02:00
Christophe de Dinechin
47c04c5303
Share examples of other projects using 'build'
2018-04-04 10:21:03 +02:00
Christophe de Dinechin
dada94f8c5
Add clarification on how to build shared / static libraries
2018-04-04 10:21:03 +02:00
Christophe de Dinechin
131463c503
Add arm-linux-gnu cross-compiler support
...
(No support for selecting include and library path yet)
2018-04-04 10:21:03 +02:00