gnu make - Linking libraries in makefile -


i have following make file

executable       := sub ccfiles          := subfilhost.cpp  include ../../common/common_opencl.mk 

i want include 3 libraries in make file name libpng.a,libpng16.a , libz.a. how should write them in make file them included. libraries in same place of source files of now.

the file herecommon_opencl.mk

i see no direct way influence behavior common_opencl.mk defines. however, can redefine linking target own, e.g.:

executable       := sub ccfiles          := subfilhost.cpp  include ../../common/common_opencl.mk  extralibs:=libpng.a libz.a  $(target): makedirectories $(objs) makefile     $(verbose)$(linkline) $(extralibs) 

(this full makefile example)


Comments

Popular posts from this blog

c# - How to get the current UAC mode -

postgresql - Lazarus + Postgres: incomplete startup packet -

javascript - Ajax jqXHR.status==0 fix error -