Pergunta

I have the following make file

EXECUTABLE       := sub
CCFILES          := SubFilHost.cpp 
include ../../common/common_opencl.mk

I want to include 3 libraries in this make file name libpng.a,libpng16.a and libz.a. How should I write them in this make file for them to get included. the libraries are in the same place as of the source files as of now.

the file is herecommon_opencl.mk

Foi útil?

Solução

I see no direct way to influence behavior common_opencl.mk defines. However, you can redefine linking target with your 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 is full Makefile example)

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top