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
Post a Comment