]> git.proxmox.com Git - pve-manager.git/commitdiff
buildsys: use CC, CPPFLAGS and CFLAGS
authorWolfgang Bumiller <w.bumiller@proxmox.com>
Wed, 19 Jul 2017 06:49:58 +0000 (08:49 +0200)
committerWolfgang Bumiller <w.bumiller@proxmox.com>
Wed, 19 Jul 2017 06:57:31 +0000 (08:57 +0200)
pvemailforward is a tiny oneliner, but for the sake of best
practices, let's use the build tools from the environment.
For example, with dpkg-buildpackage this will make us use
-D_FORTIFY_SOURCE=2 etc.

bin/Makefile

index c7fca9f8478a70ece15a31b0196be5f856d59cd9..f239a0e5c68a283272b7da0213428d5a7ab6d416 100644 (file)
@@ -66,7 +66,7 @@ pvereport.1.pod: pvereport
        mv $@.tmp $@
 
 pvemailforward: pvemailforward.c
-       gcc $< -o $@ -g -O2 -Wall -ldl -lc
+       $(CC) $(CPPFLAGS) $(CFLAGS) -Wall -g -O2 $< -o $@
 
 .PHONY: install
 install: ${SCRIPTS} ${CLI_MANS} ${SERVICE_MANS} pvemailforward $(addsuffix .service-bash-completion, ${SERVICES}) $(addsuffix .bash-completion, ${CLITOOLS})