fix dynamic engine build
authorEric Sandeen <sandeen@redhat.com>
Mon, 9 Nov 2020 16:46:28 +0000 (10:46 -0600)
committerJens Axboe <axboe@kernel.dk>
Mon, 9 Nov 2020 16:49:01 +0000 (09:49 -0700)
commitf4bd2c3d80bc35f76892205a7e50426711e3def3
tree7da3c59413bf883b5af65327708b38007afe461c
parentea693b6e4501a1385bf62a01f6fb1f3609d31a4a
fix dynamic engine build

Builds with --dynamic-libengines are currently broken, because the rule
to build the libraries was moved out of the template that creates them:

make: *** No rule to make target 'engines/libpmem.so', needed by 'all'.  Stop.
make: *** Waiting for unfinished jobs....

Fix this by moving the rule back into the template, calling the template
to create rules only after FIO_CFLAGS has been incorporated into CFLAGS,
and using CFLAGS + -fPIC in that rule rather than FIO_CFLAGS.

Fixes: 8a2cf08d29ac ("Makefile: introduce FIO_CFLAGS")
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Makefile