c++ - Share variables between makefiles -
i have directory construction want 1 main makefile in main folder, , makefile in both test , src folder.
in main makefile, have directives both test / phone call individual folder makefiles. i'm trying declare variables in main makefile , have them accessible other folders.
for instance in main makefile
packages = jansson mysql .... all: here test: cd test create test and in test/makefile want able access previous packages variable , add together makefile's individual dependencies onto it.
in test/makefile
packages += googletest googlemock test here could help me solve problem?
thanks
you can create file, instance makefile.variable shared variables defined , include file using
include $(pathtosharedmakefile)/makefile.variable look @ include manual more information
c++ compilation makefile
No comments:
Post a Comment